@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

/* Qentarisdefi Rotation — Design System */
:root {
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --bg-deep: #0a0b0f;
  --bg-elevated: #12141c;
  --bg-card: rgba(22, 24, 35, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f8;
  --text-muted: #8b8fa3;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 45%, #22d3ee 100%);
  --gradient-card: linear-gradient(145deg, rgba(99, 102, 241, 0.15) 0%, rgba(34, 211, 238, 0.08) 100%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --sidebar-w: 288px;
  --topbar-h: 56px;
  --app-nav-active: rgba(99, 102, 241, 0.22);
  --app-nav-active-border: rgba(129, 140, 248, 0.45);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.25), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(34, 211, 238, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(139, 92, 246, 0.15), transparent);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.9;
}

img {
  max-width: 100%;
  height: auto;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

/* Layout utilities */
.container {
  width: min(1180px, 100% - 2rem);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Public nav */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  /* backdrop-filter moved to ::before — applying it directly to the element
     creates a containing block for position:fixed children (the mobile drawer),
     capping the drawer height to the nav bar height instead of the viewport. */
  background: rgba(10, 11, 15, 0.75);
  border-bottom: 1px solid var(--border);
}

.pub-nav::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(20px) saturate(1.2);
  z-index: -1;
  pointer-events: none;
}

.pub-nav-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem 0;
  gap: 1rem;
  min-height: 3.75rem;
}

/* Row: links + CTAs (desktop); drawer contents stack inside panel (mobile) */
.pub-links-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gradient-hero);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}

.pub-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pub-links li {
  display: flex;
}

.pub-links a {
  display: inline-flex;
  align-items: center;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.pub-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.pub-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-shrink: 0;
  padding-left: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-left: 0.35rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-hero);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(99, 102, 241, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
}

.btn-danger {
  background: rgba(248, 113, 113, 0.2);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.35);
}

/* Cards — glass */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.glass-accent {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Hero */
.hero {
  padding: 4rem 0 5rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero h1 span {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-media {
  margin: 0 auto 1.25rem;
  max-width: 860px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  display: block;
}

/* Stats counter row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 900px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Live join popup */
.join-popup {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 200;
  padding: 1rem 1.25rem;
  max-width: 320px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s;
  pointer-events: none;
}

.join-popup.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.join-popup strong {
  color: var(--success);
}

/* Mobile menu toggle public */
.nav-toggle {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.14);
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.55);
  outline-offset: 3px;
}

.nav-toggle .nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 1.1rem;
}

.nav-toggle .nav-toggle-icon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.pub-nav.drawer-open .nav-toggle .nav-toggle-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.pub-nav.drawer-open .nav-toggle .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.pub-nav.drawer-open .nav-toggle .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Dim page when mobile drawer open */
@media (max-width: 900px) {
  body.page-public.pub-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 95;
    pointer-events: auto;
    animation: pubNavOverlayIn 0.25s ease forwards;
  }

  @keyframes pubNavOverlayIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  body.pub-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    z-index: 102;
    position: relative;
  }

  .pub-links-wrap {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    height: 100vh;
    height: 100dvh;
    width: min(300px, 88vw);
    max-width: 100%;
    background: linear-gradient(195deg, rgba(22, 24, 34, 0.98) 0%, rgba(14, 16, 24, 0.99) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -12px 0 48px rgba(0, 0, 0, 0.55);
    padding: 4.75rem 1.35rem 2rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 1.5rem;
    flex: none;
    margin-left: 0;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 101;
    overflow-y: auto;
  }

  .pub-links-wrap.open {
    transform: translateX(0);
  }

  .pub-links {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  .pub-links li {
    display: block;
  }

  .pub-links a {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 11px;
    white-space: normal;
    justify-content: flex-start;
  }

  .pub-actions {
    flex-direction: column;
    width: 100%;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 0.65rem;
  }

  .pub-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-title p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0.5rem auto 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

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

.feature-card {
  padding: 1.5rem;
  transition: transform 0.25s, border-color 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.35);
}

.feature-illustration {
  margin-top: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.feature-illustration img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.2);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

/* Footer */
.pub-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pub-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Auth pages */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(90% 80% at 0% 0%, rgba(99, 102, 241, 0.16) 0%, rgba(99, 102, 241, 0) 55%),
    radial-gradient(90% 80% at 100% 0%, rgba(14, 165, 233, 0.14) 0%, rgba(14, 165, 233, 0) 58%),
    linear-gradient(180deg, #090c16 0%, #0b0f1c 100%);
}

.auth-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1rem;
  align-items: stretch;
}

.auth-showcase {
  padding: 1.5rem 1.35rem;
  border: 1px solid rgba(129, 140, 248, 0.26);
  background:
    radial-gradient(100% 90% at 100% 0%, rgba(99, 102, 241, 0.18) 0%, rgba(99, 102, 241, 0.03) 50%, rgba(99, 102, 241, 0) 100%),
    linear-gradient(165deg, rgba(25, 29, 46, 0.9) 0%, rgba(14, 17, 28, 0.96) 100%);
}

.auth-logo {
  margin-bottom: 0.9rem;
}

.auth-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(184, 188, 208, 0.9);
}

.auth-showcase h1 {
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  margin-bottom: 0.5rem;
}

.auth-points {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.auth-points li {
  padding: 0.48rem 0.55rem 0.48rem 1.45rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(215, 223, 242, 0.94);
  font-size: 0.9rem;
  position: relative;
}

.auth-points li::before {
  content: "✓";
  position: absolute;
  left: 0.5rem;
  color: #22d3ee;
}

.auth-card {
  width: 100%;
  padding: 1.45rem 1.3rem;
  border: 1px solid rgba(129, 140, 248, 0.24);
  background:
    radial-gradient(100% 100% at 100% 0%, rgba(79, 70, 229, 0.16) 0%, rgba(79, 70, 229, 0.02) 52%, rgba(79, 70, 229, 0) 100%),
    linear-gradient(165deg, rgba(24, 27, 42, 0.92) 0%, rgba(15, 17, 27, 0.98) 100%);
}

.auth-card-head h2 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

.auth-card .sub {
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  font-size: 0.9rem;
}

.auth-row {
  margin-bottom: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-check input {
  width: auto;
}

.auth-submit {
  width: 100%;
}

.auth-links {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.88rem;
}

.auth-showcase--register {
  border-color: rgba(14, 165, 233, 0.28);
  background:
    radial-gradient(100% 90% at 100% 0%, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.03) 50%, rgba(14, 165, 233, 0) 100%),
    linear-gradient(165deg, rgba(23, 31, 45, 0.9) 0%, rgba(14, 18, 29, 0.96) 100%);
}

.auth-card--register {
  border-color: rgba(56, 189, 248, 0.26);
}

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.auth-demo-link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-showcase {
    order: 2;
  }

  .auth-card {
    order: 1;
  }

  .auth-form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* Matrix visual */
.matrix-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

.matrix-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.matrix-node {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  border: 2px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}

.matrix-node.filled {
  background: rgba(52, 211, 153, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.matrix-node.pending {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.4);
  color: var(--warning);
}

.matrix-node.root {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
}

/* Genealogy tree */
.tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0;
  overflow-x: auto;
}

.tree-level {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
}

.tree-node {
  min-width: 120px;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.8rem;
}

.tree-node .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-hero);
  margin: 0 auto 0.5rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(52, 211, 153, 0.2);
  color: var(--success);
}

.badge-warn {
  background: rgba(251, 191, 36, 0.2);
  color: var(--warning);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

/* Progress */
.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-hero);
  transition: width 0.8s ease-out;
}

/* App shell — member / admin */
body.page-app {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: -0.01em;
}

body.page-app h1,
body.page-app h2,
body.page-app h3,
body.page-app .page-title {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(16, 18, 26, 0.98) 0%, rgba(12, 14, 20, 0.96) 100%);
  backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  padding: 1.15rem 1.1rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sidebar-close {
  display: none;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
  font-family: inherit;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.13);
  color: var(--text);
}

.sidebar-header .logo {
  font-size: 1.02rem;
  font-weight: 700;
}

.sidebar-header .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 0.78rem;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.65rem 0.65rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
}

.sidebar-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-section-label {
  margin: 0.85rem 0 0.35rem 0.35rem;
  padding: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(139, 143, 163, 0.85);
}

.sidebar-section-label:first-child {
  margin-top: 0.35rem;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.58rem 0.75rem 0.58rem 0.65rem;
  border-radius: 11px;
  color: rgba(212, 214, 230, 0.88);
  font-weight: 550;
  font-size: 0.875rem;
  margin-bottom: 0.05rem;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--app-nav-active);
  color: #e0e7ff;
  border-color: var(--app-nav-active-border);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

.sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.35rem;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

.sidebar-nav .nav-icon {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-size: 0.95rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 1;
}

.sidebar-nav a.active .nav-icon {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(165, 180, 252, 0.35);
}

/* App sidebar: collapsible submenus (native <details>/<summary>, no JS) — admin + member */
body.page-admin-app details.sidebar-nav-group,
body.page-member-app details.sidebar-nav-group {
  margin-bottom: 0.05rem;
}

body.page-admin-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle,
body.page-member-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.72rem;
  padding: 0.58rem 0.75rem 0.58rem 0.65rem;
  margin-bottom: 0.05rem;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 550;
  font-size: 0.875rem;
  color: rgba(212, 214, 230, 0.88);
  text-align: left;
  list-style: none;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

body.page-admin-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle::-webkit-details-marker,
body.page-member-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle::-webkit-details-marker {
  display: none;
}

