/* haloaccess.org. Colors come from the painted app icon: navy tile, blue corona. */
:root {
  color-scheme: dark light;
  --bg: #050d2e;
  --bg-raised: #0b1a4f;
  --fg: #eef2ff;
  --muted: #b8c3e6;
  --line: #24367a;
  --accent: #8fb8ff;
  --accent-strong: #c9dcff;
  --button-bg: #8fb8ff;
  --button-fg: #04102f;
  --focus: #ffd65a;
  --max: 46rem;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8ff;
    --bg-raised: #e8eeff;
    --fg: #0a1236;
    --muted: #3c4670;
    --line: #c3cdf0;
    --accent: #1a4fc4;
    --accent-strong: #0d327f;
    --button-bg: #0d2468;
    --button-fg: #ffffff;
    --focus: #b35c00;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.125rem/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--button-bg); color: var(--button-fg);
  padding: .5rem 1rem; border-radius: 6px; z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: .2rem 0; }
.site-nav a:hover { color: var(--fg); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-decoration-thickness: 2px; }

/* Content */
main { padding: 2.5rem 0 3rem; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 2.3rem; margin: 0 0 1rem; }
h2 { font-size: 1.55rem; margin: 2.6rem 0 .75rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.2rem; margin: 1.8rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .45rem; }
.lede { font-size: 1.3rem; color: var(--muted); }
.small { font-size: .95rem; color: var(--muted); }
kbd { font: inherit; font-weight: 600; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center; }
.hero img { width: 180px; height: 180px; }
@media (min-width: 40rem) {
  .hero { grid-template-columns: 1fr auto; }
  .hero img { width: 220px; height: 220px; }
}

.button {
  display: inline-block;
  background: var(--button-bg); color: var(--button-fg);
  font-weight: 700; text-decoration: none;
  padding: .8rem 1.4rem; border-radius: 10px; margin: .4rem 0 .6rem;
}
.button:hover { color: var(--button-fg); filter: brightness(1.08); }

/* Tutorial table of contents */
.toc { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin: 1.5rem 0 1rem; }
.toc h2 { font-size: 1.15rem; margin: 0 0 .5rem; padding: 0; border: 0; }
.toc ol { margin: 0; padding-left: 1.4rem; }
.toc ol ol { margin-top: .35rem; list-style: disc; }
.toc li { margin-bottom: .3rem; }
.back-to-top { font-size: .95rem; }

.tutorial-pages { list-style: none; padding: 0; }
.tutorial-pages li { margin-bottom: 1rem; }
.tutorial-pages a { font-weight: 700; font-size: 1.15rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.site-footer .wrap { padding-top: 1.25rem; padding-bottom: 2rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
