/* Trader2Algo — Contact / Help / FAQ pages
   Uses the same palette and theme key (t2a-theme) as the dashboard. */
:root{
  --bg:#070b12;--surface:#0f1729;--surface-2:#142036;--border:#26384d;
  --text:#dbe6f3;--muted:#9fb3c8;--link:#5aa2ff;--accent:#2074ed;--accent-hover:#3486fa;
  --accent-text:#fff;--ok:#28ff5f;--warn:#e6ba65;--warn-bg:rgba(230,186,101,.1);--danger:#ff6b86;
  --focus:#00d9ff;color-scheme:dark;
}
html[data-theme="light"]{
  --bg:#f3f6fb;--surface:#fff;--surface-2:#eef3f9;--border:#d5deea;
  --text:#172033;--muted:#475569;--link:#1d4ed8;--accent:#1d4ed8;--accent-hover:#1e40af;
  --accent-text:#fff;--ok:#15803d;--warn:#92400e;--warn-bg:#fef3c7;--danger:#b91c1c;
  --focus:#0369a1;color-scheme:light;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:84px}
body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;font-size:16px;line-height:1.65}
a{color:var(--link)}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;border-radius:4px}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}

/* Top bar */
.site-header{position:sticky;top:0;z-index:20;background:var(--surface);border-bottom:1px solid var(--border)}
.bar{max-width:1040px;margin:0 auto;padding:0 20px;min-height:60px;display:flex;align-items:center;gap:20px}
.brand{display:flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-weight:800;font-size:19px;letter-spacing:-.4px;margin-right:auto}
.brand img{width:28px;height:28px;border-radius:6px}
.site-nav{display:flex;gap:4px}
.site-nav a{color:var(--muted);text-decoration:none;padding:8px 12px;border-radius:8px;font-size:15px;font-weight:500}
.site-nav a:hover{background:var(--surface-2);color:var(--text)}
.site-nav a[aria-current="page"]{color:var(--text);background:var(--surface-2);box-shadow:inset 0 -2px 0 var(--accent)}
.bar-actions{display:flex;align-items:center;gap:10px}
.icon-btn{height:36px;min-width:36px;padding:0 10px;border:1px solid var(--border);border-radius:8px;background:var(--surface-2);color:var(--text);font:inherit;font-size:15px;cursor:pointer}
.icon-btn:hover{border-color:var(--link)}
.back-link{color:var(--text);text-decoration:none;font-size:14px;font-weight:600;border:1px solid var(--border);border-radius:8px;padding:7px 12px;background:var(--surface-2);white-space:nowrap}
.back-link:hover{border-color:var(--link)}
@media (max-width:720px){
  .bar{flex-wrap:wrap;padding:10px 16px;gap:8px 12px}
  .site-nav{order:3;width:100%;overflow-x:auto}
  .brand{font-size:17px}
}

/* Page frame */
.wrap{max-width:1040px;margin:0 auto;padding:40px 20px 72px}
.page-head{max-width:720px;margin-bottom:36px}
h1{font-size:clamp(28px,4.4vw,40px);line-height:1.15;letter-spacing:-.02em;margin:0 0 12px}
h2{font-size:24px;line-height:1.25;letter-spacing:-.01em;margin:0 0 12px}
h3{font-size:17px;line-height:1.35;margin:22px 0 6px}
p{margin:0 0 12px}
.lead{color:var(--muted);font-size:18px;margin:0}
.muted{color:var(--muted)}
code,kbd{font-family:ui-monospace,Consolas,monospace;font-size:.9em;background:var(--surface-2);border:1px solid var(--border);border-radius:4px;padding:1px 6px}
ul,ol{padding-left:22px;margin:0 0 14px}
li{margin-bottom:6px}

/* Notices */
.notice{border:1px solid var(--border);border-left:4px solid var(--warn);background:var(--warn-bg);border-radius:8px;padding:14px 16px;margin:18px 0}
.notice strong{display:block;margin-bottom:2px}
.notice p:last-child{margin:0}