body.page-admin-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle::marker,
body.page-member-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle::marker {
  display: none;
  content: "";
}

body.page-admin-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle:hover,
body.page-member-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

body.page-admin-app details.sidebar-nav-group.has-active-child > summary.sidebar-nav-group-toggle,
body.page-member-app details.sidebar-nav-group.has-active-child > summary.sidebar-nav-group-toggle {
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(129, 140, 248, 0.2);
}

body.page-admin-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle .sidebar-nav-chevron,
body.page-member-app details.sidebar-nav-group > summary.sidebar-nav-group-toggle .sidebar-nav-chevron {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 1.30rem;
  opacity: 0.65;
  transition: transform 0.22s ease;
}

body.page-admin-app details.sidebar-nav-group[open] > summary.sidebar-nav-group-toggle .sidebar-nav-chevron,
body.page-member-app details.sidebar-nav-group[open] > summary.sidebar-nav-group-toggle .sidebar-nav-chevron {
  transform: rotate(90deg);
}

body.page-admin-app details.sidebar-nav-group .sidebar-nav-submenu,
body.page-member-app details.sidebar-nav-group .sidebar-nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.2rem 0 0.4rem 0;
  margin: 0 0 0.15rem 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-admin-app details.sidebar-nav-group:not([open]) .sidebar-nav-submenu,
body.page-member-app details.sidebar-nav-group:not([open]) .sidebar-nav-submenu {
  display: none;
}

body.page-admin-app .sidebar-nav-submenu a,
body.page-member-app .sidebar-nav-submenu a {
  padding: 0.48rem 0.65rem 0.48rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 500;
}

body.page-admin-app .sidebar-nav-submenu a .nav-icon,
body.page-member-app .sidebar-nav-submenu a .nav-icon {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.8rem;
}

.sidebar-footer {
  padding: 1rem 1rem 1.15rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sidebar-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 500;
  font-size: 0.78rem;
  transition: background 0.2s, color 0.2s;
}

.sidebar-footer a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text) !important;
  opacity: 1;
}

.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1.35rem 0.75rem 1.15rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 11, 18, 0.72);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 46;
}

.topbar .sidebar-toggle + * {
  flex: 1;
  min-width: 0;
}

.topbar > span.topbar-title {
  font-weight: 650;
}

.sidebar-toggle {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  gap: 0.45rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  margin-right: 0.35rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.2s, border-color 0.2s;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.topbar-title {
  font-weight: 650;
  font-size: 1.06rem;
  letter-spacing: -0.03em;
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.notif-dot {
  position: relative;
}

.notif-dot::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
}

.main-content {
  flex: 1;
  padding: 1.5rem;
}

body.page-app .main-content {
  padding: 1.5rem 1.5rem 2.25rem;
  width: 100%;
  max-width: min(1440px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
}

body.page-app .glass {
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.page-app .page-header {
  background: linear-gradient(165deg, rgba(24, 26, 38, 0.82) 0%, rgba(18, 20, 30, 0.75) 100%);
  border-color: rgba(255, 255, 255, 0.09);
}

body.page-app .topbar-meta {
  margin-top: 0.15rem;
  line-height: 1.35;
}

body.page-app .sidebar-nav a:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.55);
  outline-offset: 2px;
}

body.page-app table.data-table {
  border-radius: 12px;
  overflow: hidden;
}

body.page-app .data-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 650;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(180, 184, 204, 0.95);
}

