/* ============================================================
   QUANT X — pages.css
   Component kit for the inner pages, built on the tokens defined
   in site.css. Distinct class names (qx-*, calc, sim-*, rob-*,
   lib-*, fg-*) so nothing collides with the landing styles.
   ============================================================ */

/* active nav link (shared chrome) */
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet)); border-radius: 2px;
  box-shadow: 0 0 10px rgba(69,226,234,0.5);
}

/* ---------- page hero ---------- */
.phero { padding: 70px 0 30px; position: relative; }
.phero .eyebrow { margin-bottom: 18px; }
.phero h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; margin: 0 0 18px; }
.phero .lede { font-size: clamp(16px, 1.9vw, 20px); color: var(--text-dim); max-width: 760px; line-height: 1.6; }
.phero .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.phero-tags { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.phero-tags span { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

/* ---------- section header ---------- */
.qx-head { max-width: 720px; margin-bottom: 38px; }
.qx-head h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.018em;
  font-size: clamp(26px, 3.6vw, 38px); line-height: 1.1; margin: 12px 0 14px; }
.qx-head p { color: var(--text-dim); font-size: 16.5px; line-height: 1.6; margin: 0; }
.qx-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- grids ---------- */
.qx-grid { display: grid; gap: 18px; }
.qx-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.qx-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.qx-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .qx-grid.cols-3, .qx-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .qx-grid.cols-2, .qx-grid.cols-3, .qx-grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- card ---------- */
.qx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px; position: relative; overflow: hidden; transition: border-color .2s ease, transform .2s ease; }
.qx-card:hover { border-color: var(--line-bright); transform: translateY(-2px); }
/* Cards in a row carry different amounts of copy, so their calls to action
   landed at four different heights. Making the card a column and pushing the
   button down with auto margin lines every button up on one baseline,
   whatever the description above it does. */
.qx-card { display: flex; flex-direction: column; }
.qx-card > .btn { margin-top: auto; }
.qx-card .ic { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 14px; display: block; }
.qx-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 18.5px; margin: 0 0 10px; letter-spacing: -0.01em; }
.qx-card p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; margin: 0; }
.qx-card.tcyan { border-top: 2px solid var(--cyan); }
.qx-card.tviolet { border-top: 2px solid var(--violet); }
.qx-card.tgold { border-top: 2px solid var(--gold); }
.qx-card.tmint { border-top: 2px solid var(--mint); }
.qx-card b, .qx-card strong { color: var(--text); }

/* ---------- numbered steps ---------- */
.qx-steps { display: grid; gap: 16px; grid-template-columns: repeat(5, 1fr); counter-reset: step; }
.qx-steps.s3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px) { .qx-steps, .qx-steps.s3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .qx-steps, .qx-steps.s3 { grid-template-columns: 1fr; } }
.qx-step { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; position: relative; }
.qx-step .n { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); letter-spacing: .12em; }
.qx-step h4 { font-family: var(--font-display); font-weight: 600; font-size: 16px; margin: 10px 0 8px; }
.qx-step p { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin: 0; }

/* ---------- agent strip ---------- */
.qx-roster { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 860px) { .qx-roster { grid-template-columns: repeat(2, 1fr); } }
.qx-role { text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 12px; }
.qx-role .av { width: 40px; height: 40px; margin: 0 auto 12px; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; color: var(--cyan); background: var(--surface-2); border: 1px solid var(--line-bright); }
.qx-role .nm { font-weight: 600; font-size: 14.5px; }
.qx-role .ds { color: var(--text-faint); font-size: 12.5px; margin-top: 4px; }
.qx-role.bull .av { color: var(--mint); } .qx-role.bear .av { color: var(--coral); }

/* ---------- comparison ---------- */
.qx-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .qx-cmp { grid-template-columns: 1fr; } }
.qx-cmp .col { border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--surface); }
.qx-cmp .col.good { border-color: var(--line-bright); background: linear-gradient(180deg, rgba(69,226,234,0.05), transparent 60%); }
.qx-cmp .col .k { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--text-faint); }
.qx-cmp .col.good .k { color: var(--cyan); }
.qx-cmp h4 { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin: 8px 0 12px; }
.qx-cmp p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; }

