/* ============================================================================
   KuruTrading Portal — Design System & Layout Stylesheet
   Static Cloudflare Pages · Dark Institutional Fintech + Light Mode Toggle
   ============================================================================ */

:root {
  /* Dark institutional palette aligned with KuruTrading terminal/PWA */
  --bg-canvas: #0d111a;
  --bg-base: #131722;
  --bg-surface: #171c28;
  --bg-surface-raised: #1e2433;
  --bg-surface-subtle: #141924;
  --bg-header: rgba(13, 17, 26, 0.86);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.22);

  --text-primary: #eef1f6;
  --text-secondary: #a6b0c3;
  --text-muted: #7b869a;

  --accent-emerald: #2ebd85;
  --accent-emerald-hover: #25a371;
  --accent-emerald-soft: rgba(46, 189, 133, 0.12);
  --accent-emerald-ink: #071912;

  --accent-blue: #4c8dff;
  --accent-blue-soft: rgba(76, 141, 255, 0.12);

  --accent-amber: #e5a910;
  --accent-amber-soft: rgba(229, 169, 16, 0.11);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 10px 28px -8px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 24px 56px -16px rgba(0, 0, 0, 0.65), 0 6px 18px rgba(0, 0, 0, 0.35);
  --surface-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.045);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --container-max: 1180px;
  --header-height: 70px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg-canvas: #f5f7fb;
  --bg-base: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-raised: #eef2f7;
  --bg-surface-subtle: #f8fafd;
  --bg-header: rgba(255, 255, 255, 0.88);

  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-medium: rgba(15, 23, 42, 0.16);
  --border-strong: rgba(15, 23, 42, 0.24);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --accent-emerald: #138a5e;
  --accent-emerald-hover: #0f724d;
  --accent-emerald-soft: rgba(19, 138, 94, 0.10);
  --accent-emerald-ink: #ffffff;

  --accent-blue: #2563eb;
  --accent-blue-soft: rgba(37, 99, 235, 0.10);

  --accent-amber: #a16207;
  --accent-amber-soft: rgba(161, 98, 7, 0.09);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 28px -10px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 52px -16px rgba(15, 23, 42, 0.16), 0 6px 16px rgba(15, 23, 42, 0.06);
  --surface-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  background-image: radial-gradient(ellipse 80% 42% at 50% -10%, rgba(46, 189, 133, 0.08), transparent 65%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

[data-theme="light"] body {
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(19, 138, 94, 0.06), transparent 65%);
}

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

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.18s var(--ease-out);
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--accent-emerald);
  color: var(--accent-emerald-ink);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 16px;
}

.mono {
  font-family: var(--font-mono);
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ---------- Layout Container & Sections ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 28px;
  }
}

.section {
  padding: 68px 0;
  border-top: 1px solid var(--border-subtle);
}

.section--first {
  border-top: 0;
}

.section--alt {
  background-color: var(--bg-surface-subtle);
}

@media (min-width: 900px) {
  .section {
    padding: 92px 0;
  }
}

.section-head {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-emerald);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent-emerald);
  border-radius: 2px;
}

.section-head--center .eyebrow::before {
  display: none;
}

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text-primary);
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.09;
  letter-spacing: -0.032em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.15;
  letter-spacing: -0.028em;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.lead {
  margin: 16px 0 0;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.brand-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
  padding-left: 10px;
  border-left: 1px solid var(--border-medium);
  display: none;
}

@media (min-width: 1040px) {
  .brand-sub {
    display: inline-block;
  }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 960px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-desktop a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-desktop a:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

.lang-switch a, .lang-switch span {
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.2;
}

.lang-switch a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.lang-switch .is-active {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  border-color: var(--border-medium);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.mobile-menu-btn {
  display: inline-flex;
}

@media (min-width: 960px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(5, 8, 14, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease-out), visibility 0.22s var(--ease-out);
}

.mobile-drawer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-panel {
  width: min(320px, 86vw);
  height: 100%;
  background: var(--bg-base);
  border-left: 1px solid var(--border-subtle);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.24s var(--ease-out);
  overflow-y: auto;
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-list a {
  padding: 12px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.98rem;
}

.mobile-nav-list a:hover {
  background: var(--bg-surface-raised);
  text-decoration: none;
}

.mobile-drawer-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease-out), background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.btn.header-cta {
  display: none;
}

@media (min-width: 768px) {
  .btn.header-cta {
    display: inline-flex;
  }
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent-emerald);
  color: var(--accent-emerald-ink);
}

.btn--primary:hover {
  background: var(--accent-emerald-hover);
}

.btn--secondary {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn--secondary:hover {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-subtle);
}

.btn--ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
}

.btn--coming {
  width: 100%;
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
  padding: 12px 16px;
}

