/* Gsignalx Velocity docs — shared theme tokens + mobile utilities (v2.01) */
:root, [data-theme="dark"] {
  --bg: #0A121E;
  --bg-mid: #0D2D48;
  --bg-elev: #0D2D48;
  --bg-card: #144064;
  --bg-soft: #103A5C;
  --edge: #2D6EA0;
  --edge-soft: #1E4F78;
  --text: #F2F7FC;
  --muted: #A8C4DB;
  --heading-sub: #E8ECF5;
  --gold: #FBA927;
  --gold-dim: #D99212;
  --brand-blue: #469AD4;
  --bull: #16A34A;
  --bear: #DC2626;
  --link: #7EBFE8;
  --header-bg: rgba(10, 18, 30, 0.94);
  --header-edge: rgba(70, 154, 212, 0.35);
  --rail-bg: rgba(18, 22, 30, 0.55);
  --radius: 10px;
  --font: "Segoe UI", "Candara", system-ui, sans-serif;
  --mono: Consolas, "Cascadia Mono", monospace;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F4F8FC;
  --bg-mid: #E8F0F8;
  --bg-elev: #FFFFFF;
  --bg-card: #EEF4FA;
  --bg-soft: #E4EDF6;
  --edge: #8BB4D4;
  --edge-soft: #C5D8E8;
  --text: #0A1F33;
  --muted: #3D5A72;
  --heading-sub: #16324A;
  --gold: #D99212;
  --gold-dim: #B87A0E;
  --brand-blue: #2E7BB0;
  --bull: #15803D;
  --bear: #B91C1C;
  --link: #1E6FA8;
  --header-bg: rgba(244, 248, 252, 0.92);
  --header-edge: rgba(46, 123, 176, 0.28);
  --rail-bg: rgba(255, 255, 255, 0.72);
  color-scheme: light;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.75rem 0;
}
.table-scroll table { min-width: 0; }

.mobile-chapter-wrap {
  display: none;
  width: 100%;
  padding: 0 12px 8px;
}
.mobile-chapter-wrap label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.mobile-chapter-wrap select {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--edge);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .mobile-chapter-wrap { display: block; }
  .brand-text-keep { display: inline !important; font-size: 13px; }
  .header-cta-label { display: none; }
  .header-actions .header-cta { min-width: 44px; min-height: 44px; padding: 8px; }
}
@media (max-width: 480px) {
  .header-actions { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
  .callout.gold code { display: inline-block; max-width: 100%; word-break: break-word; }
  .flow { flex-direction: column; align-items: stretch; }
  .flow .flow-node { width: 100%; }
}
/* Desk community (Telegram channel + group) */
:root, [data-theme="dark"] {
  --cta-community-bg: rgba(70, 154, 212, 0.12);
  --cta-community-hover: rgba(70, 154, 212, 0.22);
  --community-strip-bg: rgba(13, 45, 72, 0.92);
}
[data-theme="light"] {
  --cta-community-bg: rgba(46, 123, 176, 0.10);
  --cta-community-hover: rgba(46, 123, 176, 0.18);
  --community-strip-bg: rgba(232, 240, 248, 0.96);
}

.header-cta.community {
  border-color: rgba(70, 154, 212, 0.55);
  color: var(--brand-blue);
  background: var(--cta-community-bg);
}
.header-cta.community:hover {
  background: var(--cta-community-hover);
  color: var(--link);
  text-decoration: none;
}
.header-cta.community .cm-short { display: none; }

.gsx-community-strip {
  position: sticky;
  top: var(--header-h, 56px);
  z-index: 40;
  background: var(--community-strip-bg);
  border-bottom: 1px solid var(--header-edge);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.gsx-community-strip[hidden] { display: none !important; }
.gsx-community-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px;
}
.gsx-community-strip-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.gsx-community-dual {
  margin: 1rem 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--brand-blue) 40%, transparent);
  background: color-mix(in srgb, var(--bg-card) 85%, transparent);
}
.gsx-community-lead {
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.gsx-community-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.gsx-community-actions.compact { gap: 6px; }
.gsx-community-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.gsx-community-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.gsx-community-btn.channel {
  color: var(--brand-blue);
  border-color: rgba(70, 154, 212, 0.55);
  background: var(--cta-community-bg);
}
.gsx-community-btn.channel:hover {
  background: var(--cta-community-hover);
  color: var(--link);
  text-decoration: none;
}
.gsx-community-btn.channel.primary {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 14%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent);
  font-size: 13px;
}
.gsx-community-btn.channel.primary:hover {
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  color: var(--gold);
  text-decoration: none;
}
.gsx-community-btn.group {
  color: var(--muted);
  border-color: var(--edge-soft);
  background: transparent;
}
.gsx-community-btn.group:hover {
  color: var(--text);
  border-color: var(--edge);
  background: color-mix(in srgb, var(--bg-soft) 80%, transparent);
  text-decoration: none;
}
.gsx-community-btn.group.secondary {
  opacity: 0.92;
}
.gsx-community-btn.whatsapp {
  color: #1f8f5f;
  border-color: rgba(37, 211, 102, 0.55);
  background: color-mix(in srgb, #25d366 12%, transparent);
}
.gsx-community-btn.whatsapp:hover {
  color: #157a4f;
  border-color: rgba(37, 211, 102, 0.8);
  background: color-mix(in srgb, #25d366 20%, transparent);
  text-decoration: none;
}
.gsx-community-dual.channel-primary .gsx-community-lead {
  border-left: 3px solid var(--gold);
  padding-left: 10px;
}
.gsx-community-btn.more {
  color: var(--muted);
  border-color: var(--edge-soft);
  background: transparent;
  flex-direction: row;
  align-items: center;
}
.gsx-community-btn.more:hover {
  color: var(--text);
  border-color: var(--edge);
  text-decoration: none;
}
.gsx-community-hint {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: none;
}
.gsx-community-actions.compact .gsx-community-btn {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 11.5px;
  flex-direction: row;
}

@media (max-width: 900px) {
  .header-cta.community .cm-full { display: none; }
  .header-cta.community .cm-short { display: inline; }
  .gsx-community-strip-inner { padding: 8px 12px; }
}
@media (max-width: 480px) {
  .gsx-community-btn { flex: 1 1 calc(50% - 4px); }
  .gsx-community-btn.more { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
