/* =========================================================================
   PROMETATRADER · Documentation page
   Layout-specific styles. Inherits palette + cards from ../style.css
   ========================================================================= */

.docs-body {
  /* Override default body to use sidebar layout */
  background: var(--bg);
}

/* =====================================================
   LAYOUT — fixed sidebar + scrollable content
   ===================================================== */
.docs-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 75px; /* clear fixed top nav */
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* =====================================================
   SIDEBAR — fixed, scrollable internally
   ===================================================== */
.docs-sidebar {
  position: sticky;
  top: 75px;
  align-self: start;
  height: calc(100vh - 75px);
  padding: 24px 8px 24px 24px;
  overflow: hidden;
  border-right: 1px solid rgba(0, 234, 255, 0.14);
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%,
      rgba(0, 234, 255, 0.04) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(8, 6, 12, 0.85), rgba(4, 4, 10, 0.92));
  backdrop-filter: blur(8px);
}

.docs-sidebar-inner {
  height: 100%;
  overflow-y: auto;
  padding-right: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 234, 255, 0.4) transparent;
}
.docs-sidebar-inner::-webkit-scrollbar { width: 6px; }
.docs-sidebar-inner::-webkit-scrollbar-thumb {
  background: rgba(0, 234, 255, 0.4);
  border-radius: 3px;
}
.docs-sidebar-inner::-webkit-scrollbar-track { background: transparent; }

.docs-sidebar-title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(0, 234, 255, 0.3);
}

/* =====================================================
   SEARCH
   ===================================================== */
.docs-search {
  position: relative;
  margin-bottom: 22px;
}
.docs-search input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: rgba(10, 8, 14, 0.8);
  border: 1px solid rgba(0, 234, 255, 0.22);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.docs-search input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 234, 255, 0.15);
}
.docs-search input::placeholder { color: var(--text-quiet); }

.docs-search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cyan);
  font-size: 18px;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
}

.docs-search-empty {
  display: none;
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  background: rgba(10, 8, 14, 0.5);
  border-radius: 6px;
  border: 1px dashed rgba(0, 234, 255, 0.18);
}
.docs-search-empty.show { display: block; }

/* =====================================================
   NAV LINKS
   ===================================================== */
.docs-nav { display: flex; flex-direction: column; gap: 2px; }

.docs-nav-group {
  margin-bottom: 14px;
}
.docs-nav-group.is-hidden { display: none; }

.docs-nav-heading {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  color: var(--text-dim);
  font-weight: 700;
  padding: 8px 10px 6px;
  border-bottom: 1px solid rgba(0, 234, 255, 0.10);
  margin-bottom: 4px;
}

.docs-nav-link {
  display: block;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.docs-nav-link:hover {
  color: var(--cyan);
  background: rgba(0, 234, 255, 0.04);
  border-left-color: rgba(0, 234, 255, 0.45);
}
.docs-nav-link.is-active {
  color: var(--cyan);
  background: rgba(0, 234, 255, 0.08);
  border-left-color: var(--cyan);
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.25);
}
.docs-nav-link.is-hidden { display: none; }

/* Attention link — for items the user MUST read (e.g. "Read this first").
   Subtle pulsing dot + slightly stronger weight so it doesn't get skipped. */
.docs-nav-link-attention {
  font-weight: 700;
  color: var(--cyan);
  position: relative;
  padding-right: 22px;
}
.docs-nav-link-attention::after {
  content: '';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 234, 255, 0.6);
  animation: attentionPulse 2.4s ease-in-out infinite;
}
@keyframes attentionPulse {
  0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(0.85); }
  50%      { opacity: 1;   transform: translateY(-50%) scale(1.15); }
}

/* Highlight matched text on search */
.docs-nav-link mark {
  background: rgba(0, 234, 255, 0.25);
  color: var(--cyan);
  padding: 0 2px;
  border-radius: 2px;
}

/* =====================================================
   CONTENT
   ===================================================== */
.docs-content {
  padding: 32px 56px 100px;
  min-width: 0; /* prevent grid overflow */
}

.docs-header {
  margin-bottom: 42px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(0, 234, 255, 0.14);
}
.docs-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--cyan);
  margin-bottom: 12px;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.4);
}
.docs-title {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 234, 255, 0.3);
}

/* =====================================================
   SECTIONS
   ===================================================== */