.btn--coming:hover {
  background: var(--accent-emerald);
  color: var(--accent-emerald-ink);
  border-color: var(--accent-emerald);
}

.btn--coming-featured {
  width: 100%;
  background: var(--accent-emerald);
  color: var(--accent-emerald-ink);
  border: 1px solid var(--accent-emerald);
  padding: 12px 16px;
}

.btn--coming-featured:hover {
  background: var(--accent-emerald-hover);
  border-color: var(--accent-emerald-hover);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn--lg {
  padding: 13px 22px;
  font-size: 0.98rem;
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 52px 0 64px;
}

@media (min-width: 960px) {
  .hero {
    padding: 76px 0 88px;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.08fr 0.92fr;
    gap: 44px;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.hero-stat-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.hero-stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 3px;
}

/* Hero Technical Inspector Mockup (Strict Software View, Zero P&L) */
.inspector-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), var(--surface-sheen);
  overflow: hidden;
}

.inspector-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--bg-surface-raised);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

.inspector-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inspector-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.inspector-title {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-weight: 600;
  flex-shrink: 0;
}

.inspector-body {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.inspector-group-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

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

.param-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 10px 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}

@media (min-width: 520px) {
  .param-row {
    flex-direction: row;
    align-items: center;
  }
}

.param-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.param-val {
  font-family: var(--font-mono);
  font-size: 0.79rem;
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.console-box {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

.console-line {
  display: flex;
  gap: 10px;
}

.console-ts {
  color: var(--text-muted);
  flex-shrink: 0;
}

.console-ok {
  color: var(--accent-emerald);
}

.console-info {
  color: var(--accent-blue);
}

/* Compliance Notice Strip */
.compliance-strip {
  margin-top: 28px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.compliance-strip svg {
  width: 18px;
  height: 18px;
  color: var(--accent-amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.compliance-strip strong {
  color: var(--text-primary);
}

/* ---------- Feature & Architecture Grid ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 720px) {
  .cards-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm), var(--surface-sheen);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), var(--surface-sheen);
}

.feature-index {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-emerald);
  margin-bottom: 12px;
}

.feature-card h3 {
  margin-bottom: 10px;
}

.feature-card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- Technical Tabs ---------- */
.tabs-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md), var(--surface-sheen);
  overflow: hidden;
}

.tabs-bar {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px;
  gap: 6px;
}

.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
}

.tab-btn[aria-selected="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-sm);
}

.tab-panel {
  padding: 26px 22px;
}

@media (min-width: 768px) {
  .tab-panel {
    padding: 34px 32px;
  }
}

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

.spec-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 860px) {
  .spec-layout {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
  }
}

.spec-copy p {
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.spec-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.spec-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  margin-top: 9px;
  flex-shrink: 0;
}

.spec-list strong {
  color: var(--text-primary);
}

.kv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.kv-table tr {
  border-bottom: 1px solid var(--border-subtle);
}

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

.kv-table th, .kv-table td {
  padding: 11px 4px;
  text-align: left;
  vertical-align: top;
}

.kv-table th {
  color: var(--text-muted);
  font-weight: 500;
  width: 46%;
  padding-right: 14px;
}

.kv-table td {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.83rem;
}

/* ---------- Pricing Section ---------- */
.billing-switch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.billing-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  gap: 4px;
}

.billing-opt {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.billing-opt.is-active {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.save-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

.billing-caption {
  font-size: 0.86rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 680px;
}

/* 5-plan responsive balanced grid: 1 col mobile, 2 col tablet, 3 + 2 centered on desktop */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 680px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
  }
  .plan-card:nth-child(1) { grid-column: 1 / span 2; }
  .plan-card:nth-child(2) { grid-column: 3 / span 2; }
  .plan-card:nth-child(3) { grid-column: 5 / span 2; }
  .plan-card:nth-child(4) { grid-column: 2 / span 2; }
  .plan-card:nth-child(5) { grid-column: 4 / span 2; }
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm), var(--surface-sheen);
  transition: transform 0.2s var(--ease-out), border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), var(--surface-sheen);
}

.plan-card--featured {
  background: var(--bg-surface-raised);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md), var(--surface-sheen);
}