body.page-app .tab-btn.active {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

/* Member app — entrance, scroll reveal, micro-interactions */
@keyframes memberFadeUp {
  from {
    opacity: 0;
    transform: translateY(max(14px, 0.6rem));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes memberSlideSidebar {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes memberTopbarDrop {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes memberNavStagger {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.page-member-app .app-shell {
  /* No animation here — animating opacity/transform would create a stacking context
     that traps the sidebar below the backdrop overlay. Child elements (sidebar,
     topbar, nav items, content) carry their own entrance animations instead. */
}

body.page-member-app .sidebar {
  animation: memberSlideSidebar 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.page-member-app .main-wrap > .topbar {
  animation: memberTopbarDrop 0.44s cubic-bezier(0.22, 1, 0.36, 1) 0.06s both;
}

body.page-member-app .sidebar-nav-inner > * {
  animation: memberNavStagger 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--member-nav-d, 0ms);
}

body.page-member-app .main-content > * {
  --member-d: 0ms;
  animation: memberFadeUp 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: var(--member-d);
}

body.page-member-app .member-fx-target {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--member-fx-delay, 0ms);
  will-change: opacity, transform;
}

body.page-member-app .member-fx-target.is-revealed {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

body.page-member-app .main-content .glass:not(.kpi-inner),
body.page-member-app .main-content .kpi-inner {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

body.page-member-app .main-content .glass:not(.kpi-inner):hover,
body.page-member-app .main-content .kpi-inner:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
}

body.page-member-app .main-content .btn:not(.sidebar-toggle),
body.page-member-app .topbar .btn {
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.page-member-app .main-content .btn:not(.sidebar-toggle):hover,
body.page-member-app .topbar .btn:hover {
  transform: translateY(-1px);
}

body.page-member-app .main-content .btn:not(.sidebar-toggle):active,
body.page-member-app .topbar .btn:active {
  transform: translateY(0);
}

body.page-member-app .sidebar-nav a .nav-icon {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.page-member-app .sidebar-nav a:hover .nav-icon,
body.page-member-app .sidebar-nav a.active .nav-icon {
  transform: scale(1.06);
}

/* Admin area — management links and quick ops */
.admin-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.82rem 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-model-link,
.admin-public-link {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 0.34rem 0.45rem;
  font-size: 0.82rem;
  color: rgba(203, 213, 225, 0.95) !important;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-model-link:hover,
.admin-public-link:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe !important;
}

.admin-plan-hint {
  margin: 0.92rem 0 1.12rem;
  padding: 0.95rem 1.15rem !important;
  border: 1px solid rgba(129, 140, 248, 0.28) !important;
  background: linear-gradient(165deg, rgba(24, 29, 44, 0.9) 0%, rgba(16, 20, 31, 0.95) 100%) !important;
}

.admin-plan-hint strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.admin-plan-hint p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
}

.admin-plan-hint a {
  color: #93c5fd;
  font-weight: 600;
}

.admin-quick-nav-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin-right: 0.25rem;
  font-size: 0.77rem;
  color: rgba(184, 188, 208, 0.92);
}

.admin-quick-nav {
  border-radius: 8px;
  border: 1px solid rgba(129, 140, 248, 0.3);
  background: rgba(16, 20, 31, 0.92);
  color: var(--text);
  font-size: 0.78rem;
  padding: 0.3rem 0.45rem;
  font-family: inherit;
}

.admin-quick-nav:focus {
  outline: 2px solid rgba(99, 102, 241, 0.42);
  outline-offset: 1px;
}

/* Member area — language switcher & plan hints */
.member-sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.85rem 0.65rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.member-lang {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.member-lang-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(139, 143, 163, 0.9);
}

.member-lang-select {
  width: 100%;
  padding: 0.42rem 0.55rem;
  border-radius: 9px;
  border: 1px solid rgba(129, 140, 248, 0.32);
  background: rgba(15, 18, 28, 0.9);
  color: var(--text);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
}

.member-lang-select:focus {
  outline: 2px solid rgba(99, 102, 241, 0.45);
  outline-offset: 1px;
}

.member-model-link,
.member-public-link {
  font-size: 0.82rem;
  color: rgba(184, 188, 208, 0.95) !important;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.member-model-link:hover,
.member-public-link:hover {
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe !important;
}

.member-plan-hint {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem !important;
  border: 1px solid rgba(129, 140, 248, 0.28) !important;
  background: linear-gradient(165deg, rgba(26, 29, 44, 0.88) 0%, rgba(17, 19, 30, 0.92) 100%) !important;
}

.member-plan-hint strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  color: #e2e8f0;
}

.member-plan-hint p {
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

.member-plan-hint a {
  color: #93c5fd;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .admin-quick-nav-wrap {
    width: 100%;
    margin-right: 0;
  }

  .admin-quick-nav {
    width: 100%;
  }
}

/* Dashboard grids */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
  .dash-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.stat-tile {
  padding: 1.25rem;
}

.stat-tile .label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stat-tile .value {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.35rem;
}

.stat-tile .delta {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  color: var(--success);
}

.chart-card {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.chart-card h3 {
  margin-bottom: 1rem;
}

.chart-box {
  position: relative;
  height: 280px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.chart-box canvas {
  display: block;
  max-width: 100%;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.two-col > * {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 992px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .chart-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .chart-box {
    height: 240px;
  }
}

/* Overlay mobile sidebar */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s, visibility 0.3s;
}

.sidebar-backdrop.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .sidebar-toggle {
    display: inline-flex;
  }
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrap {
    margin-left: 0;
  }
  body.sidebar-open {
    overflow: hidden;
  }
  .sidebar-close {
    display: inline-flex;
  }

  /* Cancel member entrance animations on mobile — animation fill-mode "both"
     would otherwise lock transform:translateX(0) on the sidebar, overriding
     the translateX(-100%) hide rule above and keeping the sidebar always open. */
  body.page-member-app .sidebar,
  body.page-member-app .main-wrap > .topbar,
  body.page-member-app .sidebar-nav-inner > * {
    animation: none;
  }
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(30, 32, 42, 0.95);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  animation: toastIn 0.35s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

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

.calc-result {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-top: 0.5rem;
}

/* QR placeholder */
.qr-placeholder {
  width: 180px;
  height: 180px;
  margin: 1rem auto;
  border-radius: var(--radius-sm);
  background: repeating-conic-gradient(#333 0% 25%, #222 0% 50%) 50% / 16px 16px;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem;
}

/* CMS blocks */
.cms-block {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
}

.cms-block textarea {
  min-height: 100px;
  margin-top: 0.5rem;
}

/* Ticket thread */
.ticket-msg {
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.ticket-msg.admin {
  border-left: 3px solid var(--accent);
}

.ticket-msg.user {
  border-left: 3px solid var(--success);
}

/* Utility */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.gap-1 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ========== Internal panels (advanced SaaS) ========== */
.page-header {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0.35rem 0 0.25rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  margin: 0;
  font-size: 0.9rem;
  max-width: 520px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs span.sep {
  opacity: 0.45;
  user-select: none;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.kpi-adv {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
  .kpi-adv {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .kpi-adv {
    grid-template-columns: 1fr;
  }
}

.kpi-adv .kpi-inner {
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.85rem;
  align-items: start;
}

.kpi-adv .kpi-icon {
  grid-row: span 2;
  align-self: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.kpi-adv .kpi-icon.accent-2 {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.35);
}

.kpi-adv .kpi-icon.success {
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.35);
}

.kpi-adv .kpi-icon.warn {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
}

.kpi-adv .kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  grid-column: 2;
  grid-row: 1;
}

.kpi-adv .kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
  grid-column: 2;
  grid-row: 2;
  margin-top: 0.15rem;
}

.kpi-adv .kpi-meta {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.kpi-adv .kpi-spark {
  grid-column: 1 / -1;
  height: 28px;
  width: 100%;
  margin-top: 0.35rem;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(99,102,241,0.15) 0%, rgba(34,211,238,0.2) 50%, rgba(99,102,241,0.08) 100%);
  opacity: 0.9;
}

.grid-3-adv {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 1100px) {
  .grid-3-adv {
    grid-template-columns: 1fr;
  }
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.card-head h3 {
  margin: 0;
  font-size: 1rem;
  flex: 1 1 auto;
  min-width: 0;
}

.card-head .badge {
  flex-shrink: 0;
}

.card-head .card-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.2rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
}

.tab-btn {
  padding: 0.45rem 0.9rem;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: rgba(99, 102, 241, 0.28);
  color: #e0e7ff;
  border: 1px solid rgba(99, 102, 241, 0.35);
}

.tab-panel[hidden] {
  display: none !important;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Single-row filter bar (e.g. deposit request lists) */
.table-toolbar.table-toolbar-inline-filters {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-toolbar.table-toolbar-inline-filters .form-control {
  flex: 0 1 10rem;
  min-width: 6.5rem;
  max-width: 14rem;
  width: auto;
}

.table-toolbar.table-toolbar-inline-filters .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-inline-error {
  display: block;
  color: #f87171;
  font-weight: 600;
  font-size: 0.875rem;
  margin: -0.35rem 0 0.85rem;
  min-height: 1.25em;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover {
  color: var(--text);
}

.chip.active {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.45);
  color: #e0e7ff;
}

.timeline {
  position: relative;
  padding-left: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  opacity: 0.5;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.1rem;
  padding-left: 0.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.2rem;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--accent-2);
}

.timeline-item strong {
  display: block;
  font-size: 0.88rem;
}

.timeline-item .time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.stepper .step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.stepper .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.stepper .step.done .step-num {
  background: rgba(52, 211, 153, 0.2);
  border-color: var(--success);
  color: var(--success);
}

.stepper .step.active .step-num {
  background: rgba(99, 102, 241, 0.3);
  border-color: var(--accent);
  color: #fff;
}

.stepper .arrow {
  color: var(--text-muted);
  opacity: 0.45;
  user-select: none;
}

.split-panel {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
}

@media (max-width: 1000px) {
  .split-panel {
    grid-template-columns: 1fr;
  }
}

.info-callout {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.06);
  font-size: 0.85rem;
}

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 1rem 0;
  margin-bottom: 1.5rem;
}

.podium-place {
  text-align: center;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  min-width: 100px;
}

.podium-place.rank-1 {
  order: 2;
  transform: scale(1.05);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.12);
}

.podium-place.rank-2 { order: 1; }
.podium-place.rank-3 { order: 3; }

.podium-place .medal {
  font-size: 1.5rem;
  line-height: 1;
}

.podium-place .name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.35rem;
}

.podium-place .amt {
  font-size: 0.8rem;
  color: var(--accent-2);
  margin-top: 0.25rem;
}

.th-sort {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.th-sort:hover {
  color: var(--text);
}

.mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mini-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.mini-list li:last-child {
  border-bottom: none;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.health-pill.ok {
  background: rgba(52, 211, 153, 0.2);
  color: var(--success);
}

.health-pill.degraded {
  background: rgba(251, 191, 36, 0.15);
  color: var(--warning);
}

.skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: sk 1.2s ease infinite;
}

@keyframes sk {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.topbar-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Contribution -> distribution (public process rail) */
.dist-flow-section {
  scroll-margin-top: 5.5rem;
}

.dist-flow-shell {
  position: relative;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(1rem, 3vw, 1.75rem);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(160deg, rgba(22, 25, 38, 0.64) 0%, rgba(12, 14, 22, 0.82) 100%);
}

.dist-flow-track {
  position: absolute;
  left: clamp(1.25rem, 3vw, 2rem);
  right: clamp(1.25rem, 3vw, 2rem);
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.35), rgba(34, 211, 238, 0.3), rgba(52, 211, 153, 0.3));
  pointer-events: none;
}

.dist-flow-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.dist-step {
  position: relative;
  padding: 1.05rem 1rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: linear-gradient(168deg, rgba(28, 31, 47, 0.86) 0%, rgba(16, 19, 30, 0.9) 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  min-height: 182px;
}

.dist-step::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.65rem;
  width: 0.65rem;
  height: 2px;
  background: rgba(165, 180, 252, 0.45);
  transform: translateY(-50%);
}

.dist-step:first-child::before {
  display: none;
}

.dist-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.dist-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-family: var(--font-display), var(--font), system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #eef2ff;
  background: rgba(99, 102, 241, 0.24);
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.dist-step__tag {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(184, 188, 209, 0.9);
}

.dist-step__title {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  line-height: 1.3;
}

.dist-step__text {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.56;
}

.dist-step--market .dist-step__num {
  background: rgba(20, 184, 166, 0.2);
  border-color: rgba(45, 212, 191, 0.38);
}

.dist-step--platform .dist-step__num {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(251, 191, 36, 0.38);
}

.dist-step--out .dist-step__num {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(74, 222, 128, 0.38);
}

.dist-flow-footnote {
  margin-top: 1rem;
  text-align: center;
}

.dist-flow-footnote__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.76rem;
}

.dist-flow-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-top: clamp(1.4rem, 3vw, 2.1rem);
  padding-top: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

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

  .dist-flow-track {
    display: none;
  }

  .dist-step::before {
    display: none;
  }
}

@media (max-width: 600px) {
  .dist-flow-grid {
    grid-template-columns: 1fr;
  }

  .dist-step {
    min-height: 0;
  }
}

/* Transparency section */
.transparency-section {
  margin-top: 0.25rem;
}

.transparency-shell {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: clamp(1rem, 3vw, 1.8rem);
  align-items: start;
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.transparency-main h2 {
  margin-bottom: 0.55rem;
}

.transparency-main > p {
  max-width: 40rem;
  margin: 0 0 1.15rem;
}

.transparency-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.transparency-points li {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.transparency-points strong {
  font-size: 0.9rem;
  color: #eef2ff;
}

.transparency-points span {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.transparency-aside {
  display: grid;
  gap: 0.85rem;
}

.transparency-aside .hero-media {
  margin: 0;
  max-width: none;
  border-radius: 14px;
}

.transparency-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.transparency-actions .btn {
  width: 100%;
}

@media (max-width: 940px) {
  .transparency-shell {
    grid-template-columns: 1fr;
  }

  .transparency-actions {
    grid-template-columns: 1fr;
  }
}

/* How it works page */
.how-page .section-title {
  margin-bottom: 1.1rem;
}

.how-section--tight {
  padding-top: 1.1rem;
}

.how-read-map {
  padding: clamp(1.2rem, 2.6vw, 1.8rem);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(99, 102, 241, 0.24);
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(99, 102, 241, 0.14), transparent 60%),
    linear-gradient(160deg, rgba(26, 29, 44, 0.78) 0%, rgba(15, 18, 29, 0.9) 100%);
}

.how-read-head h3 {
  margin-bottom: 0.45rem;
}

.how-read-head p {
  max-width: 52rem;
}

.how-read-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.how-read-step {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 12, 22, 0.45);
}

.how-read-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display), var(--font), system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e0e7ff;
  border: 1px solid rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.24);
}

.how-read-body h4 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
}

.how-read-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.how-read-footer {
  margin-top: 0.8rem;
}

.how-read-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.1);
  color: #c4f2fa;
  font-size: 0.77rem;
}

.how-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.how-kpi-card {
  padding: 1.15rem 1.1rem;
}

.how-kpi-label {
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(184, 188, 208, 0.9);
}

.how-kpi-value {
  margin: 0.4rem 0 0.45rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.how-allocation {
  margin-bottom: 1rem;
}

.how-surface {
  padding: 1.35rem 1.25rem;
}

.how-surface h3 {
  font-size: 1.1rem;
}

.allocation-summary-pro {
  border-color: rgba(129, 140, 248, 0.28);
}

.allocation-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.allocation-summary-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.allocation-summary-pro .data-table td:nth-child(3),
.allocation-summary-pro .data-table td:nth-child(4),
.allocation-summary-pro .data-table th:nth-child(3),
.allocation-summary-pro .data-table th:nth-child(4) {
  text-align: right;
  white-space: nowrap;
}

.allocation-summary-pro .data-table td:nth-child(5),
.allocation-summary-pro .data-table th:nth-child(5) {
  min-width: 140px;
}

.alloc-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 650;
  border: 1px solid transparent;
  white-space: nowrap;
}