/* ---------- illustrative panel (debate / portfolio) ---------- */
.qx-panel { background: var(--surface-2); border: 1px solid var(--line-bright); border-radius: 16px; overflow: hidden; }
.qx-panel .ph { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: .06em; }
.qx-panel .ph .live { color: var(--mint); display: inline-flex; align-items: center; gap: 7px; }
.qx-panel .ph .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); }
.qx-line { padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; color: var(--text-dim); }
.qx-line:last-child { border-bottom: 0; }
.qx-line b { color: var(--text); }
.qx-line .tag-role { font-family: var(--font-mono); font-size: 11px; color: var(--cyan); letter-spacing: .08em; margin-right: 8px; }
.qx-line.bull .tag-role { color: var(--mint); } .qx-line.bear .tag-role { color: var(--coral); }
.qx-line.exec { background: rgba(54,224,160,0.06); color: var(--text); }
.qx-line.exec .side { font-family: var(--font-mono); color: var(--mint); font-weight: 700; }

/* portfolio table */
.qx-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.qx-tbl th { text-align: left; font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: .08em;
  color: var(--text-faint); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.qx-tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--text-dim); }
.qx-tbl tr:last-child td { border-bottom: 0; }
.qx-tbl .sym { color: var(--text); font-weight: 600; }
.cmd { font-family: var(--font-mono); font-size: 12px; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-bright); }
.cmd.run { color: var(--mint); border-color: rgba(54,224,160,0.4); }
.cmd.scale { color: var(--gold); border-color: rgba(244,183,64,0.4); }
.cmd.pause { color: var(--coral); border-color: rgba(255,92,115,0.4); }

/* ---------- spec list ---------- */
.qx-spec { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.qx-spec .r { display: grid; grid-template-columns: 220px 1fr; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.qx-spec .r:last-child { border-bottom: 0; }
.qx-spec .r .k { font-weight: 600; font-size: 14.5px; }
.qx-spec .r .v { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
@media (max-width: 620px) { .qx-spec .r { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- timeline ---------- */
.qx-tl { position: relative; padding-left: 26px; }
.qx-tl::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line-bright); }
.qx-tl .ti { position: relative; padding: 0 0 26px 0; }
.qx-tl .ti::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--text-faint); }
.qx-tl .ti.done::before { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.qx-tl .ti.active::before { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.qx-tl .st { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.qx-tl .ti.done .st { color: var(--mint); } .qx-tl .ti.active .st { color: var(--cyan); } .qx-tl .ti.next .st { color: var(--text-faint); }
.qx-tl h4 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 6px 0 6px; }
.qx-tl p { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 0; }

/* ---------- pricing ---------- */
.qx-price { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 720px) { .qx-price { grid-template-columns: 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 30px; position: relative; }
.tier.pro { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(69,226,234,0.25), 0 30px 80px -40px rgba(69,226,234,0.4); }
.tier .badge { position: absolute; top: 18px; right: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--cyan); border: 1px solid rgba(69,226,234,0.4); border-radius: 999px; padding: 4px 10px; }
.tier .plan { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); letter-spacing: .08em; }
.tier .price { font-family: var(--font-display); font-weight: 600; font-size: 46px; margin: 10px 0 2px; letter-spacing: -0.02em; }
.tier .price small { font-size: 15px; color: var(--text-dim); font-weight: 400; }
.tier .sub { color: var(--text-dim); font-size: 14.5px; margin-bottom: 20px; }
.tier ul { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.tier li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; color: var(--text-dim); font-size: 14px; line-height: 1.5; }
.tier li::before { content: "✓"; color: var(--mint); font-weight: 700; }
.tier .btn { width: 100%; justify-content: center; }

/* ---------- FAQ ---------- */
.qx-faq { display: grid; gap: 12px; }
.qx-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 18px; }
.qx-faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.qx-faq summary::-webkit-details-marker { display: none; }
.qx-faq summary::after { content: "+"; color: var(--cyan); font-size: 20px; }
.qx-faq details[open] summary::after { content: "–"; }
.qx-faq p { color: var(--text-dim); font-size: 14.5px; line-height: 1.6; padding: 0 0 18px; margin: 0; }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0; border: 1px solid var(--line-bright); border-radius: 18px; overflow: hidden; background: var(--surface); }
@media (max-width: 760px) { .calc { grid-template-columns: 1fr; } }
.calc-controls { padding: 26px; border-right: 1px solid var(--line); }
@media (max-width: 760px) { .calc-controls { border-right: 0; border-bottom: 1px solid var(--line); } }
.calc-controls h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 4px; }
.calc-controls .hint { color: var(--text-faint); font-size: 13px; margin: 0 0 20px; }
.ctrl { margin-bottom: 18px; }
.ctrl > label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; font-weight: 500; }
.ctrl .sub { color: var(--text-faint); font-size: 12px; margin-top: 6px; }
.in { width: 100%; background: var(--surface-2); border: 1px solid var(--line-bright); color: var(--text);
  border-radius: 10px; padding: 11px 12px; font-family: var(--font-body); font-size: 14px; }
