/* AIO Trading Softwares - "Private desk" design system, from design.md (aubergine and acid).
   Editorial, not app: serif headlines, hairline rules, plain lists. Colour has a job; see design.md section 2. */

:root {
  --paper: #140d1c;
  --panel: #1d1428;
  --hairline: #33264a;
  --ink: #f3ede2;
  --graphite: #a99cb8;
  --mute: #75688a;
  --signal: #c8f560;
  --ok: #5ee6b0;
  --bad: #ff5d8f;
  --warn: #ffb86b;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
p { margin: 0 0 1em; }
p a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link {
  position: absolute; left: -999px; top: 10px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
}
.skip-link:focus { left: 12px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: 760px; }
.lede { color: var(--graphite); font-size: 15.5px; max-width: 42em; }

/* ---------- header and footer ---------- */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(20, 13, 28, 0.93);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { font-family: var(--serif); font-size: 26px; line-height: 1; white-space: nowrap; }
.brand i { font-style: normal; color: var(--signal); }
.main-nav ul { display: flex; gap: 2px; list-style: none; font-size: 13.5px; }
.main-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 8px 12px;
  color: var(--graphite); transition: color 0.2s;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--ink); }
.burger {
  display: none; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--hairline); border-radius: 2px;
}

.site-footer { border-top: 1px solid var(--hairline); padding: 40px 0 34px; font-size: 13px; color: var(--graphite); margin-top: 30px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links a:hover { color: var(--ink); }
.risk-note { margin-top: 24px; font-size: 12.5px; max-width: 62em; }
.risk-note strong { color: var(--ink); font-weight: 500; }
.copyright { margin-top: 12px; font-size: 12.5px; }

/* ---------- buttons and links ---------- */

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 2px;
  background: var(--ink); color: var(--paper);
  font-size: 14px; font-weight: 500; line-height: 1.3; white-space: nowrap; text-align: center;
  transition: background-color 0.2s;
}
.btn:hover:not(:disabled) { background: var(--signal); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn-block { display: block; width: 100%; }
.btn-quiet { background: none; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-quiet:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.link-btn {
  min-height: 44px; font-size: 13px; font-weight: 500; color: var(--signal);
  text-decoration: underline; text-underline-offset: 3px;
}
.icon { display: inline-block; vertical-align: -3px; margin-left: 4px; }

/* ---------- home: full-bleed brain hero ---------- */

.hero-bleed {
  position: relative; height: calc(100vh - 64px); min-height: 640px; overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}
.hero-bleed .hint { position: absolute; left: max(28px, calc(50% - 562px)); top: 20px; z-index: 2; font-size: 12.5px; color: var(--graphite); pointer-events: none; }
.feat { position: absolute; z-index: 2; padding: 4px 2px; max-width: 240px; }
.feat .n {
  display: block; font-family: var(--serif); font-size: 28px; line-height: 1.05; letter-spacing: -0.01em;
  transition: color 0.2s;
}
.feat .m { display: block; font-size: 12.5px; color: var(--graphite); margin-top: 4px; }
.feat:hover .n, .feat.hot .n, .feat:focus-visible .n { color: var(--signal); }
#f-cat { left: 8%; top: 20%; }
#f-bot { left: 6%; top: 47%; }
#f-cus { left: 0; right: 0; top: 7%; width: max-content; margin: 0 auto; text-align: center; }
#f-ind { right: 8%; top: 22%; text-align: right; }
#f-pla { right: 7%; top: 50%; text-align: right; }
.greet { position: absolute; left: max(28px, calc(50% - 562px)); bottom: 30px; z-index: 2; max-width: 470px; }
.greet h1 { font-size: 48px; line-height: 1.02; letter-spacing: -0.02em; }
.greet .sub { color: var(--graphite); font-size: 14.5px; margin-top: 12px; max-width: 34em; }
.pick { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin-top: 20px; font-size: 14px; }
.pick a { display: inline-flex; align-items: center; min-height: 44px; border-bottom: 1px solid var(--hairline); transition: border-color 0.2s; }
.pick a:hover { border-color: var(--ink); }
.pick small { font-family: var(--mono); font-size: 11px; color: var(--mute); margin-left: 5px; }
.pick span { color: var(--mute); }
.feed { position: absolute; right: max(28px, calc(50% - 562px)); bottom: 30px; z-index: 2; width: 300px; font-size: 13px; }
.feed h2 { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--graphite); margin-bottom: 8px; }
.feed ul { list-style: none; }
.feed li a {
  display: flex; justify-content: space-between; gap: 14px; padding: 8px 0;
  border-top: 1px solid var(--hairline); transition: color 0.2s;
}
.feed li a:hover { color: var(--signal); }
.feed li span:last-child { font-family: var(--mono); font-size: 12px; color: var(--graphite); white-space: nowrap; }

/* ---------- particle visual (all pages) ---------- */

[data-viz] { position: relative; }
.viz { height: 440px; width: 100%; }
[data-viz] > canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
[data-viz] > canvas.drag { cursor: grabbing; }
[data-viz] > canvas.point { cursor: pointer; }
.viz-hint { position: absolute; left: 0; bottom: 4px; font-size: 12px; color: var(--graphite); pointer-events: none; }
.viz-figure { margin: 0; }
.demo { font-size: 12.5px; color: var(--graphite); margin-top: 10px; }

/* ---------- catalogue ---------- */

.block { padding: 70px 0; }
.sec-h {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid var(--ink); padding-top: 18px;
}
.sec-h h2 { font-size: 44px; letter-spacing: -0.015em; line-height: 1; }
.count { font-size: 13px; color: var(--graphite); }
.types { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 18px; font-size: 13.5px; }
.chip { min-height: 44px; padding: 8px 12px 8px 0; margin-right: 12px; color: var(--graphite); transition: color 0.2s; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--ink); }
.cat { display: grid; grid-template-columns: 220px 1fr; gap: 40px; margin-top: 26px; }
.side { display: flex; flex-direction: column; gap: 26px; }
.side h3 { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--graphite); margin-bottom: 6px; }
.search { border-bottom: 1px solid var(--ink); padding: 4px 0; }
.search input {
  width: 100%; min-height: 44px; border: 0; background: transparent; outline: none;
  font-size: 14.5px; padding: 4px 0; border-radius: 0;
}
.search input::placeholder { color: var(--mute); }
.opt {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  min-height: 44px; padding: 7px 0; font-size: 14px; text-align: left;
  color: var(--graphite); border-bottom: 1px solid var(--hairline); transition: color 0.15s;
}
.opt:hover:not(:disabled) { color: var(--ink); }
.opt[aria-pressed="true"] { color: var(--signal); }
.opt:disabled { color: #4f4263; cursor: default; }
.opt span:last-child { font-family: var(--mono); font-size: 12px; }
.plist { list-style: none; border-top: 1px solid var(--hairline); }
.prod {
  display: grid; grid-template-columns: 1fr auto; align-items: start; gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--hairline);
}
.prod:hover h3, .prod:focus-visible h3 { color: var(--signal); }
.ptype { font-size: 12.5px; color: var(--graphite); }
.prod h3 { font-size: 27px; line-height: 1.1; margin-top: 4px; transition: color 0.2s; }
.prod p { font-size: 14px; color: var(--graphite); margin: 6px 0 0; max-width: 40em; }
.pr { text-align: right; white-space: nowrap; }
.price { font-family: var(--mono); font-size: 15px; }
.go { display: block; margin-top: 6px; font-size: 13px; color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.empty-state { padding: 24px 0; }
.empty-state h3 { font-size: 27px; }
.empty-state p { color: var(--graphite); max-width: 52ch; margin-top: 8px; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

.custom-cta { padding: 70px 0; }
.cta-inner {
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 28px;
  border-top: 1px solid var(--ink); padding-top: 22px;
}
.cta-inner h2 { font-size: 40px; line-height: 1.05; letter-spacing: -0.015em; max-width: 16em; }
.cta-side p { color: var(--graphite); font-size: 14px; margin-bottom: 14px; }

/* ---------- inner pages ---------- */

.page-hero, .product-hero { padding-top: 46px; }
.page-hero h1, .product-hero h1 { font-size: 52px; line-height: 1.02; letter-spacing: -0.02em; margin-top: 12px; }
.product-hero h1 { margin-top: 8px; }
.product-hero .lede, .page-hero .lede { margin-top: 12px; }
.page-hero .btn { margin-top: 18px; }
.draft-note { font-size: 12.5px; color: var(--graphite); margin-top: 12px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; font-size: 12.5px; color: var(--graphite); }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); }
.breadcrumb a:hover { color: var(--ink); }
.two { display: grid; grid-template-columns: 1.45fr 1fr; gap: 40px; margin-top: 30px; align-items: start; }
.form-wrap { min-width: 0; }