.alloc-badge--trade {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
  color: #c7d2fe;
}

.alloc-badge--defi {
  background: rgba(20, 184, 166, 0.16);
  border-color: rgba(45, 212, 191, 0.36);
  color: #99f6e4;
}

.alloc-badge--reserve {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(74, 222, 128, 0.36);
  color: #bbf7d0;
}

.alloc-badge--growth {
  background: rgba(245, 158, 11, 0.17);
  border-color: rgba(251, 191, 36, 0.36);
  color: #fde68a;
}

.alloc-badge--ops {
  background: rgba(249, 115, 22, 0.17);
  border-color: rgba(251, 146, 60, 0.36);
  color: #fed7aa;
}

.alloc-bar {
  width: 100%;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.alloc-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.alloc-fill--trade { background: linear-gradient(90deg, #818cf8, #6366f1); }
.alloc-fill--defi { background: linear-gradient(90deg, #5eead4, #14b8a6); }
.alloc-fill--reserve { background: linear-gradient(90deg, #86efac, #22c55e); }
.alloc-fill--growth { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.alloc-fill--ops { background: linear-gradient(90deg, #fdba74, #f97316); }

.allocation-summary-pro tfoot td {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.how-table-wrap {
  margin-top: 0.85rem;
  margin-bottom: 0.95rem;
}

.how-engine-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.how-engine-card {
  padding: 1.25rem 1.1rem;
}

.how-engine-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.04rem;
}

.how-engine-card .check-list {
  margin-top: 0.7rem;
}

.how-engine-meta {
  margin: 0.65rem 0 0;
  font-size: 0.82rem;
  color: #c7d2fe;
}

.how-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.how-two-col > * {
  min-width: 0;
}

.dist-policy-pro {
  border-color: rgba(129, 140, 248, 0.28);
}

.dist-policy-list {
  margin: 0.9rem 0 0.8rem;
  display: grid;
  gap: 0.55rem;
}

.dist-policy-item {
  padding: 0.58rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.dist-policy-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
  font-size: 0.84rem;
}

.dist-policy-meta strong {
  font-size: 0.82rem;
}

.dist-policy-bar {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.dist-policy-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
}

.dist-policy-fill--rewards { background: linear-gradient(90deg, #818cf8, #6366f1); }
.dist-policy-fill--expansion { background: linear-gradient(90deg, #5eead4, #14b8a6); }
.dist-policy-fill--reserve { background: linear-gradient(90deg, #fcd34d, #f59e0b); }
.dist-policy-fill--ops { background: linear-gradient(90deg, #fdba74, #f97316); }

.dist-policy-formula {
  margin: 0 0 0.8rem;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.08);
  color: #bae6fd;
  font-size: 0.83rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.dist-policy-formula code {
  color: #e0f2fe;
  font-size: 0.82rem;
  white-space: normal;
  word-break: break-word;
}

.growth-sim-pro .data-table td:nth-child(n+2),
.growth-sim-pro .data-table th:nth-child(n+2) {
  text-align: right;
  white-space: nowrap;
}

.controls-pro {
  border-color: rgba(94, 234, 212, 0.22);
}

.controls-table th:nth-child(4),
.controls-table td:nth-child(4) {
  text-align: center;
  white-space: nowrap;
}

.controls-table th:nth-child(5),
.controls-table td:nth-child(5) {
  white-space: nowrap;
}

.controls-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.controls-card {
  padding: 0.9rem 0.95rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.controls-card h4 {
  font-size: 1rem;
}

.controls-card .check-list {
  margin: 0.35rem 0 0;
}

.how-note {
  padding: 1.1rem 1.2rem;
  border-color: rgba(255, 255, 255, 0.11);
}

@media (max-width: 960px) {
  .how-read-steps,
  .how-kpi-grid,
  .how-engine-grid,
  .how-two-col {
    grid-template-columns: 1fr;
  }

  .controls-grid {
    grid-template-columns: 1fr;
  }

  .how-surface {
    padding: 1.1rem 1rem;
  }

  .how-surface h3 {
    font-size: 1.05rem;
  }

  .how-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 480px) {
  .how-surface {
    padding: 0.9rem 0.85rem;
  }

  .how-surface h3 {
    font-size: 0.98rem;
  }

  .dist-policy-meta {
    font-size: 0.8rem;
  }

  .growth-sim-pro .data-table th,
  .growth-sim-pro .data-table td {
    padding: 0.65rem 0.7rem;
    font-size: 0.82rem;
  }
}

.how-truth-banner {
  position: relative;
  padding: clamp(1.35rem, 3vw, 2rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(251, 191, 36, 0.35);
  background:
    radial-gradient(ellipse 85% 65% at 10% 0%, rgba(251, 191, 36, 0.16), transparent 60%),
    radial-gradient(ellipse 70% 55% at 100% 100%, rgba(34, 211, 238, 0.12), transparent 65%),
    linear-gradient(165deg, rgba(30, 24, 10, 0.68) 0%, rgba(17, 21, 33, 0.92) 55%, rgba(11, 14, 24, 0.94) 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.how-truth-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 35%, #22d3ee 100%);
}

.how-truth-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fcd34d;
}

.how-truth-banner h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
}

.how-truth-lead {
  margin: 0 0 1rem;
  color: #d7deef;
  max-width: 56rem;
  line-height: 1.6;
}

.how-truth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.how-truth-card {
  padding: 0.95rem 0.95rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(10, 14, 24, 0.45);
}

.how-truth-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.how-truth-card .check-list {
  margin: 0;
}

.how-truth-note {
  margin: 0.9rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 11px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(251, 191, 36, 0.08);
  color: #f4f6fb;
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .how-truth-grid {
    grid-template-columns: 1fr;
  }
}

/* Plan page */
.plan-hero {
  padding-bottom: 2rem;
}

.plan-matrix-demo {
  margin: 0;
  position: relative;
  overflow: hidden;
}

.plan-matrix-demo::before {
  content: "";
  position: absolute;
  inset: -20% -15%;
  background: conic-gradient(from 180deg at 50% 50%, rgba(99, 102, 241, 0.1), rgba(34, 211, 238, 0.08), rgba(99, 102, 241, 0.1));
  animation: planSpin 16s linear infinite;
  pointer-events: none;
}

.plan-matrix-demo > * {
  position: relative;
  z-index: 1;
}

.plan-matrix-demo .matrix-node.root {
  margin-bottom: 0.3rem;
}

.matrix-link-flow {
  width: 2px;
  height: 1rem;
  margin: 0.1rem auto 0.35rem;
  border-radius: 99px;
  background: rgba(129, 140, 248, 0.35);
  position: relative;
  overflow: hidden;
}

.matrix-link-flow::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -55%;
  height: 55%;
  background: linear-gradient(180deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.9), rgba(34, 211, 238, 0));
  animation: planFlowDown 1.7s linear infinite;
}

.matrix-live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 0.55rem;
}

.matrix-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.32);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 600;
}

.matrix-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
  animation: planLiveDot 1.9s ease-in-out infinite;
}

.matrix-live-dot--warn {
  background: #fbbf24;
  box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.55);
  animation-duration: 1.4s;
}

.matrix-progress {
  width: 100%;
  height: 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.35rem;
}

.matrix-progress-fill {
  height: 100%;
  width: 67%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 55%, #22d3ee 100%);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.35);
  position: relative;
  animation: planProgressBreathe 2.8s ease-in-out infinite;
}

.matrix-progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 26px;
  right: -14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(4px);
  opacity: 0.45;
}

.matrix-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.matrix-progress-meta strong {
  color: #e9e9ff;
  font-size: 0.82rem;
}

.plan-page .section-title {
  margin-bottom: 1.1rem;
}

.plan-section-tight {
  padding-top: 1.1rem;
}

.plan-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.plan-kpi-card {
  padding: 1.15rem 1.1rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(28, 31, 47, 0.78) 0%, rgba(17, 19, 30, 0.9) 100%);
}

.plan-kpi-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, 0.35);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.plan-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

.plan-kpi-label {
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(184, 188, 208, 0.9);
}

.plan-kpi-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #dbe4ff;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.plan-kpi-value {
  margin: 0.4rem 0 0.45rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.plan-kpi-card--structure {
  border-top: 3px solid rgba(129, 140, 248, 0.8);
}

.plan-kpi-card--structure .plan-kpi-chip {
  border-color: rgba(129, 140, 248, 0.45);
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
}

.plan-kpi-card--trigger {
  border-top: 3px solid rgba(45, 212, 191, 0.8);
}

.plan-kpi-card--trigger .plan-kpi-chip {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(20, 184, 166, 0.18);
  color: #99f6e4;
}

.plan-kpi-card--outputs {
  border-top: 3px solid rgba(251, 191, 36, 0.85);
}

.plan-kpi-card--outputs .plan-kpi-chip {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.plan-flow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.plan-flow-head p {
  max-width: 50rem;
}

.plan-flow-showcase {
  position: relative;
  padding: clamp(1rem, 2.8vw, 1.5rem);
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(ellipse 75% 55% at 12% 0%, rgba(99, 102, 241, 0.16), transparent 62%),
    radial-gradient(ellipse 65% 45% at 100% 100%, rgba(34, 211, 238, 0.12), transparent 60%),
    linear-gradient(160deg, rgba(21, 24, 38, 0.8) 0%, rgba(13, 16, 26, 0.92) 100%);
  overflow: hidden;
}

.plan-flow-orbit {
  position: absolute;
  width: 42rem;
  height: 42rem;
  right: -20rem;
  top: -19rem;
  border-radius: 50%;
  border: 1px dashed rgba(129, 140, 248, 0.22);
  opacity: 0.7;
  animation: planOrbit 18s linear infinite;
  pointer-events: none;
}

.plan-flow-showcase .plan-flow-grid {
  position: relative;
  z-index: 1;
}

.plan-flow-showcase .dist-step {
  background: linear-gradient(168deg, rgba(29, 32, 49, 0.9) 0%, rgba(16, 19, 31, 0.94) 100%);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24);
}

.plan-flow-showcase .dist-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
}

.plan-flow-showcase .dist-step__num {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 4px 14px rgba(99, 102, 241, 0.25);
}

.plan-flow-showcase .dist-step__tag {
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.plan-step-card {
  position: relative;
  overflow: visible;
}

.plan-step-card:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -0.72rem;
  top: 50%;
  width: 0.72rem;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(129, 140, 248, 0.2), rgba(34, 211, 238, 0.7));
}

.plan-step-card:not(:first-child)::after {
  content: "";
  position: absolute;
  left: -0.2rem;
  top: 50%;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(34, 211, 238, 0.95);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45);
  animation: planConnectorPulse 1.8s ease-in-out infinite;
}

.plan-step-icon {
  margin-left: auto;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
}

.plan-step-card--entry .plan-step-icon {
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
}

.plan-step-card--placement .plan-step-icon {
  border-color: rgba(45, 212, 191, 0.4);
  background: rgba(20, 184, 166, 0.22);
  color: #99f6e4;
}

.plan-step-card--close .plan-step-icon {
  border-color: rgba(74, 222, 128, 0.42);
  background: rgba(34, 197, 94, 0.22);
  color: #bbf7d0;
}

.plan-step-card--rotate .plan-step-icon {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(245, 158, 11, 0.24);
  color: #fde68a;
}

.plan-flow-footer {
  position: relative;
  z-index: 1;
  margin-top: 0.95rem;
  text-align: center;
}

.plan-flow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.1);
  color: #bdeef9;
  font-size: 0.76rem;
}

.plan-two-col {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 0.95rem;
}

.plan-surface {
  padding: 1.3rem 1.2rem;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.plan-surface:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.payout-pro {
  border-color: rgba(129, 140, 248, 0.25);
}

.payout-rail {
  margin: 0.75rem 0 0.9rem;
  display: grid;
  gap: 0.5rem;
}

.payout-rail-item {
  padding: 0.7rem 0.8rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.payout-rail-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.payout-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.payout-dot--direct { background: #6366f1; }
.payout-dot--matrix { background: #22d3ee; }
.payout-dot--leader { background: #fbbf24; }
.payout-dot--reentry { background: #34d399; }

.payout-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #d7def7;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eligibility-pro {
  border-color: rgba(45, 212, 191, 0.26);
}

.eligibility-table th:nth-child(3),
.eligibility-table td:nth-child(3) {
  text-align: center;
  white-space: nowrap;
}

.plan-table-wrap {
  margin-top: 0.8rem;
  margin-bottom: 0.9rem;
}

.plan-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.operator-pro {
  border-color: rgba(129, 140, 248, 0.28);
}

.operator-table th:nth-child(5),
.operator-table td:nth-child(5) {
  text-align: center;
  white-space: nowrap;
}

.operator-cards {
  margin-top: 0.9rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.operator-card {
  padding: 0.88rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.operator-card h4 {
  font-size: 0.98rem;
}

.operator-card .check-list {
  margin: 0.3rem 0 0;
}

.plan-badge-animated {
  position: relative;
  overflow: hidden;
}

.plan-badge-animated::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  transform: skewX(-20deg) translateX(-180%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: planShine 4.8s ease-in-out infinite;
}

.plan-btn-glow {
  position: relative;
}

.plan-btn-glow::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  border: 1px solid rgba(165, 180, 252, 0.5);
  opacity: 0;
  animation: planPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}

.plan-page--animated .plan-fx-reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: planReveal 0.6s ease forwards;
}

.plan-page--animated .plan-kpi-grid .plan-fx-reveal:nth-child(1) { animation-delay: 0.08s; }
.plan-page--animated .plan-kpi-grid .plan-fx-reveal:nth-child(2) { animation-delay: 0.16s; }
.plan-page--animated .plan-kpi-grid .plan-fx-reveal:nth-child(3) { animation-delay: 0.24s; }
.plan-page--animated .plan-flow-grid .plan-fx-reveal:nth-child(1) { animation-delay: 0.12s; }
.plan-page--animated .plan-flow-grid .plan-fx-reveal:nth-child(2) { animation-delay: 0.2s; }
.plan-page--animated .plan-flow-grid .plan-fx-reveal:nth-child(3) { animation-delay: 0.28s; }
.plan-page--animated .plan-flow-grid .plan-fx-reveal:nth-child(4) { animation-delay: 0.36s; }
.plan-page--animated .plan-two-col .plan-fx-reveal:nth-child(1) { animation-delay: 0.15s; }
.plan-page--animated .plan-two-col .plan-fx-reveal:nth-child(2) { animation-delay: 0.23s; }
.plan-page--animated .plan-check-grid .plan-fx-reveal:nth-child(1) { animation-delay: 0.1s; }

.plan-hero .matrix-node.root {
  animation: planFloat 3.8s ease-in-out infinite;
}

.plan-hero .matrix-node.filled:nth-child(1) { animation: planFloat 4.4s ease-in-out infinite 0.1s; }
.plan-hero .matrix-node.filled:nth-child(2) { animation: planFloat 4.4s ease-in-out infinite 0.35s; }
.plan-hero .matrix-node.pending { animation: planPulseNode 2.2s ease-in-out infinite; }

@keyframes planReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes planFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes planPulseNode {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.28); }
  50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}

@keyframes planFlowDown {
  from { transform: translateY(0); }
  to { transform: translateY(160%); }
}

@keyframes planLiveDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  55% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
}

@keyframes planProgressBreathe {
  0%, 100% { filter: saturate(1); }
  50% { filter: saturate(1.2); }
}

@keyframes planPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  40% { opacity: 0.65; transform: scale(1.02); }
}

@keyframes planShine {
  0%, 65% { transform: skewX(-20deg) translateX(-180%); }
  100% { transform: skewX(-20deg) translateX(280%); }
}

@keyframes planSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes planOrbit {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

@keyframes planConnectorPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.45); }
  60% { box-shadow: 0 0 0 6px rgba(34, 211, 238, 0); }
}

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

  .plan-step-card:not(:first-child)::before,
  .plan-step-card:not(:first-child)::after {
    display: none;
  }

  .plan-two-col {
    grid-template-columns: 1fr;
  }

  .plan-check-grid {
    grid-template-columns: 1fr;
  }

  .operator-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .plan-kpi-grid {
    grid-template-columns: 1fr;
  }

  .plan-flow-grid {
    grid-template-columns: 1fr;
  }

  /* Operator checklist — tighten surface padding so table has room */
  .plan-surface {
    padding: 1rem 0.85rem;
  }

  /* Allow table header text to wrap so columns don't force wide overflow */
  .plan-table-wrap .data-table th {
    white-space: normal;
    min-width: 70px;
  }

  /* Shrink cell padding and font on mobile */
  .plan-table-wrap .data-table th,
  .plan-table-wrap .data-table td {
    padding: 0.6rem 0.65rem;
    font-size: 0.8rem;
  }

  /* Keep the "Critical item" column readable but constrained */
  .operator-table th:nth-child(2),
  .operator-table td:nth-child(2) {
    min-width: 120px;
  }

  /* Shrink operator card inner padding */
  .operator-card {
    padding: 0.75rem 0.8rem;
  }

  /* FAQ — tighten details padding */
  .faq-pub {
    margin-top: 1.25rem;
  }

  .faq-pub details {
    padding: 0.85rem 0.9rem;
  }

  .faq-pub summary {
    word-break: break-word;
    line-height: 1.45;
  }

  .faq-pub details p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  /* Operator checklist — further reduce on very small screens */
  .plan-surface {
    padding: 0.85rem 0.7rem;
  }

  .plan-table-wrap .data-table th,
  .plan-table-wrap .data-table td {
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Stack operator-cards already collapses at 1080px; keep cards compact */
  .operator-card {
    padding: 0.65rem 0.7rem;
  }

  /* FAQ */
  .faq-pub details {
    padding: 0.75rem 0.8rem;
  }

  .faq-pub summary {
    font-size: 0.9rem;
  }
}

/* Income page */
.income-hero {
  padding-bottom: 2rem;
}

.income-hero-card {
  padding: 1.1rem 1.05rem;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(120% 85% at 100% 0%, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0.03) 48%, rgba(99, 102, 241, 0) 100%),
    linear-gradient(165deg, rgba(23, 26, 40, 0.95) 0%, rgba(15, 17, 27, 0.98) 100%);
}

.income-hero-label {
  margin: 0 0 0.45rem;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(184, 188, 208, 0.9);
}

.income-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.income-hero-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22) 0%, rgba(14, 165, 233, 0.18) 100%);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.26rem 0.55rem;
}

