/* MCAT Invest (mcatinvest.org): the investing side of Anki Markets on its own domain. The same design
   system (app.css tokens and components), its own identity: a graphite canvas, a signal-orange accent in
   place of the blue, a slimmer header with the ticker tape under it, and a front page for visitors.
   Green and red still mean up and down, never the brand. */

:root[data-site="invest"] {
  --blue: #ea580c;
  --blue-hover: #c2410c;
  --blue-soft: rgba(234, 88, 12, .12);
  --bg: #f7f6f3;
  --bg-soft: #efede8;
  --bg-hover: #f3f1ed;
  --line: #e6e2db;
  --line-2: #d6d0c6;
}
@media (prefers-color-scheme: dark) {
  :root[data-site="invest"]:not([data-theme="light"]) {
    --blue: #f97316;
    --blue-hover: #fb923c;
    --blue-soft: rgba(249, 115, 22, .16);
    --bg: #0b0d12;
    --bg-soft: #171b23;
    --bg-hover: #151921;
    --panel: #11141a;
    --line: #1f2430;
    --line-2: #2b3240;
  }
}
:root[data-site="invest"][data-theme="dark"] {
  --blue: #f97316;
  --blue-hover: #fb923c;
  --blue-soft: rgba(249, 115, 22, .16);
  --bg: #0b0d12;
  --bg-soft: #171b23;
  --bg-hover: #151921;
  --panel: #11141a;
  --line: #1f2430;
  --line-2: #2b3240;
}
:root[data-site="invest"] .btn.blue { box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); }
:root[data-site="invest"] .wallet-btn { background: var(--blue); }

/* ----- the header: logo, the section nav, wallet and account; the tape below */
.ih .ih-row { gap: 28px; }
.ih-logo { font-size: 17px; letter-spacing: -.02em; gap: 8px; }
.ih-logo b { font-weight: 800; color: var(--blue); margin-left: 1px; }
.ih-mark { width: 24px; height: 24px; fill: var(--blue); color: var(--blue); }
.logo.sm .ih-mark { width: 19px; height: 19px; }
.ih-nav { display: flex; align-items: center; gap: 2px; height: 64px; }
.ih-nav a { position: relative; display: inline-flex; align-items: center; height: 64px; padding: 0 12px; color: var(--text-2); font-weight: 500; font-size: 14.5px; transition: color var(--dur); }
.ih-nav a:hover { color: var(--text); }
.ih-nav a.on { color: var(--text); font-weight: 600; }
.ih-nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--blue); border-radius: 2px 2px 0 0; }
.ih-right { gap: 8px; }
.ih-tape { position: relative; height: 0; overflow: hidden; background: var(--bg); border-top: 1px solid var(--line); transition: height var(--dur-slow) var(--ease); }
.ih-tape.on { height: 34px; }
.ih-tape::before, .ih-tape::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 1; pointer-events: none; }
.ih-tape::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.ih-tape::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.ih-tape-track { display: flex; width: max-content; height: 34px; align-items: center; animation: ih-scroll 90s linear infinite; }
.ih-tape:hover .ih-tape-track { animation-play-state: paused; }
@keyframes ih-scroll { to { transform: translateX(-50%); } }
.ih-tape-item { display: inline-flex; align-items: center; gap: 7px; padding: 0 18px; font-size: 12.5px; white-space: nowrap; color: var(--text-2); border-right: 1px solid var(--line); transition: color var(--dur); }
.ih-tape-item:hover { color: var(--text); }
.ih-tape-item b { color: var(--text); font-weight: 700; letter-spacing: .01em; }
.ih-tape-item span { font-variant-numeric: tabular-nums; }
.ih-tape-item em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .ih-tape-track { animation: none; } }

