/* Base: tokens, reset, typography and accessibility helpers.
   Palette and type sampled from the game's Investment Terminal (main menu and
   trading floor captures), an early 2000s Windows trading app. */

:root {
  /* Surfaces */
  --bg-top: #0f1625;
  --bg-bottom: #060a12;
  --panel: #0f141f;
  --panel-hover: #151c2b;
  --chart: #150d0e;
  --status: #121c2e;
  --ink: #04060a;

  /* Window chrome */
  --title-top: #3a4f70;
  --title-mid: #293f5f;
  --title-bottom: #172d4e;
  --chrome-edge: #2e4261;

  /* Selection (the highlighted menu row) */
  --sel-top: #588bcb;
  --sel-mid: #4477b7;
  --sel-bottom: #3063a3;
  --sel-edge: #7aa6dc;

  /* Lines */
  --rule: #2c3547;
  --rule-soft: #1a2130;

  /* Text and values */
  --text: #e3e8f0;
  --label: #8e99ad;
  --dim: #6b778c;
  --head: #6197d9;
  --quote: #ebf0cc;
  --green: #5bdd85;
  --gold: #f2cc60;
  --blue: #7fb2ff;
  --red: #ea6a6f;

  /* Type: the Windows UI faces the game itself uses */
  --font-ui: "Segoe UI", Tahoma, Verdana, "Helvetica Neue", Arial, sans-serif;
  --font-num: Consolas, "Lucida Console", "Courier New", monospace;
  --font-heavy: "Arial Black", "Segoe UI Black", Impact, sans-serif;

  --gutter: 16px;
  --max: 1180px;

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0, var(--bg-bottom) 720px) var(--bg-bottom);
  overflow-x: hidden;
}

img,
svg,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

a:hover {
  color: #b3d1ff;
}

button {
  font: inherit;
  color: inherit;
}

small {
  font-size: 0.8em;
}

/* Value colors, as in the game's ledgers. */
.v-green { color: var(--green); }
.v-gold { color: var(--gold); }
.v-blue { color: var(--blue); }
.v-red { color: var(--red); }
.up { color: var(--green); }
.down { color: var(--red); }

.money {
  font-family: var(--font-num);
  color: var(--green);
}

.fineprint {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--dim);
}

.footnote-ref {
  color: var(--gold);
  text-decoration: none;
}

:focus-visible {
  outline: 2px dotted var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--gold);
}

.skip-link:focus {
  top: 8px;
  color: var(--ink);
}

.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;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
