/* FutisTrack site — shared styles */

:root {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --text: #171b22;
  --text-muted: #57606f;
  --border: #dee2ea;
  --accent: #2a5fd6;
  --accent-soft: #eaf0fe;
  --accent-contrast: #2a5fd6;
  --accent-green: #1e8e5a;
  --mono-bg: #eef1f6;
  --shadow: 0 1px 2px rgba(23, 27, 34, 0.05), 0 8px 24px rgba(23, 27, 34, 0.06);

  /* Header stays dark on both themes to match the brand mark's artwork. */
  --header-bg: #05070a;
  --header-text: #f2f4f8;
  --header-muted: #a7b0c0;
  --header-accent: #6f9bff;
  --header-border: #1a2030;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d12;
    --bg-elevated: #12151c;
    --text: #e7eaf1;
    --text-muted: #9aa3b2;
    --border: #232838;
    --accent: #7fa2ff;
    --accent-soft: #16233f;
    --accent-contrast: #3f6fe0;
    --accent-green: #3fc182;
    --mono-bg: #171b24;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0d12;
  --bg-elevated: #12151c;
  --text: #e7eaf1;
  --text-muted: #9aa3b2;
  --border: #232838;
  --accent: #7fa2ff;
  --accent-soft: #16233f;
  --accent-green: #3fc182;
  --mono-bg: #171b24;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.4);
}
:root[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-elevated: #ffffff;
  --text: #171b22;
  --text-muted: #57606f;
  --border: #dee2ea;
  --accent: #2a5fd6;
  --accent-soft: #eaf0fe;
  --accent-contrast: #2a5fd6;
  --accent-green: #1e8e5a;
  --mono-bg: #eef1f6;
  --shadow: 0 1px 2px rgba(23, 27, 34, 0.05), 0 8px 24px rgba(23, 27, 34, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.2;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

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

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--header-text);
}

.brand img {
  height: 36px;
  width: auto;
  display: block;
  border-radius: 6px;
}

nav.site-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

nav.site-nav a {
  color: var(--header-muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a[aria-current="page"] {
  color: var(--header-text);
  border-bottom-color: var(--header-accent);
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.hero-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 28px;
  border-radius: 22px;
  background: var(--header-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.hero-mark img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.hero h1 {
  font-size: 2.4rem;
  margin: 0 0 18px;
}

.hero h1 .track {
  color: var(--accent);
}

.hero p.lede {
  max-width: 56ch;
  margin: 0 auto 36px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.button-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--accent-contrast);
  border-color: var(--accent-contrast);
  color: #ffffff;
}

.btn.primary:hover {
  border-color: var(--accent-contrast);
  opacity: 0.92;
}

/* ---------- Generic page/document layout ---------- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

.page h1 {
  font-size: 2rem;
  margin: 0 0 6px;
}

.meta {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.lede {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 62ch;
}

section.clause {
  margin-bottom: 36px;
  scroll-margin-top: 24px;
}

section.clause h2 {
  font-size: 1.28rem;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
}

section.clause h2 .n {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
}

section.clause p {
  margin: 0 0 14px;
}

section.clause p:last-child {
  margin-bottom: 0;
}

section.clause ul {
  margin: 0 0 14px;
  padding-left: 1.3em;
}

section.clause li {
  margin-bottom: 6px;
}

.glance {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 44px;
}

.glance-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 14px;
}

.glance ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.glance li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 0.97rem;
}

.glance li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  margin-top: 8px;
}

nav.toc {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-bottom: 44px;
}

nav.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
  font-size: 0.92rem;
}

nav.toc li {
  break-inside: avoid;
  margin-bottom: 8px;
}

nav.toc a {
  color: var(--text);
  text-decoration: none;
}

nav.toc a:hover {
  color: var(--accent);
}

nav.toc .toc-num {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color: var(--text-muted);
  margin-right: 8px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 14px;
}

table.data {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  font-size: 0.93rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.data th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

code {
  font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  background: var(--mono-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

/* ---------- Support cards ---------- */

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}

.support-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.support-card h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.support-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .support-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 48px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 560px) {
  .page {
    padding: 40px 18px 72px;
  }
  .page h1 {
    font-size: 1.6rem;
  }
  nav.toc ol {
    columns: 1;
  }
  .hero {
    padding: 52px 0 40px;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
}