.income-assumption-list {
  display: grid;
  gap: 0.55rem;
}

.income-assumption-item {
  padding: 0.56rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.income-assumption-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.38rem;
  font-size: 0.86rem;
}

.income-assumption-top span {
  color: rgba(197, 202, 226, 0.92);
}

.income-assumption-top strong {
  color: #f8fafc;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.income-assumption-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  overflow: hidden;
}

.income-assumption-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1 0%, #22d3ee 100%);
}

.income-hero-note {
  margin-top: 0.62rem;
  font-size: 0.8rem;
}

.income-page .section-title {
  margin-bottom: 1rem;
}

.income-section-tight {
  padding-top: 1.1rem;
}

.income-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.95rem;
}

.income-kpi-card {
  padding: 1.15rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(28, 31, 47, 0.78) 0%, rgba(17, 19, 30, 0.9) 100%);
}

.income-kpi-label {
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(184, 188, 208, 0.9);
}

.income-kpi-value {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.income-kpi-card .progress {
  margin-bottom: 0.65rem;
}

.income-surface {
  padding: 1.3rem 1.2rem;
}

.income-matrix-pro {
  border-color: rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(79, 70, 229, 0.14) 0%, rgba(79, 70, 229, 0.04) 45%, rgba(79, 70, 229, 0) 100%),
    linear-gradient(165deg, rgba(24, 27, 42, 0.88) 0%, rgba(15, 17, 28, 0.96) 100%);
}

