@import url('https://fonts.googleapis.com/css2?family=Archivo:wdth,wght@62..125,400..900&display=swap');

:root {
  --paper: #F2F4EF;
  --paper-2: #E7EBE3;
  --ink: #1B2421;
  --ink-2: #4A5752;
  --ink-3: #7A8681;
  --line: #CDD5CE;
  --gold: #A97C1F;
  --gold-soft: #F1E6CB;
  --red: #B93A32;
  --red-soft: #F6DEDA;
  --green: #2C6E57;
  --green-soft: #D9EAE1;
  --white: #FBFCFA;
  --radius-s: 6px;
  --radius-m: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Archivo', system-ui, sans-serif; font-variation-settings: 'wdth' 100;
  font-size: 17px; line-height: 1.55; font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; text-decoration: none; font-variation-settings: 'wdth' 112; }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 26px; align-items: center; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }
.top nav a.btn, .top nav a.btn:hover { color: var(--white); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 650 16px/1 'Archivo', sans-serif; padding: 15px 22px; border-radius: var(--radius-s); background: var(--ink); color: var(--white); }
.btn:hover { background: #2c3a35; }
.btn.gold { background: var(--gold); color: var(--white); }
.btn.gold:hover { background: #93690f; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.line:hover { background: var(--paper-2); }
.btn.small { padding: 10px 14px; font-size: 14px; }

/* ---------- headings ---------- */
h1, h2, h3 { margin: 0; line-height: 1.02; letter-spacing: -0.01em; }
h1 { font-size: clamp(44px, 7vw, 84px); font-weight: 850; font-variation-settings: 'wdth' 70; }
h2 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 800; font-variation-settings: 'wdth' 72; }
h3 { font-size: 21px; font-weight: 700; font-variation-settings: 'wdth' 100; line-height: 1.2; }
.lead { font-size: 20px; color: var(--ink-2); max-width: 34ch; margin: 22px 0 30px; }
section { padding: 96px 0; }
section > .wrap > p.intro { color: var(--ink-2); max-width: 58ch; margin: 16px 0 0; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 28px 0 96px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; opacity: .45;
  mask-image: linear-gradient(to bottom, black 40%, transparent); -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; margin-top: 40px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--ink-3); }

/* ---------- demo terminal ---------- */
.term { background: var(--white); border: 1.5px solid var(--ink); border-radius: var(--radius-m); overflow: hidden;
  box-shadow: 10px 10px 0 var(--ink); }
