/*
 * Trading Vision website - one stylesheet, no scripts.
 *
 * Colours are the app's own (theme.config.js), each pair measured at 4.5:1 or better: light link
 * #08739a on white 5.34, on #f5f5f5 4.90; dark text #ECEDEE on #151718 15.34. The dark link is NOT
 * the app's #0a7ea4 (3.88:1 on #151718, a known gap) but #5ec8ef, 9.41:1.
 *
 * Sizes are in rem so the reader's own text size is respected; nothing moves, so reduced motion is
 * honoured by having no motion at all.
 */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --text: #11181c;
  --muted: #687076;
  --border: #d1d5db;
  --link: #08739a;
  --button-bg: #08739a;
  --button-text: #ffffff;
  --focus: #b45309;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151718;
    --surface: #1e2022;
    --text: #ecedee;
    --muted: #9ba1a6;
    --border: #334155;
    --link: #5ec8ef;
    --button-bg: #5ec8ef;
    --button-text: #151718;
    --focus: #fbbf24;
  }
}

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

html {
  font-size: 112.5%; /* 18px at the browser's default, and larger whenever the reader sets larger */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  padding: 0.75rem 1rem;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 700;
  z-index: 10;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header.site {
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  min-height: 44px;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

nav a[aria-current="page"] {
  font-weight: 700;
  color: var(--text);
}

main {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.25rem;
}

p,
li {
  max-width: 42rem;
}

.lead {
  font-size: 1.2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin: 1.5rem 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 700;
  text-decoration: none;
}

.note {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.card h3 {
  margin-top: 0;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

footer.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  padding: 0;
  margin: 0.75rem 0;
  list-style: none;
}

footer.site a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (forced-colors: active) {
  .button,
  .card {
    border: 2px solid ButtonText;
  }
}
