/* ═══════════════════════════════════════════════════
   GTS Trading — features.html + station-tour.html
   Page-specific components on top of the desk template + unified.css.
   ═══════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }
section[id], .tour-stop { scroll-margin-top: 90px; }

/* ── Shorter hero for inner pages ── */
.hero.page-hero { min-height: 0; padding: 72px 0 56px; }
.page-hero .hero-title { font-size: 3rem; }
.page-hero .hero-tagline { max-width: 720px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) {
  .hero.page-hero { padding: 48px 0 40px; }
  .page-hero .hero-title { font-size: 2.1rem; }
}

/* ── Outline button for light sections (desk .btn-secondary is hero-only) ── */
.btn.btn-outline {
  background: transparent;
  color: var(--primary-color, #6366f1);
  border: 2px solid var(--primary-color, #6366f1);
}
.btn.btn-outline:hover { background: var(--primary-color, #6366f1); color: #fff; }
[data-theme="dark"] .btn.btn-outline { color: #c7d2fe; border-color: #818cf8; background: transparent; }
[data-theme="dark"] .btn.btn-outline:hover { background: #6366f1; color: #fff; }
.btn.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }

/* ── Category index chips ── */
.cat-index { padding: 26px 0 6px; background: var(--theme-bg, #f2f4f8); }
.cat-index-label {
  text-align: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--theme-text-secondary, #6b7280); margin-bottom: 12px;
}
.chip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; }
.chip-list a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 600; text-decoration: none;
  color: var(--theme-text, #1f2937);
  background: var(--theme-card-bg, #fbfdff);
  border: 1px solid var(--theme-border, #e5e7eb);
  transition: border-color .15s, color .15s, background .15s;
}
.chip-list a i { color: var(--primary-color, #6366f1); font-size: 0.8rem; }
.chip-list a:hover { border-color: #6366f1; color: #6366f1; }
[data-theme="dark"] .chip-list a { border-color: #1e293b; }
[data-theme="dark"] .chip-list a i { color: #a5b4fc; }
[data-theme="dark"] .chip-list a:hover { border-color: #818cf8; color: #c7d2fe; }

/* ── Section header tweaks ── */
.hp-section .section-header { margin-bottom: 2.6rem; }
.hp-section .section-header p { max-width: 820px; margin-left: auto; margin-right: auto; }
@media (max-width: 600px) { .hp-section .section-header h2 { font-size: 1.75rem; } }

/* Feature cards reuse .agent-grid/.agent-card; make code chips readable in both themes. */
.agent-card code, .block-card code, .howto code, .ex-list code, .route-table code, .prompt-card code, .tour-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.16);
  color: #4338ca;
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-word;
}
[data-theme="dark"] .agent-card code, [data-theme="dark"] .block-card code, [data-theme="dark"] .howto code,
[data-theme="dark"] .ex-list code, [data-theme="dark"] .route-table code, [data-theme="dark"] .prompt-card code,
[data-theme="dark"] .tour-text code {
  background: rgba(165, 180, 252, 0.1); border-color: rgba(165, 180, 252, 0.2); color: #c7d2fe;
}
.agent-card .card-tag {
  display: inline-block; margin-top: 10px;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--theme-text-secondary, #6b7280);
}

/* Sub-heading inside a section */
.sub-head {
  display: flex; align-items: center; gap: 10px;
  margin: 40px 0 16px; font-size: 1.15rem; font-weight: 800;
  color: var(--theme-text, #1f2937);
}
.sub-head i { color: var(--primary-color, #6366f1); }
[data-theme="dark"] .sub-head i { color: #a5b4fc; }
.sub-note { font-size: 0.88rem; color: var(--theme-text-secondary, #6b7280); margin: -8px 0 16px; }

/* ── How to use box ── */
.howto {
  margin-top: 28px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.045);
  padding: 22px 24px 18px;
}
[data-theme="dark"] .howto { background: rgba(99, 102, 241, 0.07); border-color: rgba(129, 140, 248, 0.25); }
.howto-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.howto-title {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary-color, #6366f1); display: flex; align-items: center; gap: 8px;
}
[data-theme="dark"] .howto-title { color: #a5b4fc; }
.howto-link { font-size: 0.85rem; font-weight: 600; color: var(--primary-color, #6366f1); text-decoration: none; }
.howto-link:hover { text-decoration: underline; }
[data-theme="dark"] .howto-link { color: #a5b4fc; }
.howto ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 10px; }
.howto ol li {
  counter-increment: step; position: relative; padding-left: 36px;
  font-size: 0.9rem; line-height: 1.55; color: var(--theme-text-secondary, #6b7280);
}
.howto ol li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.howto ol li strong { color: var(--theme-text, #1f2937); }
.howto .path { font-weight: 600; color: var(--theme-text, #1f2937); }
.howto-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 820px) { .howto-cols { grid-template-columns: 1fr; } }
.howto-cols .howto { margin-top: 0; }

/* ── Example list (code + label) ── */
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ex-list li { font-size: 0.86rem; line-height: 1.55; color: var(--theme-text-secondary, #6b7280); }
.ex-list li span { opacity: 0.85; }

/* ── Copy-ready prompts ── */
.prompt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 960px) { .prompt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .prompt-grid { grid-template-columns: 1fr; } }
.prompt-card {
  background: var(--theme-card-bg, #fbfdff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 12px; padding: 14px 16px;
  font-size: 0.86rem; line-height: 1.5; color: var(--theme-text, #1f2937);
}
.prompt-card .ptag {
  display: inline-block; margin-bottom: 6px;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px;
  background: rgba(99, 102, 241, 0.1); color: #6366f1;
}
[data-theme="dark"] .prompt-card .ptag { background: rgba(165, 180, 252, 0.12); color: #a5b4fc; }

/* ── Paper / Demo / Real cards ── */
.mode-grid.mode-grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .mode-grid.mode-grid-3 { grid-template-columns: 1fr; } }
.mode-grid-3 .mode-card { text-align: left; }
.mode-grid-3 .mode-card ul { margin: 10px 0 0; padding-left: 18px; }
.mode-grid-3 .mode-card li { font-size: 0.84rem; line-height: 1.55; color: var(--theme-text-secondary, #6b7280); margin-bottom: 4px; }
.mode-badge {
  display: inline-block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px; margin-bottom: 10px;
}
.mode-badge.paper { background: rgba(14, 165, 233, 0.12); color: #0284c7; }
.mode-badge.demo { background: rgba(16, 185, 129, 0.12); color: #059669; }
.mode-badge.real { background: rgba(245, 158, 11, 0.14); color: #b45309; }
[data-theme="dark"] .mode-badge.paper { color: #7dd3fc; }
[data-theme="dark"] .mode-badge.demo { color: #6ee7b7; }
[data-theme="dark"] .mode-badge.real { color: #fcd34d; }

/* ── Tables (alert routing, plan limits) ── */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 14px;
  background: var(--theme-card-bg, #fbfdff);
}
.data-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.data-table th, .data-table td {
  padding: 10px 12px; text-align: center;
  border-bottom: 1px solid var(--theme-border, #e5e7eb);
  color: var(--theme-text-secondary, #6b7280);
  vertical-align: middle;
}
.data-table th {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--theme-text, #1f2937);
  background: rgba(99, 102, 241, 0.06);
  white-space: nowrap;
}
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table td:first-child { color: var(--theme-text, #1f2937); min-width: 260px; }
.data-table td .lbl { display: block; font-size: 0.76rem; color: var(--theme-text-secondary, #6b7280); margin-top: 3px; }
.data-table .on { color: #059669; font-weight: 800; font-size: 0.75rem; }
.data-table .yes { color: #059669; }
.data-table .no { color: var(--theme-text-secondary, #9ca3af); opacity: 0.6; }
[data-theme="dark"] .data-table .on, [data-theme="dark"] .data-table .yes { color: #6ee7b7; }
.route-table td:first-child { min-width: 300px; }
.limits-table td { white-space: nowrap; }
.limits-table td:first-child { min-width: 200px; width: 30%; font-weight: 600; white-space: normal; }
.limits-table th { white-space: normal; }
.limits-table td.wrap { white-space: normal; min-width: 120px; }
.limits-table th .price { display: block; font-size: 0.78rem; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--theme-text-secondary, #6b7280); margin-top: 2px; }
.table-note { font-size: 0.82rem; color: var(--theme-text-secondary, #6b7280); margin-top: 12px; text-align: center; }

/* ── Inline callout / link band at the end of a section ── */
.section-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ── CTA band ── */
.cta-band {
  border-radius: 20px;
  padding: 44px 32px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
[data-theme="dark"] .cta-band { background: linear-gradient(135deg, #312e81 0%, #4f46e5 55%, #7c3aed 100%); }
.cta-band h2 { color: #fff; font-size: 2rem; font-weight: 800; margin: 0 0 10px; }
.cta-band p { color: #e0e7ff; margin: 0 auto; max-width: 640px; }
.cta-band .hero-buttons { justify-content: center; margin-top: 22px; flex-wrap: wrap; }
@media (max-width: 600px) { .cta-band { padding: 32px 20px; } .cta-band h2 { font-size: 1.5rem; } }

/* ═══ Station tour ═══ */
.tour-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; align-items: start; }
.tour-index {
  position: sticky; top: 92px;
  background: var(--theme-card-bg, #fbfdff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 14px; padding: 16px 12px;
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.tour-index-label {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--theme-text-secondary, #6b7280); padding: 0 8px 8px;
}
.tour-index ol { list-style: none; margin: 0; padding: 0; counter-reset: ti; }
.tour-index li a {
  counter-increment: ti;
  display: flex; gap: 10px; align-items: baseline;
  padding: 7px 8px; border-radius: 8px;
  font-size: 0.86rem; font-weight: 600; text-decoration: none;
  color: var(--theme-text-secondary, #6b7280);
}
.tour-index li a::before {
  content: counter(ti, decimal-leading-zero);
  font-size: 0.72rem; font-weight: 800; color: var(--primary-color, #6366f1); min-width: 18px;
}
[data-theme="dark"] .tour-index li a::before { color: #a5b4fc; }
.tour-index li a:hover, .tour-index li a.current { background: rgba(99, 102, 241, 0.09); color: var(--theme-text, #1f2937); }
@media (max-width: 960px) {
  .tour-layout { grid-template-columns: 1fr; gap: 20px; }
  .tour-index { position: static; max-height: none; padding: 14px; }
  .tour-index ol { display: flex; flex-wrap: wrap; gap: 6px; }
  .tour-index li a { padding: 5px 10px; border: 1px solid var(--theme-border, #e5e7eb); border-radius: 999px; font-size: 0.8rem; }
}

.tour-stop {
  background: var(--theme-card-bg, #fbfdff);
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 18px;
  padding: 26px 26px 24px;
  margin-bottom: 28px;
}
.tour-stop-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.tour-num {
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: #fff;
  background: linear-gradient(135deg, #667eea, #764ba2);
}
.tour-kicker { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary-color, #6366f1); }
[data-theme="dark"] .tour-kicker { color: #a5b4fc; }
.tour-stop h2 { font-size: 1.4rem; font-weight: 800; margin: 2px 0 0; color: var(--theme-text, #1f2937); }
.tour-text p { font-size: 0.95rem; line-height: 1.65; color: var(--theme-text-secondary, #6b7280); margin: 0 0 10px; }
.tour-text p strong { color: var(--theme-text, #1f2937); }
.tour-shot {
  margin: 16px 0 14px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--theme-border, #e5e7eb);
  background: #0b1020;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}
.tour-shot a { display: block; cursor: zoom-in; }
.tour-shot img { display: block; width: 100%; height: auto; }
.tour-shot.narrow { max-width: 760px; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tour-actions .rc-meta { font-size: 0.8rem; color: var(--theme-text-secondary, #6b7280); }
@media (max-width: 600px) {
  .tour-stop { padding: 18px 16px; border-radius: 14px; }
  .tour-stop h2 { font-size: 1.2rem; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(2, 6, 23, 0.88);
  display: none; align-items: center; justify-content: center;
  padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox-close {
  position: absolute; top: 16px; right: 18px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.1rem; cursor: pointer;
}

/* Desk .btn-primary is white (made for the purple hero); on light cards make it solid. */
.path-card .btn-primary, .section-cta .btn-primary { background: var(--primary-color, #6366f1); color: #fff; }
.path-card .btn-primary:hover, .section-cta .btn-primary:hover { background: var(--primary-dark, #4f46e5); color: #fff; }

/* ── "For developers" collapsed box (technical detail kept out of the main copy) ── */
.dev-box {
  margin-top: 22px;
  border: 1px solid var(--theme-border, #e5e7eb);
  border-radius: 12px;
  background: var(--theme-card-bg, #fbfdff);
  min-width: 0; max-width: 100%;
}
.dev-box > summary {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  cursor: pointer; user-select: none; list-style: none;
  font-size: 0.82rem; font-weight: 600;
  color: var(--theme-text-secondary, #6b7280);
  border-radius: 12px;
}
.dev-box > summary::-webkit-details-marker { display: none; }
.dev-box > summary::after {
  content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  margin-left: auto; font-size: 0.7rem; transition: transform .15s;
}
.dev-box[open] > summary::after { transform: rotate(180deg); }
.dev-box > summary i { color: var(--primary-color, #6366f1); font-size: 0.8rem; }
.dev-box > summary:hover { color: var(--theme-text, #1f2937); }
.dev-box > summary:focus-visible { outline: 2px solid #6366f1; outline-offset: 2px; }
.dev-box[open] > summary { border-bottom: 1px solid var(--theme-border, #e5e7eb); border-radius: 12px 12px 0 0; }
.dev-box-body {
  padding: 16px 18px 18px;
  font-size: 0.86rem; line-height: 1.6;
  color: var(--theme-text-secondary, #6b7280);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.dev-box-body > :first-child { margin-top: 0; }
.dev-box-body p { margin: 0 0 12px; font-size: 0.86rem; line-height: 1.6; color: var(--theme-text-secondary, #6b7280); }
.dev-box-body ul { margin: 0 0 12px; padding-left: 18px; }
.dev-box-body li { margin-bottom: 6px; }
.dev-box-body strong { color: var(--theme-text, #1f2937); }
.dev-box-body h4 { margin: 18px 0 10px; font-size: 0.9rem; font-weight: 700; color: var(--theme-text, #1f2937); }
.dev-box-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em; color: #4338ca;
  background: rgba(99, 102, 241, 0.08); border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 6px; padding: 1px 6px; word-break: break-word;
}
.dev-box-body pre { overflow-x: auto; max-width: 100%; }
.dev-box-body .table-wrap { max-width: 100%; }
.dev-box-body .prompt-grid { margin-bottom: 4px; }
.dev-box-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.tour-stop .dev-box { margin-top: 16px; }
[data-theme="dark"] .dev-box { background: rgba(15, 23, 42, 0.55); border-color: #1e293b; }
[data-theme="dark"] .dev-box[open] > summary { border-bottom-color: #1e293b; }
[data-theme="dark"] .dev-box > summary i { color: #a5b4fc; }
[data-theme="dark"] .dev-box-body code { background: rgba(165, 180, 252, 0.1); border-color: rgba(165, 180, 252, 0.2); color: #c7d2fe; }
@media (max-width: 600px) {
  .dev-box > summary { padding: 10px 14px; }
  .dev-box-body { padding: 14px; }
}