/* ----- the front page for visitors */
.ivx-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; padding: 44px 0 40px; margin: 0 0 28px; border-bottom: 1px solid var(--line); background-image: radial-gradient(var(--line-2) .8px, transparent .8px); background-size: 22px 22px; background-position: 0 0; }
.ivx-kick { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text-2); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.ivx-kick::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--yes); animation: blink 1.4s infinite; }
.ivx-kick.off::before { background: var(--text-3); animation: none; }
.ivx-copy h1 { margin-top: 18px; font-size: clamp(36px, 4.6vw, 60px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ivx-copy h1 em { font-style: normal; color: var(--blue); }
.ivx-copy p { margin-top: 16px; font-size: 17px; line-height: 1.5; color: var(--text-2); max-width: 540px; }
.ivx-cta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.ivx-more { margin-left: 4px; color: var(--text-2); font-weight: 600; font-size: 14px; transition: color var(--dur); }
.ivx-more:hover { color: var(--text); }
.ivx-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.ivx-stats div { display: grid; gap: 2px; }
.ivx-stats b { font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ivx-stats span { font-size: 12.5px; color: var(--text-2); }
.ivx-chart { padding: 16px 18px 14px; background: var(--panel); }
.ivx-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ivx-chart-head > div { display: flex; align-items: center; gap: 10px; }
.ivx-chart-head b { display: block; font-weight: 700; font-size: 15px; }
.ivx-chart-head small { display: block; color: var(--text-2); font-size: 12.5px; }
.ivx-chart-head .r { display: grid; justify-items: end; gap: 2px; }
.ivx-chart-head .r b { font-size: 20px; letter-spacing: -.02em; }
.ivx-chart .chart { margin-top: 8px; }
.ivx-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.ivx-mini a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name spark" "price spark" "chg spark"; column-gap: 6px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); transition: border-color var(--dur), background var(--dur); }
.ivx-mini a:hover { border-color: var(--line-2); background: var(--bg-hover); }
.ivx-mini small { grid-area: name; color: var(--text-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivx-mini b { grid-area: price; font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ivx-mini .chg { grid-area: chg; font-size: 11.5px; }
.ivx-mini .spark { grid-area: spark; width: 44px; height: 24px; align-self: center; }

/* ----- the sections below the markets, for visitors */
.ivx-sec { padding: 52px 0 6px; }
.ivx-sec-head { max-width: 660px; margin-bottom: 22px; }
.ivx-sec-head small { display: inline-block; color: var(--blue); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ivx-sec-head h2 { margin-top: 8px; font-size: clamp(24px, 2.6vw, 32px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ivx-sec-head p { margin-top: 10px; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }
.ivx-feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ivx-feat .card { padding: 20px 20px 18px; display: grid; gap: 12px; align-content: start; }
.ivx-feat .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.ivx-feat .ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ivx-feat h3 { font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.ivx-feat p { color: var(--text-2); font-size: 14px; line-height: 1.5; }
.ivx-sample { margin-top: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); padding: 10px 12px; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ivx-sample .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; }
.ivx-sample .row > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ivx-sample .row .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ivx-ticket .row + .row { border-top: 1px solid var(--line); }
.ivx-sample b { font-weight: 600; }
.ivx-sample .sym-tile.sm { width: 22px; height: 22px; font-size: 8.5px; border-radius: 6px; }
.ivx-book { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ivx-book div { border-radius: 8px; padding: 8px 10px; display: grid; gap: 1px; }
.ivx-book .bid { background: var(--yes-soft); color: var(--yes-ink); }
.ivx-book .ask { background: var(--no-soft); color: var(--no-ink); }
.ivx-book small { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.ivx-book b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.ivx-book span { font-size: 12px; opacity: .9; }
.ivx-chain { width: 100%; border-collapse: collapse; }
.ivx-chain th { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); text-align: right; padding: 2px 0 6px; white-space: nowrap; }
.ivx-chain th:first-child, .ivx-chain td:first-child { text-align: left; }
.ivx-chain td { text-align: right; padding: 5px 0; border-top: 1px solid var(--line); white-space: nowrap; }
.ivx-chain td:first-child { font-weight: 600; }
.ivx-chain tr.atm td:first-child { color: var(--blue); font-weight: 700; }
.ivx-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ivx-step { padding: 22px 20px 20px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel); box-shadow: var(--shadow); }
.ivx-step i { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--panel); font-style: normal; font-weight: 800; font-size: 13px; }
.ivx-step h3 { margin-top: 14px; font-size: 16.5px; font-weight: 700; letter-spacing: -.015em; }
.ivx-step p { margin-top: 6px; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.ivx-band { margin-top: 52px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 30px 32px; border-radius: var(--r-lg); background: var(--text); color: var(--bg); }
.ivx-band h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.ivx-band p { margin-top: 6px; opacity: .72; font-size: 14.5px; }
.ivx-band-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.ivx-band .btn.ghost { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 30%, transparent); background: transparent; }
.ivx-band .btn.ghost:hover { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.ivx-top { display: flex; align-items: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ivx-top a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: color-mix(in srgb, var(--bg) 12%, transparent); color: inherit; font-size: 13px; transition: background var(--dur); }
.ivx-top a:hover { background: color-mix(in srgb, var(--bg) 20%, transparent); }
.ivx-top a b { font-weight: 700; }
.ivx-top a span { opacity: .7; font-variant-numeric: tabular-nums; }
.ivx-top-more { font-size: 13px; opacity: .6; margin-left: 2px; white-space: nowrap; }

/* ----- a player's page */
.narrow-wide { max-width: 1100px; margin: 0 auto; }
.pf-head { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.pf-head .av.lg { flex: none; }
.pf-id { min-width: 0; flex: 1; }
.pf-id h1 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-id p { margin-top: 4px; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pf-bio { color: var(--text-2); }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.pf-stats .card { padding: 14px 16px; display: grid; gap: 2px; }
.pf-stats small { color: var(--text-2); font-size: 12.5px; font-weight: 500; }
.pf-stats b { display: inline-flex; align-items: center; gap: 5px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pf-stats b .coin { width: 18px; height: 18px; }
.pf-stats b.up { color: var(--yes-ink); }
.pf-stats b.down { color: var(--no-ink); }
.pf-stats span { color: var(--text-3); font-size: 12.5px; }
.pf-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-top: 16px; }
.pf-main { display: grid; gap: 16px; min-width: 0; }
.pf-side { min-width: 0; }
.pf-h { font-size: 15px; font-weight: 600; padding: 14px 18px 8px; }
.pf-side .pf-h { padding: 0 0 10px; }
.pf-trades { display: grid; }
.pf-trade { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); color: inherit; }
.pf-trade:first-child { border-top: 0; }
.pf-trade .r { text-align: right; display: grid; font-variant-numeric: tabular-nums; }
.pf-trade .r b { font-weight: 600; }
.pf-trade .r small { color: var(--text-3); font-size: 11.5px; }
@media (max-width: 920px) { .pf-cols { grid-template-columns: minmax(0, 1fr); } .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pf-head { flex-wrap: wrap; } }

/* ----- the phone tab bar in the brand */
.ih-tabbar a[data-nav].on, .ih-tabbar a[data-nav].on svg { color: var(--blue); stroke: var(--blue); }
.ih-tabbar a[data-nav="invest"], .ih-tabbar a[data-nav="options"] { color: var(--text-2); }
.ih-tabbar a[data-nav="invest"] svg, .ih-tabbar a[data-nav="options"] svg { stroke: var(--text-2); }

@media (max-width: 920px) {
  .ivx-hero { grid-template-columns: minmax(0, 1fr); padding: 28px 0 28px; }
  .ih-nav { display: none; }
  .ivx-feat, .ivx-steps { grid-template-columns: minmax(0, 1fr); }
  .ivx-band { grid-template-columns: minmax(0, 1fr); padding: 24px 22px; }
}
@media (max-width: 680px) {
  .hdr .ih-logo span { display: inline; }
  .hdr .ih-logo { font-size: 16px; }
}
@media (max-width: 560px) {
  .ivx-copy h1 { font-size: 36px; }
  .ivx-mini { grid-template-columns: minmax(0, 1fr); }
  .ivx-sec { padding-top: 36px; }
  .ivx-copy p { font-size: 15.5px; }
  .ivx-stats { gap: 18px; }
  .ih-tape.on { height: 30px; }
  .ih-tape-track { height: 30px; }
}