.docs-section { margin-bottom: 36px; scroll-margin-top: 95px; }
.docs-section-divider {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid rgba(0, 234, 255, 0.12);
}
.docs-h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

/* "Read this first" — special gradient treatment matching the nav tagline,
   so it stands out as the heading the user MUST read. */
#overview .docs-h2 {
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 50%, var(--magenta) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 234, 255, 0.25))
          drop-shadow(0 0 28px rgba(255, 30, 154, 0.18));
}
.docs-section-intro {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 8px;
  max-width: 820px;
}

.docs-h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--cyan);
  margin: 28px 0 10px;
  letter-spacing: -0.005em;
  text-shadow: 0 0 10px rgba(0, 234, 255, 0.2);
}

/* =====================================================
   CRITICAL BLOCK — for points that need to NOT be skipped.
   Used in "Execution quality: the factor that decides everything".
   ===================================================== */
.critical-block {
  margin: 28px 0 32px;
  padding: 28px 30px 24px;
  background:
    radial-gradient(ellipse 100% 35% at 50% 0%,
      rgba(255, 215, 0, 0.10) 0%,
      rgba(255, 184, 0, 0.04) 35%,
      transparent 70%),
    linear-gradient(160deg, rgba(14, 10, 4, 0.96), rgba(8, 5, 2, 0.98));
  border: 1px solid var(--gold-deep);
  border-radius: 14px;
  position: relative;
  box-shadow:
    0 0 32px rgba(255, 184, 0, 0.10),
    inset 0 1px 0 rgba(255, 215, 0, 0.08);
}
.critical-block::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold), var(--gold-bright));
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.4);
}

.critical-block-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1a0f00;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}

.critical-block-title {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 14px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}

.critical-block-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px dashed rgba(184, 134, 11, 0.22);
}
.critical-block-lead strong { color: var(--text); font-weight: 700; }
.critical-block-lead em { color: var(--gold); font-style: normal; font-weight: 600; }

.critical-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 28px;
  margin-bottom: 22px;
}

.critical-item {
  position: relative;
  padding-left: 0;
}
.critical-item-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold);
  background: rgba(255, 215, 0, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.35);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}
.critical-item h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.3;
}
.critical-item p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 10px;
}
.critical-item p:last-child { margin-bottom: 0; }
.critical-item p strong { color: var(--text); font-weight: 700; }
.critical-item p em {
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.critical-block-conclusion {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px dashed rgba(184, 134, 11, 0.22);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-muted);
  font-style: italic;
}
.critical-block-conclusion strong { color: var(--gold); font-style: normal; font-weight: 700; }

@media (max-width: 900px) {
  .critical-grid { grid-template-columns: 1fr; gap: 22px; }
  .critical-block { padding: 24px 22px 22px; }
}

/* =====================================================
   LEVERAGE COMPATIBILITY CARDS
   ===================================================== */
.leverage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 18px 0 22px;
}

.leverage-card {
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-top: 3px solid;
  border-radius: 12px;
  overflow: hidden;
}

.lev-card-head {
  padding: 18px 22px 14px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.18);
}
.lev-card-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 4px;
  line-height: 1.25;
  /* Reserve two lines so the dashed divider lines up across all cards,
     even when a name fits on a single line. */
  min-height: 2.5em;
}
.lev-card-risk {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.lev-card-body {
  padding: 18px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.lev-card-min {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.lev-card-min-label {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-dim);
  font-weight: 700;
}
.lev-card-min-value {
  font-family: var(--mono);
  font-size: clamp(22px, 2.2vw, 27px);
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 14px rgba(0, 234, 255, 0.25);
  white-space: nowrap;
}

.lev-card-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid;
}
.lev-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lev-status-ok {
  color: var(--green);
  background: rgba(34, 197, 94, 0.06);
  border-color: rgba(34, 197, 94, 0.30);
}
.lev-status-ok .lev-status-dot {
  background: var(--green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}
.lev-status-warn {
  color: var(--yellow);
  background: rgba(234, 179, 8, 0.06);
  border-color: rgba(234, 179, 8, 0.32);
}
.lev-status-warn .lev-status-dot {
  background: var(--yellow);
  box-shadow: 0 0 8px rgba(234, 179, 8, 0.5);
}

.lev-card-note {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* Per-card top-border colors (matches diversification cards) */
.lev-card-conservative { border-top-color: var(--green); }
.lev-card-conservative .lev-card-risk { color: var(--green); }

.lev-card-standard { border-top-color: var(--violet); }
.lev-card-standard .lev-card-risk { color: var(--violet); }
.lev-card-standard .lev-card-min-value { color: var(--violet); text-shadow: 0 0 14px rgba(168, 85, 247, 0.3); }

.lev-card-high { border-top-color: var(--magenta); }
.lev-card-high .lev-card-risk { color: var(--magenta); }
.lev-card-high .lev-card-min-value { color: var(--magenta); text-shadow: 0 0 14px rgba(255, 30, 154, 0.3); }

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

.docs-section p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 820px;
}

.docs-section p strong { color: var(--text); font-weight: 700; }

/* =====================================================
   PARAM CARDS (warm-dark + gold-kiss matching home page)
   ===================================================== */
.param-card {
  margin-bottom: 18px;
  padding: 22px 24px 20px;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%,
      rgba(168, 85, 247, 0.06) 0%,
      rgba(255, 30, 154, 0.02) 40%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 12px;
  scroll-margin-top: 95px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.param-card:hover {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.10);
}
.param-card:target {
  border-color: var(--violet);
  box-shadow:
    0 0 28px rgba(168, 85, 247, 0.20),
    inset 0 1px 0 rgba(168, 85, 247, 0.10);
}
.param-card.is-hidden { display: none; }

.param-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.15);
}
.param-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--violet);
  letter-spacing: -0.005em;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}