/* ---------- product page ---------- */

.product { padding-top: 30px; }
.product-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 40px; align-items: start; }
.product-main { min-width: 0; }
.product-section, .risk-box { margin-top: 44px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.product-section h2, .gallery-h { font-size: 30px; line-height: 1.1; margin-bottom: 12px; }
.prose p { color: var(--graphite); max-width: 44em; }
.prose p + p { margin-top: 12px; }
.feature-list { list-style: none; }
.feature-list li { display: flex; gap: 12px; padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 14px; }
.feature-list svg { flex: none; margin-top: 4px; color: var(--ink); }
.risk-box { font-size: 12.5px; color: var(--graphite); }
.risk-box strong { color: var(--ink); font-weight: 500; }
.risk-box a { color: var(--signal); }
.gallery { margin-top: 44px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.gallery-main { aspect-ratio: 16 / 9; background: var(--panel); border: 1px solid var(--hairline); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; list-style: none; margin-top: 12px; overflow-x: auto; }
.thumb { display: block; padding: 0; border: 1px solid var(--hairline); opacity: 0.6; transition: opacity 0.2s; }
.thumb:hover { opacity: 0.9; }
.thumb[aria-pressed="true"] { opacity: 1; border-color: var(--ink); }
.thumb img { width: 140px; height: auto; }
.video-link { margin-top: 12px; font-size: 13px; }
.buy-card { border-top: 1px solid var(--ink); padding-top: 18px; }
.buy-price { font-family: var(--serif); font-size: 44px; line-height: 1; margin-bottom: 18px; }
.buy-actions { display: grid; gap: 10px; }
.buy-note { font-size: 12.5px; color: var(--graphite); margin: 10px 0 0; }
.buy-card .form-status { margin-top: 10px; }
.side-h { font-family: var(--sans); font-size: 12.5px; font-weight: 500; color: var(--graphite); margin: 24px 0 8px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; font-size: 14px; }
.pill + .pill::before { content: "·"; margin: 0 10px; color: var(--mute); }
.meta-list { margin-top: 18px; }
.meta-list div { display: grid; grid-template-columns: 40% 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--hairline); font-size: 14px; }
.meta-list dt { color: var(--graphite); }
.meta-list dd { margin: 0; }
.currency-note { font-size: 12.5px; color: var(--graphite); margin-top: 18px; }
.side-cta { font-size: 13.5px; color: var(--graphite); margin-top: 18px; }
.side-cta a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- steps ---------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; margin-top: 28px; border-top: 1px solid var(--hairline); }
.step { padding-top: 14px; }
.step > span { font-family: var(--mono); font-size: 12px; color: var(--graphite); }
.step b { display: block; font-weight: 500; margin-top: 6px; }
.step p { font-size: 13.5px; color: var(--graphite); margin: 4px 0 0; }