.in:focus { outline: none; border-color: var(--cyan); }
select.in { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
input[type=range].in { padding: 0; background: transparent; border: 0; accent-color: var(--cyan); }
.seg { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 5px; }
.seg button { flex: 1; background: none; border: 0; color: var(--text-dim); font-family: var(--font-body); font-size: 13px;
  padding: 9px 8px; border-radius: 8px; cursor: pointer; transition: all .15s ease; }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-bright); }
.calc-readout { padding: 30px 26px; display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(120% 100% at 50% 0%, rgba(69,226,234,0.06), transparent 60%); }
.cost-big { font-family: var(--font-display); font-weight: 600; font-size: 56px; letter-spacing: -0.02em; line-height: 1; }
.cost-big small { font-size: 16px; color: var(--text-dim); font-weight: 400; }
.cost-unit { color: var(--text-dim); font-size: 13.5px; margin: 8px 0 18px; }
.cost-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cost-stats .s { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.cost-stats .s b { display: block; font-family: var(--font-mono); font-size: 17px; color: var(--cyan); }
.cost-stats .s span { font-size: 11.5px; color: var(--text-faint); }
.calc-foot { color: var(--text-faint); font-size: 12.5px; margin-top: 18px; line-height: 1.5; }

/* ---------- survival simulator + regime demo ---------- */
.sim { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.sim h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 0 0 18px; }
.sim-row { margin-bottom: 16px; }
.sim-row > label { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-dim); margin-bottom: 7px; }
.sim-row > label b { color: var(--text); font-family: var(--font-mono); }
.sim-out { margin-top: 22px; }
.sim-out .lab { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: .08em; margin-bottom: 6px; }
.sim-out .lab b { color: var(--text-dim); }
.sim-track { position: relative; height: 30px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 4px; }
.sim-bar { position: absolute; left: 0; top: 0; bottom: 0; display: flex; align-items: center; padding-left: 10px;
  font-family: var(--font-mono); font-size: 12px; color: #04060c; font-weight: 700; border-radius: 7px 0 0 7px; transition: width .25s ease; }
.sim-bar.no { background: linear-gradient(90deg, var(--coral), #ff8a9b); }
.sim-bar.yes { background: linear-gradient(90deg, var(--mint), #6af0c2); }
.sim-cap { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.sim-cap::after { content: "cap"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px; color: var(--gold); }
.sim-amt { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-bottom: 14px; }
.sim-verdict { border-radius: 12px; padding: 16px; font-size: 14px; line-height: 1.55; color: var(--text-dim); margin-top: 18px; border: 1px solid var(--line); }
.sim-verdict b { color: var(--text); }
.sim-verdict.win { border-color: rgba(54,224,160,0.4); background: rgba(54,224,160,0.06); }
.sim-verdict.lose { border-color: rgba(255,92,115,0.4); background: rgba(255,92,115,0.06); }

.regime-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.regime-btn { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 9px;
  padding: 9px 14px; font-size: 13px; cursor: pointer; font-family: var(--font-body); transition: all .15s ease; }
.regime-btn.on { border-color: var(--cyan); color: var(--text); box-shadow: 0 0 0 1px rgba(69,226,234,0.3); }
.regime-head { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.regime-head b { color: var(--cyan); }
.rob-row { display: grid; grid-template-columns: 1.3fr 2fr auto; gap: 14px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.rob-row:first-child { border-top: 0; }
.ri-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.ri-name { font-size: 14px; color: var(--text); }
.rob-track { position: relative; height: 22px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.rob-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; transition: width .3s ease; opacity: .8; }
.rob-fit { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 11px; color: var(--text); }
.rob-act { font-family: var(--font-mono); font-size: 12px; text-align: right; min-width: 92px; }
.rob-act.run { color: var(--mint); } .rob-act.scale { color: var(--gold); } .rob-act.pause { color: var(--coral); }

/* ---------- strategy library ---------- */
.lib-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.lib-controls .grow { flex: 1; min-width: 200px; }
.lib-count { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.lib-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 760px) { .lib-grid { grid-template-columns: 1fr; } }
.lib-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; }
.lib-card:hover { border-color: var(--line-bright); }
.lib-meta { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.lib-meta span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.lib-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin: 0 0 8px; }
.lib-card .desc { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 0 0 16px; }
.lib-preset { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; font-family: var(--font-mono);
  font-size: 12px; color: var(--text-dim); white-space: pre-wrap; line-height: 1.5; max-height: 168px; overflow: auto; margin: 0 0 14px; }
.lib-copy { align-self: flex-start; }

/* ---------- prompt forge ---------- */
.forge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 820px) { .forge-grid { grid-template-columns: 1fr; } }
.fg-input { width: 100%; min-height: 150px; resize: vertical; background: var(--surface-2); border: 1px solid var(--line-bright);
  color: var(--text); border-radius: 12px; padding: 16px; font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
.fg-input:focus { outline: none; border-color: var(--cyan); }
.fg-quicks { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.fg-quick { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim); border-radius: 999px;
  padding: 7px 13px; font-size: 12.5px; cursor: pointer; font-family: var(--font-body); }
.fg-quick:hover { border-color: var(--cyan); color: var(--text); }
.fg-actions { display: flex; gap: 10px; }
.fg-out { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; font-family: var(--font-mono);
  font-size: 12.5px; color: var(--mint); white-space: pre-wrap; line-height: 1.55; min-height: 260px; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; }
.auth-card { background: var(--surface); border: 1px solid var(--line-bright); border-radius: 18px; padding: 32px; }
.auth-card h1 { font-family: var(--font-display); font-weight: 600; font-size: 26px; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-dim); font-size: 14.5px; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 7px; }
.auth-note { color: var(--text-faint); font-size: 12.5px; margin-top: 18px; line-height: 1.5; text-align: center; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-dim); }
.auth-alt a { color: var(--cyan); }
.form-msg { font-size: 13.5px; margin-top: 12px; min-height: 18px; }
.form-msg.ok { color: var(--mint); } .form-msg.err { color: var(--coral); }

/* ---------- prose (docs / legal) ---------- */
.prose { max-width: 760px; }
.prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 36px 0 12px; }
.prose h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; margin: 26px 0 10px; }
.prose p, .prose li { color: var(--text-dim); font-size: 15.5px; line-height: 1.7; }
.prose ul { padding-left: 20px; } .prose a { color: var(--cyan); }
.prose code { font-family: var(--font-mono); font-size: 13px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px 6px; color: var(--cyan); }

/* ---------- misc ---------- */
.qx-note { border: 1px solid var(--line); border-left: 3px solid var(--cyan); background: var(--surface);
  border-radius: 0 12px 12px 0; padding: 16px 20px; color: var(--text-dim); font-size: 14px; line-height: 1.6; }
.qx-note b { color: var(--text); }
.center-cta { text-align: center; margin-top: 40px; }
.muted { color: var(--text-faint); }
main.page { min-height: 60vh; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* ==========================================================================
   Auth pages — login and signup.

   .in:focus did `outline: none` and changed only the border colour. Removing
   the outline without a strong replacement is the standard way keyboard users
   get stranded: a 1px hue shift is easy to miss, and on these two pages a
   person who cannot see which field is active cannot sign in at all.
   ========================================================================== */

.in {
  transition: border-color .18s ease, box-shadow .22s ease, background .18s ease;
}
.in:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(69,226,234,.16);
  background: rgba(69,226,234,.03);
}
/* Autofill repaints the field with the browser's own colours and drops the
   theme entirely; this holds the dark surface. */
.in:-webkit-autofill,
.in:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--surface-2) inset, 0 0 0 3px rgba(69,226,234,.16);
}

/* The card arrives rather than appearing. One short movement on load — these
   pages are a waypoint, and anything longer is a delay between someone
   deciding to sign in and being able to. */
.auth-card, .card.auth, form.auth {
  animation: tx-auth-in .42s cubic-bezier(.22,.7,.3,1) both;
}
@keyframes tx-auth-in {
  from { opacity: 0; transform: translateY(10px) scale(.995); }
  to   { opacity: 1; transform: none; }
}

/* Submitting: the button says so and stops accepting a second press. A form
   that looks idle while a request is in flight gets clicked twice, and on
   signup that means two accounts. */
.btn[aria-busy="true"], .btn.is-loading {
  pointer-events: none; opacity: .72; position: relative;
}
.btn[aria-busy="true"]::before, .btn.is-loading::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: tx-spin .6s linear infinite; flex: none;
}
@keyframes tx-spin { to { transform: rotate(360deg); } }