.param-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.param-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid;
}
.tag-bool   { color: var(--cyan);    border-color: rgba(0, 234, 255, 0.3); background: rgba(0, 234, 255, 0.06); }
.tag-int    { color: var(--violet);  border-color: rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.06); }
.tag-double { color: var(--magenta); border-color: rgba(255, 30, 154, 0.3); background: rgba(255, 30, 154, 0.06); }
.tag-string { color: var(--text-muted); border-color: var(--border); background: rgba(15, 16, 38, 0.4); }
.tag-enum   { color: var(--gold-bright); border-color: rgba(255, 184, 0, 0.35); background: rgba(255, 215, 0, 0.06); }
.tag-color  { color: #fff; border-color: rgba(255, 255, 255, 0.25); background: linear-gradient(90deg, rgba(0, 234, 255, 0.15), rgba(168, 85, 247, 0.15), rgba(255, 30, 154, 0.15)); }

.param-default {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.param-default strong {
  color: var(--text);
  font-weight: 700;
}

.param-desc {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.param-desc strong { color: var(--text); }

.param-section {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(168, 85, 247, 0.08);
}
.param-section h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 8px;
}
.param-section p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 8px;
}

/* =====================================================
   LISTS
   ===================================================== */
.docs-ul, .docs-ol, .docs-checklist {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.7;
  padding-left: 24px;
  margin-bottom: 14px;
}
.docs-ul li, .docs-ol li, .docs-checklist li { margin-bottom: 6px; }
.docs-ul li strong, .docs-ol li strong, .docs-checklist li strong { color: var(--text); }

.docs-checklist { list-style: none; padding-left: 4px; }
.docs-checklist li {
  position: relative;
  padding-left: 28px;
}
.docs-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--green);
  font-weight: 800;
  font-size: 16px;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.docs-ul-warnings li {
  position: relative;
  list-style: none;
  padding-left: 22px;
}
.docs-ul-warnings { padding-left: 0; }
.docs-ul-warnings li::before {
  content: '⚠';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--yellow);
  font-size: 14px;
}

/* =====================================================
   CALLOUTS
   ===================================================== */
.callout {
  margin: 16px 0;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  border-left: 3px solid;
}
.callout strong { color: var(--text); }
.callout-info {
  background: rgba(0, 234, 255, 0.05);
  border-color: var(--cyan);
  color: var(--text-muted);
}
.callout-warning {
  background: rgba(234, 179, 8, 0.06);
  border-color: var(--yellow);
  color: var(--text-muted);
}
.callout-danger {
  background: rgba(239, 68, 68, 0.07);
  border-color: var(--red);
  color: var(--text-muted);
}

/* Inline code */
.docs-content code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(168, 85, 247, 0.10);
  color: var(--violet);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(168, 85, 247, 0.18);
}

/* Anchor links */
.docs-content a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 234, 255, 0.4);
  transition: color 0.15s, border-color 0.15s;
}
.docs-content a:hover {
  color: var(--magenta);
  border-bottom-color: var(--magenta);
}