.income-matrix-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: flex-start;
}

.income-matrix-highlight {
  min-width: 188px;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.22) 0%, rgba(14, 165, 233, 0.16) 100%);
  box-shadow: 0 12px 28px rgba(8, 10, 22, 0.32);
}

.income-matrix-highlight__label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: rgba(224, 231, 255, 0.9);
}

.income-matrix-highlight strong {
  display: block;
  margin-top: 0.22rem;
  font-size: 1.26rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.income-matrix-highlight small {
  display: block;
  margin-top: 0.14rem;
}

.income-table-wrap {
  margin-top: 0.8rem;
  margin-bottom: 0.9rem;
}

.income-matrix-table-wrap {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  background: rgba(10, 12, 20, 0.5);
}

.income-scenario-table th:nth-child(n+2),
.income-scenario-table td:nth-child(n+2) {
  text-align: right;
  white-space: nowrap;
}

.income-scenario-table th:first-child,
.income-scenario-table td:first-child {
  white-space: nowrap;
}

.income-scenario-table-pro th:last-child,
.income-scenario-table-pro td:last-child {
  text-align: left;
}

.income-case {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.2rem 0.54rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.income-case--safe {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.36);
}

.income-case--base {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(129, 140, 248, 0.4);
}

.income-case--high {
  color: #fcd7b3;
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(251, 146, 60, 0.4);
}

.income-row-base td {
  background: rgba(99, 102, 241, 0.09);
}

.income-row-base td:first-child {
  position: relative;
}

.income-row-base td:first-child::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #6366f1 0%, #22d3ee 100%);
}

.income-scenario-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.income-calc-shell {
  padding: 1.45rem 1.3rem;
}

.income-calc-studio {
  border: 1px solid rgba(129, 140, 248, 0.3);
  background:
    radial-gradient(100% 100% at 0% 0%, rgba(14, 165, 233, 0.14) 0%, rgba(14, 165, 233, 0) 52%),
    radial-gradient(90% 80% at 100% 0%, rgba(79, 70, 229, 0.16) 0%, rgba(79, 70, 229, 0) 54%),
    linear-gradient(165deg, rgba(26, 29, 44, 0.9) 0%, rgba(16, 18, 30, 0.95) 100%);
}

.income-calc-head-pro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
  align-items: start;
}

.income-formula-card {
  min-width: 260px;
  border-radius: 12px;
  padding: 0.7rem 0.78rem;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: rgba(99, 102, 241, 0.14);
}

.income-formula-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(224, 231, 255, 0.9);
}

.income-formula-card p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.82rem;
}

.income-formula-card p code {
  color: #c7d2fe;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 7px;
  padding: 0.15rem 0.4rem;
}

.income-formula-card p span {
  color: rgba(224, 231, 255, 0.82);
  font-weight: 700;
}

.income-calc-head p code {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.16);
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
}

.income-calc-grid {
  margin-top: 0.95rem;
}

.income-input-card {
  padding: 0.7rem 0.78rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.income-output-card {
  padding: 0.74rem 0.82rem;
  border-radius: 12px;
  border: 1px solid rgba(129, 140, 248, 0.35);
  background: linear-gradient(160deg, rgba(79, 70, 229, 0.2) 0%, rgba(14, 165, 233, 0.16) 100%);
}

.income-calc-result {
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  letter-spacing: -0.03em;
  color: #eef2ff;
  border-color: rgba(199, 210, 254, 0.32);
  background: rgba(2, 6, 23, 0.42);
}

.income-output-note {
  margin-top: 0.38rem;
  display: inline-flex;
  font-size: 0.75rem;
  color: rgba(224, 231, 255, 0.86);
}

.income-calc-foot {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.income-calc-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

@media (max-width: 980px) {
  .income-kpi-grid {
    grid-template-columns: 1fr;
  }

  .income-matrix-head {
    grid-template-columns: 1fr;
  }

  .income-matrix-highlight {
    min-width: 0;
    max-width: 100%;
  }

  .income-calc-head-pro {
    grid-template-columns: 1fr;
  }

  .income-formula-card {
    min-width: 0;
  }

  .income-calc-foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* About page */
.about-hero {
  padding-bottom: 2rem;
}

.about-page .section-title {
  margin-bottom: 0.95rem;
}

.about-section-tight {
  padding-top: 1.1rem;
}

.about-hero-card {
  padding: 1.1rem 1.02rem;
  border: 1px solid rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0.05) 50%, rgba(99, 102, 241, 0) 100%),
    radial-gradient(100% 80% at 0% 100%, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0) 55%),
    linear-gradient(165deg, rgba(24, 27, 42, 0.92) 0%, rgba(15, 17, 27, 0.98) 100%);
  box-shadow: 0 18px 40px rgba(6, 8, 19, 0.36);
}

.about-hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.about-label {
  margin: 0 0 0.56rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(191, 198, 224, 0.9);
}

.about-fact-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.36);
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.24rem 0.56rem;
  white-space: nowrap;
}

.about-fact-focus {
  margin-bottom: 0.58rem;
  padding: 0.7rem 0.74rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.15) 0%, rgba(79, 70, 229, 0.12) 100%);
}

.about-fact-focus p {
  margin: 0;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(191, 198, 224, 0.92);
}

.about-fact-focus strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}

.about-fact-focus span {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.8rem;
  color: rgba(223, 231, 255, 0.86);
}

.about-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.about-fact-item {
  position: relative;
  padding: 0.58rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.about-fact-item i {
  position: absolute;
  top: 0.48rem;
  right: 0.52rem;
  font-style: normal;
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.82);
}

.about-fact-grid span {
  display: block;
  color: rgba(191, 198, 224, 0.9);
  font-size: 0.74rem;
}

.about-fact-grid strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.84rem;
  line-height: 1.3;
}

.about-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.about-kpi-card {
  padding: 1.1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(28, 31, 47, 0.82) 0%, rgba(17, 19, 30, 0.94) 100%);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.about-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(8, 10, 22, 0.3);
}

.about-kpi-head {
  display: flex;
  align-items: center;
  gap: 0.44rem;
  margin-bottom: 0.28rem;
}

.about-kpi-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.76rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(224, 231, 255, 0.95);
}

.about-kpi-label {
  display: inline-flex;
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(184, 188, 208, 0.9);
}

.about-kpi-value {
  margin: 0.35rem 0 0.48rem;
  font-size: 1.16rem;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.about-kpi-chip {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  padding: 0.18rem 0.5rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.about-kpi-card--positioning {
  border-top: 3px solid rgba(99, 102, 241, 0.85);
}

.about-kpi-card--positioning .about-kpi-icon {
  border-color: rgba(99, 102, 241, 0.46);
  background: rgba(99, 102, 241, 0.2);
}

.about-kpi-card--revenue {
  border-top: 3px solid rgba(14, 165, 233, 0.85);
}

.about-kpi-card--revenue .about-kpi-icon {
  border-color: rgba(14, 165, 233, 0.5);
  background: rgba(14, 165, 233, 0.2);
}

.about-kpi-card--discipline {
  border-top: 3px solid rgba(16, 185, 129, 0.85);
}

.about-kpi-card--discipline .about-kpi-icon {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.2);
}

.about-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}

.about-surface {
  padding: 1.25rem 1.15rem;
}

.about-surface-pro {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(165deg, rgba(26, 29, 44, 0.88) 0%, rgba(16, 18, 30, 0.95) 100%);
}

.about-surface--what {
  border-top: 3px solid rgba(99, 102, 241, 0.88);
}

.about-surface--trust {
  border-top: 3px solid rgba(14, 165, 233, 0.88);
}

.about-surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.42rem;
}

.about-surface-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}

.about-surface--trust .about-surface-chip {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
}

.about-surface-lead {
  margin-top: -0.2rem;
  margin-bottom: 0.6rem;
}

.about-surface-meta {
  margin-top: 0.56rem;
}

.about-surface-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.32);
  background: rgba(99, 102, 241, 0.12);
  color: rgba(224, 231, 255, 0.9);
  font-size: 0.74rem;
  padding: 0.22rem 0.56rem;
}

.about-trust-tags {
  margin: 0.58rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.about-trust-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
}

