/* The public ChronoHub guide (#194), in ChronoHub's colours (apps/ui/src/style.css).
   No web fonts: the site loads nothing but its own files. */
:root {
  --background: #f3f3f3;
  --paper: #ffffff;
  --text: #000000;
  --heading: #2a2a2a;
  --muted: #6b6b6b;
  --line: #e9e9e9;
  --info: #00bdc7;
  --link: #00777d;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --paper: #1a1a1a;
    --text: #ffffff;
    --heading: #ffffff;
    --muted: #b0b0b0;
    --line: #444444;
    --link: #3fd6de;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 16px/1.6 Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--link); }
a:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--paper);
  border-bottom: 3px solid var(--info);
}
.brand { color: var(--heading); font-size: 20px; font-weight: 700; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
.skip { position: absolute; left: -9999px; }
.skip:focus { position: static; }
/* On a phone the navigation follows the page; this jumps to it. */
.contents { display: none; }

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.nav {
  align-self: start;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}
.nav p { margin: 16px 0 4px; color: var(--heading); }
.nav p:first-child { margin-top: 0; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { margin: 2px 0; }
.nav a { display: block; padding: 3px 8px; border-radius: 4px; color: var(--text); text-decoration: none; }
.nav a:hover { background: var(--background); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--info) 18%, var(--paper)); font-weight: 600; }

.page {
  min-width: 0;
  padding: 24px 32px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.page h1, .page h2, .page h3 { color: var(--heading); line-height: 1.3; }
.page h1 { margin-top: 0; font-size: 28px; }
.page h2 { margin-top: 32px; font-size: 22px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.page h3 { margin-top: 24px; font-size: 18px; }
.page h4 { margin-top: 20px; font-size: 16px; }
.page img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.page table { width: 100%; border-collapse: collapse; margin: 16px 0; display: block; overflow-x: auto; }
.page th, .page td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.page th { background: var(--background); }
.page code { padding: 1px 4px; background: var(--background); border-radius: 4px; font-size: 0.9em; }
.page blockquote { margin: 16px 0; padding: 8px 16px; border-left: 4px solid var(--info); background: var(--background); }

.foot { max-width: 1200px; margin: 0 auto; padding: 0 24px 32px; color: var(--muted); font-size: 14px; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .nav { position: static; max-height: none; order: 2; }
  .page { padding: 16px; }
  .contents { display: inline; }
}