/* =====================================================
   PRESET STYLE GRID
   ===================================================== */
.preset-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.preset-style-card {
  padding: 22px 22px 18px;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-top: 3px solid;
  border-radius: 12px;
}
.preset-style-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.preset-style-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.25;
  /* Reserve two lines and carry the dashed divider, so the line aligns
     across all cards even when a name fits on a single line. */
  min-height: 60px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.18);
}
.preset-style-risk {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.18);
}
.preset-style-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Color-coded by risk level — consistent with diversification cards */
.preset-style-low { border-top-color: var(--green); }
.preset-style-low .preset-style-tag,
.preset-style-low .preset-style-risk { color: var(--green); }

.preset-style-medium { border-top-color: var(--cyan); }
.preset-style-medium .preset-style-tag,
.preset-style-medium .preset-style-risk { color: var(--cyan); }

.preset-style-high { border-top-color: var(--magenta); }
.preset-style-high .preset-style-tag,
.preset-style-high .preset-style-risk { color: var(--magenta); }

/* =====================================================
   KEY NOTE — premium glassy card for "Important" highlights.
   Same visual language as leverage cards / critical-block but smaller.
   Replaces flat callout-warning where the note deserves more weight.
   ===================================================== */
.key-note {
  margin: 22px 0 16px;
  padding: 18px 22px 16px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%,
      rgba(168, 85, 247, 0.08) 0%,
      rgba(255, 30, 154, 0.03) 40%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-top: 2px solid var(--violet);
  border-radius: 10px;
  box-shadow:
    0 0 22px rgba(168, 85, 247, 0.08),
    inset 0 1px 0 rgba(168, 85, 247, 0.05);
}
.key-note-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}
.key-note p {
  font-size: 14.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}
.key-note p strong { color: var(--text); font-weight: 700; }

/* =====================================================
   10 ESSENTIALS — top-tips cards, each links to a section
   ===================================================== */
.essentials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 22px 0 8px;
}
.essential-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px 16px;
  background:
    radial-gradient(ellipse 100% 60% at 0% 0%,
      rgba(168, 85, 247, 0.07) 0%,
      transparent 70%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-left: 3px solid var(--violet);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}
.essential-card:hover {
  border-color: var(--magenta);
  border-left-color: var(--magenta);
  background:
    radial-gradient(ellipse 100% 60% at 0% 0%,
      rgba(168, 85, 247, 0.12) 0%,
      transparent 70%),
    linear-gradient(160deg, rgba(12, 8, 16, 0.96), rgba(7, 5, 10, 0.98));
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.14);
}
.essential-num {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 900;
  color: var(--violet);
  letter-spacing: -0.5px;
  line-height: 1;
  padding-top: 2px;
  text-shadow: 0 0 12px rgba(168, 85, 247, 0.45);
  min-width: 32px;
}
.essential-body {
  flex: 1;
  min-width: 0;
}
.essential-body h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.essential-card:hover .essential-body h3 {
  color: var(--cyan);
}
.essential-body p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

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

/* =====================================================
   BACK TO TOP — floating button, gold, appears on scroll
   ===================================================== */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1.5px solid rgba(168, 85, 247, 0.6);
  border-radius: 50%;
  background: linear-gradient(160deg, var(--violet) 0%, var(--magenta) 100%);
  color: #fff;
  cursor: pointer;
  font-family: var(--mono);
  box-shadow:
    0 6px 22px rgba(168, 85, 247, 0.35),
    0 0 28px rgba(255, 30, 154, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.30);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s,
              box-shadow 0.2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s,
              box-shadow 0.2s ease;
}
.back-to-top:hover {
  box-shadow:
    0 8px 30px rgba(168, 85, 247, 0.55),
    0 0 40px rgba(255, 30, 154, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.40);
  transform: translateY(-2px);
}
.btt-arrow {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.btt-label {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

@media (max-width: 640px) {
  .back-to-top {
    bottom: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
  }
  .btt-arrow { font-size: 16px; }
}

/* =====================================================
   DIVERSIFICATION GRID (3 risk-profile cards)
   ===================================================== */
.diversification-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0 24px;
}
.diversification-card {
  padding: 22px 22px 18px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 12px;
  position: relative;
  border-top: 3px solid;
}
.div-card-tag {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-weight: 800;
  margin-bottom: 12px;
}
.div-card-amount {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--text);
  line-height: 1;
  margin-bottom: 4px;
}
.div-card-risk {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  line-height: 1.6;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.18);
  /* Reserve three lines so the dashed divider lines up across all three
     cards, even when a card lists only one or two presets (border-box:
     min-height includes the 12px padding + 1px border). */
  min-height: 71px;
}
.diversification-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Conservative — green tint */
.div-card-conservative { border-top-color: var(--green); }
.div-card-conservative .div-card-tag { color: var(--green); }
.div-card-conservative .div-card-risk { color: var(--green); }