/* A rejected sign-in shakes once. Colour alone fails for the ~8% of men with
   a red-green deficiency, and movement is read by everyone. */
.auth-error, .form-error, .err.show, .form-msg.bad, .form-msg.error {
  animation: tx-shake .32s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes tx-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card, .card.auth, form.auth,
  .auth-error, .form-error, .err.show, .form-msg.bad, .form-msg.error { animation: none; }
  .in { transition: none; }
  .btn[aria-busy="true"]::before, .btn.is-loading::before { animation: none; }
}

/* ---------- legal documents ---------- */
.prose .lede-sm{color:var(--text);font-size:16.5px;line-height:1.7;margin:0 0 22px}
.legal-stamp{font-size:13px;color:var(--text-faint);line-height:1.65;border-left:2px solid var(--line-bright);
  padding-left:13px;margin:14px 0 22px}
.legal-nav{display:flex;flex-wrap:wrap;gap:9px;margin:0 0 30px}
.legal-nav a{font-family:var(--font-mono);font-size:11.5px;letter-spacing:.04em;text-transform:uppercase;
  border:1px solid var(--line);border-radius:999px;padding:6px 13px;color:var(--text-dim);text-decoration:none}
.legal-nav a:hover{border-color:var(--line-bright);color:var(--text)}
.legal-callout{border:1px solid rgba(244,183,64,.34);background:rgba(244,183,64,.06);border-radius:12px;
  padding:16px 18px;margin:0 0 26px;color:var(--text-dim);font-size:14.5px;line-height:1.65}
.legal-callout b{color:var(--text)}
.legal-fill{font-family:var(--font-mono);font-size:.9em;color:var(--gold);
  background:rgba(244,183,64,.10);border:1px dashed rgba(244,183,64,.42);border-radius:5px;padding:1px 5px}
.legal-table{width:100%;border-collapse:collapse;margin:14px 0 4px;font-size:13.5px;display:block;overflow-x:auto}
.legal-table th,.legal-table td{border:1px solid var(--line);padding:9px 11px;text-align:left;vertical-align:top}
.legal-table th{color:var(--text);font-weight:600;background:var(--surface)}
.legal-table td{color:var(--text-dim)}

/* Mobile: stop four- and five-column grids collapsing to unreadable slivers --
   measured at 390px, .vs-stats gave each figure 76px and .agents gave 54px. */
@media (max-width: 640px) {
  .vs-stats { grid-template-columns: repeat(2, 1fr); gap: 10px 8px; }
  .agents   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .agents { grid-template-columns: 1fr; }
}