/* ---------- forms ---------- */

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 4px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { font-size: 12.5px; color: var(--graphite); padding: 0; margin-bottom: 4px; }
.field input:not([type="radio"]):not([type="checkbox"]), .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 8px 0; font-size: 15px;
  background: transparent; border: 0; border-bottom: 1px solid var(--mute); border-radius: 0; outline: none;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--ink); }
.field textarea { min-height: 100px; resize: vertical; }
.field select option { background: var(--paper); color: var(--ink); }
.field [aria-invalid="true"] { border-bottom-color: var(--ink); }
.field-error { font-size: 13px; color: var(--ink); margin: 0; }
.hint { font-size: 12.5px; color: var(--graphite); margin: 0; }
.optional { font-weight: 400; color: var(--graphite); margin-left: 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.choice { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; cursor: pointer; }
.choice input { accent-color: var(--signal); margin: 0; width: 16px; height: 16px; }
.form .btn, .auth-actions .btn { justify-self: start; }
.form-status { font-size: 13px; color: var(--graphite); min-height: 1.2em; margin: 0; }
.form-saved { font-size: 13px; color: var(--graphite); margin: 0; }
.auth { display: grid; gap: 24px; }
.auth-tabs { display: flex; flex-wrap: wrap; gap: 2px; font-size: 13.5px; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.auth-intro, .auth-loading { color: var(--graphite); }
.auth-signout { margin-top: 24px; }
.account-meta { margin-bottom: 8px; }
.form h2 { font-size: 30px; }
.confirmation { display: grid; gap: 14px; justify-items: start; }
.confirmation h2 { font-size: 44px; line-height: 1; }

.legal { padding-bottom: 70px; }
.legal h2 { font-size: 30px; margin-top: 40px; margin-bottom: 10px; }

.library { margin-top: 40px; }
.library h2 { font-size: 30px; margin-bottom: 12px; }
.library-empty { color: var(--graphite); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.data-table th { font-weight: 500; color: var(--graphite); font-size: 12.5px; }
.row-meta { display: block; font-size: 12.5px; color: var(--graphite); margin-top: 4px; }
.row-message { display: block; font-size: 13px; color: var(--graphite); margin-top: 6px; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero-bleed .hint { display: none; }
  .greet h1 { font-size: 46px; }
}
@media (max-width: 960px) {
  .two, .product-grid { grid-template-columns: 1fr; }
  .page-hero h1, .product-hero h1 { font-size: 40px; }
  .product-grid .buy-panel { position: static; }
}
@media (max-width: 900px) {
  .cat { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 860px) {
  .hero-bleed { height: auto; min-height: 0; padding-bottom: 28px; }
  .hero-bleed > canvas { position: relative; inset: auto; display: block; height: 56vh; }
  .feat, .feed { display: none; }
  .greet { position: relative; left: auto; bottom: auto; max-width: none; padding: 0 20px; }
  .greet h1 { font-size: 36px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .viz { height: 340px; }
}
@media (max-width: 820px) {
  .burger { display: grid; }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0; padding: 8px 20px;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
}
@media (max-width: 760px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-inner h2 { font-size: 32px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .sec-h h2 { font-size: 36px; }
  .field-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .prod h3 { font-size: 24px; }
  .buy-price { font-size: 40px; }
  .types { flex-wrap: nowrap; overflow-x: auto; }
  .chip { flex: none; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