.term-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1.5px solid var(--ink); background: var(--paper-2); font-size: 14px; }
.term-bar b { font-variation-settings: 'wdth' 110; }
.counter { font-weight: 800; font-size: 15px; padding: 4px 10px; border-radius: 99px; background: var(--white); border: 1.5px solid var(--ink); }
.counter.full { background: var(--red); color: var(--white); border-color: var(--red); }
.banner { display: none; gap: 10px; align-items: flex-start; padding: 12px 16px; background: var(--red-soft); color: #6d211c; font-size: 14px; border-bottom: 1.5px solid var(--red); }
.banner.on { display: flex; }
.banner strong { color: var(--red); }
.term-body { padding: 18px 16px 16px; }
.quote { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.quote .sym { font-weight: 800; font-size: 18px; font-variation-settings: 'wdth' 110; }
.quote .px { font-size: 26px; font-weight: 700; }
.ticket { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ticket button { border: 0; border-radius: var(--radius-s); padding: 14px 10px; cursor: pointer; color: var(--white);
  font: 750 16px/1.1 'Archivo', sans-serif; font-variation-settings: 'wdth' 105; }
.ticket button small { display: block; font-weight: 500; font-size: 13px; opacity: .9; margin-top: 3px; }
.ticket .sell { background: var(--red); } .ticket .buy { background: var(--green); }
.ticket button[aria-disabled="true"] { cursor: not-allowed; color: var(--ink-3);
  background: repeating-linear-gradient(-45deg, var(--paper-2) 0 8px, var(--white) 8px 16px); box-shadow: inset 0 0 0 1.5px var(--line); }
.positions { margin-top: 16px; border-top: 1px solid var(--line); }
.positions .empty { color: var(--ink-3); font-size: 14px; padding: 14px 0 2px; }
.pos { display: grid; grid-template-columns: 54px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pos .side { font-weight: 750; font-size: 13px; }
.pos .side.b { color: var(--green); } .pos .side.s { color: var(--red); }
.pos .pl { font-weight: 700; min-width: 64px; text-align: right; }
.pos .pl.up { color: var(--green); } .pos .pl.dn { color: var(--red); }
.pos button { border: 1.5px solid var(--ink); background: var(--white); border-radius: 5px; padding: 6px 10px; font: 600 13px 'Archivo', sans-serif; cursor: pointer; }
.pos button:hover { background: var(--paper-2); }
.term-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: 1.5px solid var(--ink); font-size: 13px; color: var(--ink-2); background: var(--paper); }
.term-foot button { background: none; border: 0; text-decoration: underline; cursor: pointer; color: var(--ink-2); font: inherit; }
.demo-note { font-size: 14px; color: var(--ink-3); margin-top: 22px; }

/* ---------- rule sheet ---------- */
.sheet { margin-top: 48px; border-top: 2px solid var(--ink); }
.rule { display: grid; grid-template-columns: 300px 1fr; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.rule h3 { display: flex; gap: 12px; align-items: flex-start; }
.rule h3 svg { flex: none; width: 26px; height: 26px; margin-top: -2px; }
.rule p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.rule .free { display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 650; color: var(--green); background: var(--green-soft); padding: 2px 8px; border-radius: 99px; vertical-align: 2px; }

/* ---------- steps ---------- */
.dark { background: var(--ink); color: var(--paper); }
.dark p.intro, .dark .step p { color: #AEB9B4; }
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; counter-reset: s; }
.step { counter-increment: s; border-top: 1.5px solid #4a5a54; padding-top: 22px; }
.step::before { content: counter(s); display: block; font-size: 64px; font-weight: 850; line-height: 1; color: var(--gold); font-variation-settings: 'wdth' 70; margin-bottom: 14px; }
.step p { margin: 10px 0 0; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 48px; border: 1.5px solid var(--ink); border-radius: var(--radius-m); overflow: hidden; background: var(--white); }
.plan { padding: 34px 32px 32px; display: flex; flex-direction: column; }
.plan + .plan { border-left: 1.5px solid var(--ink); }
.plan.best { background: var(--gold-soft); }
.plan .name { font-weight: 700; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.plan .save { font-size: 13px; font-weight: 700; background: var(--gold); color: var(--white); padding: 4px 10px; border-radius: 99px; }
.price { font-size: 60px; font-weight: 850; font-variation-settings: 'wdth' 72; line-height: 1; margin: 18px 0 4px; }
.price span { font-size: 18px; font-weight: 500; color: var(--ink-2); font-variation-settings: 'wdth' 100; }
.plan .per { color: var(--ink-2); font-size: 15px; margin-bottom: 22px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 9px; font-size: 15.5px; }
.plan li { display: flex; gap: 10px; }
.plan li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--green); }
.plan .btn { margin-top: auto; }
.price-note { margin-top: 18px; font-size: 14px; color: var(--ink-3); }

/* ---------- faq ---------- */
.faq { margin-top: 40px; border-top: 2px solid var(--ink); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 650; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 28px; font-weight: 400; color: var(--gold); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 22px; color: var(--ink-2); max-width: 68ch; }

/* ---------- footer ---------- */
footer { border-top: 2px solid var(--ink); padding: 40px 0 56px; font-size: 14px; color: var(--ink-2); }
footer .cols { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.risk { margin-top: 26px; font-size: 13px; color: var(--ink-3); max-width: 90ch; line-height: 1.6; }

/* ---------- simple pages (legal, success) ---------- */
.doc { max-width: 760px; padding: 40px 0 80px; }
.doc h1 { font-size: clamp(38px, 5vw, 56px); margin-bottom: 10px; }
.doc .updated { color: var(--ink-3); font-size: 14px; margin-bottom: 36px; }
.doc h2 { font-size: 24px; font-variation-settings: 'wdth' 100; font-weight: 700; margin: 36px 0 10px; line-height: 1.2; }
.doc p, .doc li { color: var(--ink-2); }
.doc .todo { background: var(--gold-soft); padding: 2px 6px; border-radius: 4px; color: var(--ink); }
.keybox { margin: 26px 0; padding: 26px; border: 1.5px solid var(--ink); border-radius: var(--radius-m); background: var(--white); box-shadow: 8px 8px 0 var(--ink); }
.key { font: 700 clamp(20px, 4vw, 28px)/1.2 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .04em; word-break: break-all; margin: 8px 0 18px; }
.status { color: var(--ink-2); }
.status.err { color: var(--red); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .rule { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .pricing { grid-template-columns: 1fr; }
  .plan + .plan { border-left: 0; border-top: 1.5px solid var(--ink); }
  .top nav a:not(.btn) { display: none; }
  section { padding: 72px 0; }
  .term { box-shadow: 6px 6px 0 var(--ink); }
}