/* Medium — cyan tint */
.div-card-medium { border-top-color: var(--cyan); }
.div-card-medium .div-card-tag { color: var(--cyan); }
.div-card-medium .div-card-risk { color: var(--cyan); }

/* High Gain — magenta/red tint */
.div-card-high { border-top-color: var(--magenta); }
.div-card-high .div-card-tag { color: var(--magenta); }
.div-card-high .div-card-risk { color: var(--magenta); }

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

/* =====================================================
   PRESETS OVERVIEW — 3 cards summarizing the official presets
   ===================================================== */
.preset-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 22px 0 24px;
}
.preset-overview-card {
  padding: 22px 22px 18px;
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%,
      rgba(168, 85, 247, 0.06) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-top: 3px solid;
  border-radius: 12px;
}
.preset-overview-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.preset-overview-card h3 {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(168, 85, 247, 0.18);
  letter-spacing: -0.5px;
}
.preset-overview-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Color-coded by risk level (consistent with diversification + style cards) */
.preset-overview-card.preset-style-low { border-top-color: var(--green); }
.preset-overview-card.preset-style-low .preset-overview-tag,
.preset-overview-card.preset-style-low h3 { color: var(--green); }

.preset-overview-card.preset-style-medium { border-top-color: var(--cyan); }
.preset-overview-card.preset-style-medium .preset-overview-tag,
.preset-overview-card.preset-style-medium h3 { color: var(--cyan); }

.preset-overview-card.preset-style-high { border-top-color: var(--magenta); }
.preset-overview-card.preset-style-high .preset-overview-tag,
.preset-overview-card.preset-style-high h3 { color: var(--magenta); }

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

/* =====================================================
   PRESETS CTA — contact via MQL5 to get the .set files
   ===================================================== */
.presets-cta {
  margin: 28px 0 0;
  padding: 28px 30px 26px;
  background:
    radial-gradient(ellipse 100% 35% at 50% 0%,
      rgba(255, 215, 0, 0.10) 0%,
      rgba(255, 184, 0, 0.04) 35%,
      transparent 70%),
    linear-gradient(160deg, rgba(14, 10, 4, 0.96), rgba(8, 5, 2, 0.98));
  border: 1px solid var(--gold-deep);
  border-radius: 14px;
  position: relative;
  box-shadow:
    0 0 32px rgba(255, 184, 0, 0.10),
    inset 0 1px 0 rgba(255, 215, 0, 0.08);
}
.presets-cta::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-bright), var(--gold), var(--gold-bright));
  border-radius: 14px 14px 0 0;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.4);
}
.presets-cta-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: #1a0f00;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
}
.presets-cta-title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 800;
  color: var(--gold);
  margin: 0 0 14px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}
.presets-cta p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 12px;
}
.presets-cta p strong { color: var(--text); font-weight: 700; }
.presets-cta-button {
  display: inline-block;
  margin-top: 12px;
  padding: 13px 28px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: #1a0f00 !important;
  text-decoration: none !important;
  border: none !important;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-radius: 6px;
  box-shadow:
    0 6px 20px rgba(255, 184, 0, 0.30),
    0 0 24px rgba(255, 215, 0, 0.18);
  transition: all 0.25s ease;
}
.presets-cta-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 32px rgba(255, 184, 0, 0.45),
    0 0 36px rgba(255, 215, 0, 0.30);
}

/* =====================================================
   WITHDRAWAL FLOW — capital recovery strategy steps
   ===================================================== */