.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.plan-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.plan-cap {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.plan-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.plan-badge--trial {
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
}

.plan-badge--direct {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.plan-price-block {
  margin-top: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-amount {
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.plan-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.plan-alt-price {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.plan-tax-note {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.plan-trial-box {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  line-height: 1.48;
  background: var(--accent-emerald-soft);
  color: var(--text-primary);
}

.plan-trial-box--muted {
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.plan-features {
  list-style: none;
  margin: 16px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.plan-features svg {
  width: 15px;
  height: 15px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 3px;
}

.plan-cta-wrap {
  margin-top: auto;
}

.plan-cta-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Pricing Summary & Compliance Disclosure Box */
.pricing-table-wrap {
  margin-top: 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pricing-table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 680px;
}

.data-table thead th {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table tbody td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

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

.data-table tbody td:first-child {
  font-weight: 700;
  color: var(--text-primary);
}

.disclosure-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 22px;
}

@media (min-width: 820px) {
  .disclosure-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.disclosure-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.disclosure-box h3 {
  font-size: 0.98rem;
  margin-bottom: 8px;
}

.disclosure-box p {
  margin: 0;
}

.disclosure-box p + p {
  margin-top: 8px;
}

/* ---------- Deterministic Risk & Capital Cap Simulator ---------- */
.simulator-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 26px 22px;
  box-shadow: var(--shadow-md), var(--surface-sheen);
}

@media (min-width: 768px) {
  .simulator-card {
    padding: 34px 32px;
  }
}

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

@media (min-width: 860px) {
  .sim-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-range {
  width: 100%;
  accent-color: var(--accent-emerald);
  cursor: pointer;
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.sim-results {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.sim-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.sim-result-row:first-child {
  padding-top: 0;
}

.sim-result-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.sim-k {
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.sim-v {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

.sim-v--accent {
  color: var(--accent-emerald);
}

.sim-cap-alert {
  margin-top: 14px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--accent-blue-soft);
  color: var(--text-primary);
  font-size: 0.82rem;
  line-height: 1.5;
}

.sim-disclaimer {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---------- Steps / Installation Flow ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1080px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm), var(--surface-sheen);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-emerald-soft);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 1.02rem;
  margin-bottom: 8px;
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.58;
}

/* ---------- FAQ Accordion ---------- */
.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.16s ease;
}

.faq-item.is-open {
  border-color: var(--border-medium);
}

.faq-trigger {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-trigger:hover {
  background: var(--bg-surface-subtle);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s var(--ease-out);
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  color: var(--accent-emerald);
}

.faq-panel {
  padding: 0 20px 18px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.faq-panel[hidden] {
  display: none;
}

.faq-panel p {
  margin: 0;
}

.faq-panel p + p {
  margin-top: 10px;
}

/* ---------- Legal Document Layout ---------- */
.legal-hero {
  padding: 46px 0 32px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
}

.legal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.legal-meta {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.legal-body {
  padding: 44px 0 76px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 960px) {
  .legal-layout {
    grid-template-columns: 240px 1fr;
    gap: 44px;
  }
}

.legal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 960px) {
  .legal-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 24px);
    align-self: start;
  }
}

.legal-sidebar-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 0 10px;
}

.legal-sidebar a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.legal-sidebar a:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  text-decoration: none;
}

.legal-sidebar a.is-current {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
}

.legal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .legal-content {
    padding: 40px 42px;
  }
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 30px;
  margin-bottom: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.legal-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-content h3 {
  font-size: 1.03rem;
  margin-top: 20px;
  margin-bottom: 8px;
}

.legal-content p, .legal-content li {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

.legal-content ul, .legal-content ol {
  margin: 10px 0 14px;
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 6px;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-callout {
  margin: 18px 0;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-medium);
  font-size: 0.9rem;
}

.legal-callout--warn {
  background: var(--accent-amber-soft);
  border-color: var(--border-medium);
}

.placeholder-token {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-subtle);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-base);
  border-top: 1px solid var(--border-subtle);
  padding: 56px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
  }
}

.footer-desc {
  margin: 14px 0 0;
  font-size: 0.87rem;
  color: var(--text-secondary);
  max-width: 340px;
  line-height: 1.62;
}

.footer-col h3 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 0.88rem;
}

.footer-links a, .footer-links button {
  color: var(--text-secondary);
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.footer-links a:hover, .footer-links button:hover {
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-risk {
  margin-top: 38px;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.footer-risk strong {
  color: var(--text-secondary);
}

.footer-bottom {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Modal (Pre-Checkout "Próximamente" & Cookie Settings) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background: rgba(5, 8, 14, 0.76);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-subtitle {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.modal-body {
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.modal-summary {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.modal-summary-k {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  color: var(--text-muted);
}

.modal-summary-v {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

.modal-notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.83rem;
  line-height: 1.55;
}

.modal-notice strong {
  color: var(--text-primary);
}

.modal-foot {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Cookie Consent Banner & Toggles ---------- */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 130;
  max-width: 960px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cookie-banner[hidden] {
  display: none;
}

@media (min-width: 820px) {
  .cookie-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
  }
}

.cookie-copy {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.cookie-copy strong {
  color: var(--text-primary);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-cat {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
}

.cookie-cat h4 {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.cookie-cat p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.18s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.18s var(--ease-out);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent-emerald);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ---------- Subtle Scroll Reveal ---------- */
.reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}

.js-ready .reveal {
  opacity: 0;
  transform: translateY(14px);
}

.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-ready .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