/* Help layout */
.help-grid{display:grid;grid-template-columns:230px minmax(0,1fr);gap:48px;align-items:start}
.toc{position:sticky;top:84px;font-size:15px}
.toc strong{display:block;margin-bottom:8px;font-size:14px;color:var(--muted)}
.toc ul{list-style:none;padding:0;margin:0;border-left:1px solid var(--border)}
.toc li{margin:0}
.toc a{display:block;padding:6px 14px;margin-left:-1px;border-left:2px solid transparent;color:var(--muted);text-decoration:none}
.toc a:hover{color:var(--text);border-left-color:var(--link)}
.help-section{padding-bottom:36px;margin-bottom:36px;border-bottom:1px solid var(--border)}
.help-section:last-child{border-bottom:0;margin-bottom:0}
.steps{list-style:none;counter-reset:s;padding:0}
.steps>li{counter-increment:s;position:relative;padding:0 0 14px 44px;margin:0}
.steps>li::before{content:counter(s);position:absolute;left:0;top:0;width:30px;height:30px;border-radius:50%;background:var(--surface-2);border:1px solid var(--border);display:grid;place-items:center;font-weight:700;font-size:14px}
.table-scroll{overflow-x:auto;border:1px solid var(--border);border-radius:10px;margin:12px 0 16px}
table{border-collapse:collapse;width:100%;min-width:520px;font-size:15px}
th,td{text-align:left;padding:11px 14px;border-bottom:1px solid var(--border);vertical-align:top}
th{background:var(--surface-2);font-weight:600;color:var(--muted);font-size:14px}
tr:last-child td{border-bottom:0}
td:first-child{font-weight:600;white-space:nowrap}
.fix{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:14px 18px;margin-bottom:12px}
.fix h3{margin:0 0 4px}
.fix p{margin:0;color:var(--muted)}
@media (max-width:860px){
  .help-grid{grid-template-columns:minmax(0,1fr);gap:24px}
  .toc,.toc ul{min-width:0;max-width:100%}
  .toc li{min-width:0;max-width:100%}
  .toc{position:static}
  .toc ul{display:flex;flex-wrap:wrap;gap:6px;border:0}
  .toc a{border:1px solid var(--border);border-radius:999px;padding:6px 12px;margin:0;font-size:14px;white-space:normal}
}

/* FAQ */
.faq-tools{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-bottom:22px}
.search{flex:1 1 280px;height:46px;padding:0 16px;border-radius:10px;border:1px solid var(--border);background:var(--surface);color:var(--text);font:inherit}
.search::placeholder{color:var(--muted);opacity:.8}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--border);background:var(--surface);color:var(--muted);font:inherit;font-size:14px;cursor:pointer}
.chip:hover{border-color:var(--link);color:var(--text)}
.chip[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-text)}
.faq-group{max-width:820px;margin-bottom:34px}
.faq-group h2{font-size:20px;margin-bottom:10px}
details.q{border:1px solid var(--border);background:var(--surface);border-radius:10px;margin-bottom:8px}
details.q[open]{border-color:var(--link)}
details.q summary{cursor:pointer;list-style:none;padding:15px 48px 15px 18px;font-weight:600;position:relative}
details.q summary::-webkit-details-marker{display:none}
details.q summary::after{content:"+";position:absolute;right:18px;top:50%;transform:translateY(-50%);font-size:22px;font-weight:400;color:var(--muted)}
details.q[open] summary::after{content:"\2212"}
details.q .a{padding:0 18px 14px;color:var(--muted)}
details.q .a p:last-child,details.q .a ul:last-child{margin-bottom:0}
.empty{display:none;max-width:820px;padding:20px;border:1px dashed var(--border);border-radius:10px;color:var(--muted)}
.empty.show{display:block}

/* Contact */
.contact-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:40px;align-items:start}
.panel{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:24px}
.panel h2{font-size:20px}
.field{margin-bottom:16px}
.field label{display:block;font-size:14px;font-weight:600;margin-bottom:6px}
.field .hint{display:block;font-size:13px;color:var(--muted);font-weight:400;margin-top:2px}
.field input,.field select,.field textarea{width:100%;padding:12px 14px;border-radius:10px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font:inherit}
.field textarea{min-height:150px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--link);outline:none;box-shadow:0 0 0 3px rgba(90,162,255,.25)}
.btn-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:6px}
.btn{height:46px;padding:0 20px;border-radius:10px;border:1px solid var(--accent);background:var(--accent);color:var(--accent-text);font:inherit;font-weight:700;cursor:pointer}
.btn:hover{background:var(--accent-hover)}
.btn.secondary{background:transparent;color:var(--text);border-color:var(--border)}
.btn.secondary:hover{border-color:var(--link);background:var(--surface-2)}
.form-msg{min-height:22px;margin-top:12px;font-size:14px;color:var(--muted)}
.form-msg.err{color:var(--danger)}
.form-msg.ok{color:var(--ok)}
.channel{display:flex;flex-direction:column;gap:2px;padding:14px 0;border-bottom:1px solid var(--border)}
.channel:first-of-type{padding-top:0}
.channel:last-of-type{border-bottom:0;padding-bottom:0}
.channel span{font-size:13px;color:var(--muted)}
.channel a{font-weight:600;word-break:break-word}
.checklist{margin-top:22px}
.checklist h3{margin-top:0}
@media (max-width:860px){.contact-grid{grid-template-columns:1fr}}

.site-footer{border-top:1px solid var(--border);color:var(--muted);font-size:14px}
.site-footer .bar{min-height:64px;justify-content:space-between}
.site-footer a{color:var(--muted)}