.about-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.about-revenue-pro {
  border: 1px solid rgba(129, 140, 248, 0.28);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(99, 102, 241, 0.14) 0%, rgba(99, 102, 241, 0.03) 45%, rgba(99, 102, 241, 0) 100%),
    linear-gradient(165deg, rgba(24, 29, 44, 0.9) 0%, rgba(15, 19, 30, 0.96) 100%);
}

.about-revenue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.about-revenue-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.38);
  background: rgba(99, 102, 241, 0.16);
  color: #c7d2fe;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.24rem 0.58rem;
  white-space: nowrap;
}

.about-pillar-card {
  padding: 0.9rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.about-pillar-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(71, 85, 105, 0.2);
  color: #dbeafe;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.5rem;
  margin-bottom: 0.42rem;
}

.about-pillar-card--trading {
  border-top: 3px solid rgba(99, 102, 241, 0.88);
}

.about-pillar-card--defi {
  border-top: 3px solid rgba(14, 165, 233, 0.88);
}

.about-pillar-card--service {
  border-top: 3px solid rgba(16, 185, 129, 0.88);
}

.about-pillar-card h3 {
  font-size: 1.05rem;
}

.about-pillar-card .check-list {
  margin-bottom: 0;
}

.about-compliance {
  padding: 1.35rem 1.22rem;
  border: 1px solid rgba(129, 140, 248, 0.32);
}

.about-governance-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.about-governance-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  padding: 0.22rem 0.56rem;
}

.about-governance-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.about-governance-card {
  padding: 0.74rem 0.8rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.about-governance-card h4 {
  font-size: 0.95rem;
}

.about-compliance-tags {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.about-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.34);
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.24rem 0.56rem;
}

.about-confidence {
  padding: 1.35rem 1.22rem;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(14, 165, 233, 0.16) 0%, rgba(14, 165, 233, 0.02) 45%, rgba(14, 165, 233, 0) 100%),
    linear-gradient(165deg, rgba(24, 30, 44, 0.92) 0%, rgba(14, 18, 30, 0.97) 100%);
}

.about-confidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.about-confidence-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  padding: 0.26rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.about-confidence-grid {
  margin-top: 0.85rem;
  margin-bottom: 0.7rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.about-confidence-metrics {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.about-confidence-metrics div {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(14, 165, 233, 0.12);
}

.about-confidence-metrics span {
  display: block;
  font-size: 0.7rem;
  color: rgba(186, 230, 253, 0.9);
}

.about-confidence-metrics strong {
  display: block;
  margin-top: 0.16rem;
  font-size: 0.85rem;
}

.about-confidence-card {
  padding: 0.85rem 0.88rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.about-confidence-card h3 {
  font-size: 1rem;
}

@media (max-width: 1080px) {
  .about-kpi-grid {
    grid-template-columns: 1fr;
  }

  .about-two-col {
    grid-template-columns: 1fr;
  }

  .about-surface-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-pillar-grid {
    grid-template-columns: 1fr;
  }

  .about-revenue-head,
  .about-governance-head {
    flex-direction: column;
  }

  .about-governance-grid {
    grid-template-columns: 1fr;
  }

  .about-confidence-head {
    flex-direction: column;
  }

  .about-confidence-metrics {
    grid-template-columns: 1fr;
  }

  .about-confidence-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .about-hero-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-fact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan-page--animated .plan-fx-reveal,
  .plan-badge-animated::after,
  .plan-btn-glow::after,
  .plan-matrix-demo::before,
  .plan-flow-orbit,
  .plan-step-card::after,
  .plan-hero .matrix-node,
  .matrix-link-flow::after,
  .matrix-live-dot,
  .matrix-progress-fill {
    animation: none !important;
  }

  .plan-page--animated .plan-fx-reveal {
    opacity: 1;
    transform: none;
  }

  body.page-member-app .app-shell,
  body.page-member-app .sidebar,
  body.page-member-app .main-wrap > .topbar,
  body.page-member-app .sidebar-nav-inner > *,
  body.page-member-app .main-content > * {
    animation: none !important;
  }

  body.page-member-app .member-fx-target {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  body.page-member-app .main-content .glass:not(.kpi-inner):hover,
  body.page-member-app .main-content .kpi-inner:hover,
  body.page-member-app .main-content .btn:not(.sidebar-toggle):hover,
  body.page-member-app .topbar .btn:hover,
  body.page-member-app .sidebar-nav a:hover .nav-icon,
  body.page-member-app .sidebar-nav a.active .nav-icon {
    transform: none;
  }
}

/* Public — how it works / investors */
.pub-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.pub-step {
  position: relative;
  padding: 1.5rem 1.25rem 1.5rem 4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(15, 18, 28, 0.6);
}

.pub-step-num {
  position: absolute;
  left: 1.15rem;
  top: 1.35rem;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.45);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-2);
}

.pub-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.pub-step p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.investor-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (max-width: 820px) {
  .investor-split {
    grid-template-columns: 1fr;
  }
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 0.85rem;
}

.faq-pub {
  margin-top: 2rem;
}

.faq-pub details {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  margin-bottom: 0.65rem;
  background: rgba(0, 0, 0, 0.25);
}

.faq-pub summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.faq-pub details[open] summary {
  margin-bottom: 0.65rem;
}

.faq-pub details p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ========== Investor-grade marketing site (pages with pub nav) ========== */
body.page-public:has(.pub-nav) {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

body.page-public:has(.pub-nav) h1,
body.page-public:has(.pub-nav) h2,
body.page-public:has(.pub-nav) h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
}

body.page-public:has(.pub-nav) .hero h1 {
  font-size: clamp(2.125rem, 4.5vw, 3rem);
  line-height: 1.08;
  max-width: 18ch;
}

body.page-public:has(.pub-nav) main h1,
body.page-public:has(.pub-nav) .section-title h1 {
  font-size: clamp(1.75rem, 2.8vw, 2.25rem);
  max-width: none;
}

body.page-public:has(.pub-nav) h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
}

body.page-public:has(.pub-nav)::before {
  background:
    radial-gradient(ellipse 90% 55% at 50% -25%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 10%, rgba(34, 211, 238, 0.08), transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 90%, rgba(139, 92, 246, 0.1), transparent 50%);
}

body.page-public:has(.pub-nav) .pub-nav {
  background: rgba(8, 9, 14, 0.88);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

body.page-public:has(.pub-nav) .logo {
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

body.page-public:has(.pub-nav) .logo-mark {
  border-radius: 11px;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.35);
}

body.page-public:has(.pub-nav) .pub-links a {
  letter-spacing: 0.01em;
}

body.page-public:has(.pub-nav) .pub-links a[aria-current="page"],
body.page-public:has(.pub-nav) .pub-links .nav-active {
  color: #e8eaff;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.24);
  border-color: rgba(129, 140, 248, 0.38);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.12);
}

body.page-public:has(.pub-nav) .pub-actions {
  border-left-color: rgba(255, 255, 255, 0.1);
}

body.page-public:has(.pub-nav) .btn-primary {
  border-radius: 10px;
  padding: 0.7rem 1.35rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

body.page-public:has(.pub-nav) .btn-ghost {
  border-radius: 10px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

body.page-public:has(.pub-nav) .hero {
  padding: 2.75rem 0 3.5rem;
  text-align: left;
}

body.page-public:has(.pub-nav) .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-bottom: 2.5rem;
}

body.page-public:has(.pub-nav) .hero-copy {
  max-width: 560px;
}

body.page-public:has(.pub-nav) .hero-badge {
  margin-bottom: 1rem;
  padding: 0.4rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.28);
  background: rgba(99, 102, 241, 0.1);
}

body.page-public:has(.pub-nav) .hero-lead {
  max-width: 42rem;
  margin: 0 0 1.75rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(184, 189, 207, 0.95);
}

body.page-public:has(.pub-nav) .hero-cta {
  justify-content: flex-start;
  margin-bottom: 0;
  gap: 0.75rem;
}

body.page-public:has(.pub-nav) .hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

body.page-public:has(.pub-nav) .hero-meta strong {
  color: rgba(228, 231, 245, 0.92);
  font-weight: 600;
}

body.page-public:has(.pub-nav) .hero-visual .hero-media,
body.page-public:has(.pub-nav) .hero-media--framed {
  margin: 0;
  max-width: none;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(28, 32, 48, 0.9) 0%, rgba(14, 16, 26, 0.95) 100%);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(99, 102, 241, 0.12) inset;
}

body.page-public:has(.pub-nav) .section {
  padding: 4.5rem 0;
}

body.page-public:has(.pub-nav) .section--muted {
  background: rgba(0, 0, 0, 0.22);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

body.page-public:has(.pub-nav) .section-title {
  margin-bottom: 2.75rem;
}

body.page-public:has(.pub-nav) .section-title p {
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.65;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #818cf8;
  margin: 0 0 0.65rem;
}

body.page-public:has(.pub-nav) .feature-card {
  padding: 1.75rem 1.5rem;
  background: linear-gradient(160deg, rgba(26, 29, 42, 0.85) 0%, rgba(18, 20, 30, 0.72) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

body.page-public:has(.pub-nav) .feature-card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.5rem;
}

body.page-public:has(.pub-nav) .feature-card .text-muted {
  font-size: 0.9375rem;
  line-height: 1.58;
}

.icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-pill--violet {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  border-color: rgba(99, 102, 241, 0.35);
}

.icon-pill--teal {
  background: rgba(34, 211, 238, 0.14);
  color: #a5f3fc;
  border-color: rgba(34, 211, 238, 0.3);
}

.icon-pill--amber {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.28);
}

.allocation-panel {
  padding: 1.5rem;
  margin-bottom: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(165deg, rgba(24, 27, 40, 0.92) 0%, rgba(14, 16, 24, 0.88) 100%);
  box-shadow: var(--shadow);
}

.allocation-panel img {
  display: block;
  width: 100%;
}

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

/* $100 allocation framework (public) */
.allocation-framework {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 0.5rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(155deg, rgba(30, 33, 48, 0.65) 0%, rgba(14, 16, 24, 0.92) 45%, rgba(12, 14, 22, 0.95) 100%),
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(99, 102, 241, 0.14), transparent 55%);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.allocation-framework--compact {
  padding: 1.25rem 1.35rem 1.35rem;
  margin-bottom: 0;
}

.allocation-framework__intro {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
  padding-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 800px) {
  .allocation-framework__intro {
    grid-template-columns: 1fr;
  }
}

.allocation-stack__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(180, 184, 206, 0.85);
  margin-bottom: 0.35rem;
}