.withdrawal-flow {
  display: grid;
  gap: 14px;
  margin: 18px 0 22px;
}
.withdrawal-step {
  display: flex;
  align-items: stretch;
  gap: 0;
  background:
    radial-gradient(ellipse 100% 60% at 0% 0%,
      rgba(0, 234, 255, 0.05) 0%,
      transparent 70%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(0, 234, 255, 0.16);
  border-left: 3px solid rgba(0, 234, 255, 0.5);
  border-radius: 10px;
  overflow: hidden;
}
.withdrawal-step-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  padding: 14px 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(0, 234, 255, 0.05);
  border-right: 1px dashed rgba(0, 234, 255, 0.18);
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.3);
}
.withdrawal-step-body {
  flex: 1;
  padding: 14px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.withdrawal-step-state {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 600;
}
.withdrawal-step-action {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.withdrawal-step-saved {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--green);
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed rgba(34, 197, 94, 0.20);
  font-weight: 600;
}
.withdrawal-step-saved strong {
  color: var(--green);
  text-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}

/* Final step — highlighted, original capital recovered */
.withdrawal-step-final {
  border-left-color: var(--green);
  background:
    radial-gradient(ellipse 100% 60% at 0% 0%,
      rgba(34, 197, 94, 0.08) 0%,
      rgba(34, 197, 94, 0.02) 40%,
      transparent 75%),
    linear-gradient(160deg, rgba(8, 14, 10, 0.94), rgba(4, 8, 6, 0.98));
}
.withdrawal-step-final .withdrawal-step-num {
  color: var(--green);
  background: rgba(34, 197, 94, 0.06);
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
  border-right-color: rgba(34, 197, 94, 0.22);
}
.withdrawal-step-final .withdrawal-step-saved {
  color: var(--green);
  border-top-color: rgba(34, 197, 94, 0.30);
}

@media (max-width: 600px) {
  .withdrawal-step { flex-direction: column; }
  .withdrawal-step-num {
    width: 100%;
    padding: 8px 14px;
    border-right: none;
    border-bottom: 1px dashed rgba(0, 234, 255, 0.18);
    justify-content: flex-start;
  }
}

/* =====================================================
   GLOSSARY
   ===================================================== */
.glossary-list {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px 24px;
  margin-top: 14px;
  padding: 22px;
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%,
      rgba(0, 234, 255, 0.04) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(0, 234, 255, 0.16);
  border-radius: 12px;
}
.glossary-list dt {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.3px;
  padding-top: 4px;
}
.glossary-list dd {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.glossary-list dd strong { color: var(--text); font-weight: 700; }

/* =====================================================
   TROUBLESHOOTING (FAQ-style)
   ===================================================== */
.docs-faq {
  margin-bottom: 12px;
  padding: 0;
  background:
    radial-gradient(ellipse 100% 50% at 50% 0%,
      rgba(0, 234, 255, 0.04) 0%,
      transparent 75%),
    linear-gradient(160deg, rgba(10, 8, 14, 0.92), rgba(4, 4, 10, 0.97));
  border: 1px solid rgba(0, 234, 255, 0.16);
  border-radius: 10px;
  overflow: hidden;
}
.docs-faq[open] {
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 234, 255, 0.10);
}
.docs-faq summary {
  padding: 14px 48px 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text);
  list-style: none;
  position: relative;
  transition: color 0.2s;
}
.docs-faq summary::-webkit-details-marker { display: none; }
.docs-faq summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cyan);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.3s;
  text-shadow: 0 0 8px rgba(0, 234, 255, 0.35);
}
.docs-faq[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.docs-faq[open] summary { color: var(--cyan); }
.docs-faq p, .docs-faq ol {
  padding: 0 18px 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}
.docs-faq ol { padding-left: 36px; padding-bottom: 18px; }

/* =====================================================
   FOOTER
   ===================================================== */
.docs-footer {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid rgba(0, 234, 255, 0.14);
  font-size: 12px;
  color: var(--text-quiet);
  line-height: 1.7;
}
.docs-footer p { font-size: 12px; color: var(--text-quiet); margin-bottom: 8px; }
.docs-footer strong { color: var(--text-dim); }
.docs-footer a { color: var(--cyan); border-bottom-color: rgba(0, 234, 255, 0.4); }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: relative;
    top: auto;
    height: auto;
    max-height: 320px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 234, 255, 0.14);
  }
  .docs-content {
    padding: 24px 20px 60px;
  }
  .glossary-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .glossary-list dt {
    margin-top: 12px;
    border-top: 1px dashed rgba(0, 234, 255, 0.12);
    padding-top: 10px;
  }
  .glossary-list dt:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 640px) {
  .docs-title { font-size: 26px; }
  .docs-h2 { font-size: 22px; }
  .param-name { font-size: 16px; }
  .param-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .preset-style-grid { grid-template-columns: 1fr; }
}