.allocation-stack__figure {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  flex-wrap: wrap;
  line-height: 1;
}

.allocation-stack__amount {
  font-family: var(--font-display), var(--font), system-ui, sans-serif;
  font-size: clamp(3.25rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, #fff 30%, #c7d2fe 55%, #67e8f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.allocation-stack__suffix {
  font-size: 1.15rem;
  font-weight: 650;
  color: rgba(212, 214, 230, 0.75);
  letter-spacing: 0.02em;
}

.allocation-stack__note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.allocation-framework__lede {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 36rem;
}

.allocation-meter-wrap {
  margin-bottom: 1.25rem;
}

.allocation-meter {
  display: flex;
  width: 100%;
  height: clamp(48px, 5vw, 58px);
  border-radius: 14px;
  padding: 5px;
  gap: 5px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.35);
}

.allocation-meter__seg {
  min-width: 6px;
  border-radius: 9px;
  transition: filter 0.2s ease, transform 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.allocation-meter__seg:hover {
  filter: brightness(1.08);
}

.allocation-meter__seg--trade {
  background: linear-gradient(180deg, #a5b4fc 0%, #6366f1 45%, #4f46e5 100%);
}

.allocation-meter__seg--defi {
  background: linear-gradient(180deg, #5eead4 0%, #14b8a6 45%, #0d9488 100%);
}

.allocation-meter__seg--reserve {
  background: linear-gradient(180deg, #86efac 0%, #22c55e 40%, #16a34a 100%);
}

.allocation-meter__seg--growth {
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 45%, #d97706 100%);
}

.allocation-meter__seg--ops {
  background: linear-gradient(180deg, #fdba74 0%, #f97316 45%, #ea580c 100%);
}

.allocation-meter__axis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  padding: 0 0.15rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(139, 143, 163, 0.8);
  text-transform: uppercase;
}

.allocation-rail {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.allocation-rail__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem 1rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.2s, border-color 0.2s;
}

.allocation-rail__item:hover {
  background: rgba(255, 255, 255, 0.055);
  border-color: rgba(255, 255, 255, 0.09);
}

.allocation-rail__swatch {
  width: 12px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.allocation-rail--inline {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-bottom: 0;
}

.allocation-rail--inline .allocation-rail__item {
  grid-template-columns: 1fr;
  grid-template-rows: auto auto auto;
  justify-items: center;
  text-align: center;
  flex: 1 1 5.5rem;
  max-width: 8rem;
  padding: 0.65rem 0.45rem 0.75rem;
  gap: 0.35rem;
}

.allocation-rail--inline .allocation-rail__swatch {
  width: 100%;
  max-width: 2.5rem;
  height: 6px;
  margin: 0 auto;
}

.allocation-rail--inline .allocation-rail__name {
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.allocation-rail--inline .allocation-rail__amt {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.allocation-rail__body {
  min-width: 0;
}

.allocation-rail__name {
  display: block;
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
}

.allocation-rail__detail {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.45;
}

.allocation-rail__amt {
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: #e8eaff;
}

.allocation-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 1100px) {
  .allocation-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .allocation-cards {
    grid-template-columns: 1fr;
  }
}

.allocation-card {
  padding: 1.1rem 1.05rem 1.15rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 3px solid;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s, box-shadow 0.2s;
}

.allocation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.allocation-card--trade {
  border-top-color: #818cf8;
}

.allocation-card--defi {
  border-top-color: #2dd4bf;
}

.allocation-card--reserve {
  border-top-color: #4ade80;
}

.allocation-card--growth {
  border-top-color: #fbbf24;
}

.allocation-card--ops {
  border-top-color: #fb923c;
}

.allocation-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.allocation-card__badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8eaff;
}

.allocation-card__title {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.allocation-card__text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
}

body.page-public:has(.pub-nav) .allocation-card__title {
  font-size: 0.98rem;
}

body.page-public:has(.pub-nav) .pub-step {
  background: linear-gradient(165deg, rgba(22, 25, 36, 0.75) 0%, rgba(15, 17, 26, 0.7) 100%);
  border-color: rgba(255, 255, 255, 0.06);
  padding-top: 1.65rem;
  padding-bottom: 1.65rem;
}

body.page-public:has(.pub-nav) .pub-step-num {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.4);
  color: #c4b5fd;
}

body.page-public:has(.pub-nav) .stats-row {
  gap: 1rem;
  margin-top: 2.25rem;
}

body.page-public:has(.pub-nav) .stat-card {
  padding: 1.35rem 1rem;
  background: linear-gradient(180deg, rgba(26, 29, 42, 0.55) 0%, rgba(18, 20, 30, 0.45) 100%);
}

body.page-public:has(.pub-nav) .glass-accent {
  border-radius: var(--radius);
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: linear-gradient(155deg, rgba(40, 44, 70, 0.45) 0%, rgba(20, 22, 35, 0.55) 100%);
  text-align: center;
}

body.page-public:has(.pub-nav) .pub-footer {
  margin-top: 0;
  padding: 2.75rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

body.page-public:has(.pub-nav) .join-popup {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  max-width: 300px;
}

@media (max-width: 960px) {
  body.page-public:has(.pub-nav) .hero {
    text-align: center;
  }

  body.page-public:has(.pub-nav) .hero-layout {
    grid-template-columns: 1fr;
  }

  body.page-public:has(.pub-nav) .hero-copy {
    max-width: none;
    margin-inline: auto;
    order: 1;
  }

  body.page-public:has(.pub-nav) .hero-visual {
    order: 0;
  }

  body.page-public:has(.pub-nav) .hero h1 {
    max-width: none;
    margin-inline: auto;
  }

  body.page-public:has(.pub-nav) .hero-lead {
    margin-inline: auto;
  }

  body.page-public:has(.pub-nav) .hero-cta {
    justify-content: center;
  }

  body.page-public:has(.pub-nav) .hero-meta {
    justify-content: center;
    text-align: left;
  }
}

@supports not selector(:has(*)) {
  body.page-public .hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
  }

  @media (min-width: 961px) {
    body.page-public .hero-layout {
      grid-template-columns: 1fr 1fr;
    }
  }
}

/* Invite & Earn + referral share */
.invite-earn {
  margin-bottom: 1.5rem;
  padding: 1.15rem 1.25rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid rgba(251, 191, 36, 0.45);
  background:
    linear-gradient(180deg, rgba(120, 72, 18, 0.55) 0%, rgba(22, 24, 35, 0.92) 42%),
    var(--bg-card);
  box-shadow: var(--shadow);
}

.invite-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.invite-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #ffc107;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.35), rgba(255, 193, 7, 0.22));
  border: 1px solid rgba(255, 193, 7, 0.35);
  flex-shrink: 0;
}

.invite-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.invite-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.invite-copy {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: center;
  background: rgba(255, 152, 0, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  border-left: 4px solid #ff9800;
  margin-bottom: 0.9rem;
}

.invite-qr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.95rem;
}

.invite-qr {
  text-align: center;
  border-radius: 12px;
  padding: 0.9rem 0.75rem 0.8rem;
}

.invite-qr-left {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.28), rgba(49, 46, 129, 0.35));
  border: 1px solid rgba(129, 140, 248, 0.55);
}

.invite-qr-right {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.22), rgba(6, 78, 59, 0.35));
  border: 1px solid rgba(52, 211, 153, 0.55);
}

.invite-qr-frame {
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  display: inline-flex;
  margin-bottom: 0.55rem;
}

.invite-qr-frame img {
  width: 120px;
  height: 120px;
  display: block;
}

.invite-qr-label {
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
}

.invite-share {
  width: 100%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1rem;
}

.invite-share svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 640px) {
  .invite-qr-row {
    grid-template-columns: 1fr;
  }
}

.kpi-adv.kpi-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .kpi-adv.kpi-3 {
    grid-template-columns: 1fr;
  }
}

.ref-link-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 800px) {
  .ref-link-grid {
    grid-template-columns: 1fr;
  }
}

.ref-side {
  padding: 1.25rem 1.35rem 1.35rem;
}

.ref-side-left {
  border-top: 3px solid #818cf8;
}

.ref-side-right {
  border-top: 3px solid #34d399;
}

.ref-side h3 {
  text-align: center;
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.ref-url {
  text-align: center;
  font-size: 0.82rem;
}

.ref-progress {
  padding: 1.15rem 1.35rem;
  margin-bottom: 1.25rem;
}

.ref-progress-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ref-progress-row .progress {
  flex: 1;
  height: 10px;
}

.ref-progress-row strong {
  min-width: 3rem;
  text-align: right;
  font-size: 0.95rem;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}

.share-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

.share-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.share-btn.wa { color: #34d399; }
.share-btn.tg { color: #22d3ee; }
.share-btn.mail { color: #fbbf24; }
.share-btn.fb { color: #a5b4fc; }
