/* The LiteBlox website. Colours are the app's (liteblox/static/app.css). */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2330;
  --muted: #5d6878;
  --border: #d9dee6;
  --accent: #2563eb;
  --accent-text: #ffffff;
  --notice-bg: #eef4ff;
  --code-bg: #eef0f4;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161d;
    --surface: #1b2029;
    --text: #e4e8ee;
    --muted: #97a1b0;
    --border: #2d3440;
    --accent: #5b8def;
    --accent-text: #0d1117;
    --notice-bg: #1d2840;
    --code-bg: #232935;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); overflow-wrap: break-word; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: .4rem .8rem; border-radius: var(--radius); z-index: 2; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1.5rem; padding-top: .6rem; padding-bottom: .6rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 650; font-size: 1.1rem; text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: .1rem 1.1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: .2rem 0; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--text); }
.site-header nav a[aria-current] { font-weight: 600; }

.hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 3.5rem 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center; }
.hero h1 { font-size: 3rem; line-height: 1.1; margin: 0 0 .75rem; letter-spacing: -.02em; }
.tagline { font-size: 1.2rem; margin: 0 0 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.button { display: inline-block; padding: .55rem 1.2rem; border-radius: var(--radius); background: var(--accent); border: 1px solid var(--accent); color: var(--accent-text); font-weight: 600; text-decoration: none; }
.button.quiet { background: transparent; color: var(--accent); }
.version { color: var(--muted); font-size: .9rem; margin: 0; }
.shot img, figure img { display: block; border: 1px solid var(--border); border-radius: var(--radius); }

.prose { padding-top: 2rem; padding-bottom: 3rem; min-width: 0; }
.narrow { max-width: 860px; }
.prose h1 { font-size: 2.1rem; line-height: 1.2; margin: 0 0 1rem; }
.prose h2 { font-size: 1.5rem; line-height: 1.3; margin: 2.4rem 0 .8rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.prose > :first-child { margin-top: 0; }
.prose code { font: .9em var(--mono); background: var(--code-bg); padding: .1em .3em; border-radius: 4px; }
.prose pre { background: var(--code-bg); padding: .9rem 1rem; border-radius: var(--radius); overflow-x: auto; line-height: 1.45; }
.prose pre code { background: none; padding: 0; font-size: .875rem; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--border); padding: .4rem .7rem; text-align: left; vertical-align: top; }
.prose th { background: var(--surface); }
.prose blockquote { margin: 1rem 0; padding: .6rem 1rem; background: var(--notice-bg); border-radius: var(--radius); }
.prose blockquote > :first-child { margin-top: 0; }
.prose blockquote > :last-child { margin-bottom: 0; }

.lead { font-size: 1.1rem; max-width: 800px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.cards > section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
.cards h3 { margin-top: 0; }
.cards ul { margin: 0; padding-left: 1.1rem; }
.cards li + li { margin-top: .4rem; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 1.5rem; }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; }
.docs main { grid-column: 2; grid-row: 1; }
.sidebar { grid-column: 1; grid-row: 1; padding-top: 2rem; }
.sidebar h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 .5rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar a { display: block; padding: .2rem .5rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .95rem; }
.sidebar a:hover { background: var(--surface); }
.sidebar a[aria-current] { background: var(--notice-bg); color: var(--accent); font-weight: 600; }
.to-pages { display: none; font-size: .9rem; }
.on-page { float: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .9rem; margin-bottom: 1.2rem; }
.on-page summary { cursor: pointer; font-weight: 600; }
.on-page ul { margin: .4rem 0 .2rem; padding-left: 1.1rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1rem; }
.doc-list dt { font-weight: 600; margin-top: 1rem; }
.doc-list dd { margin: .1rem 0 0; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; padding: 1.2rem 0; }
.site-footer p { margin: .2rem 0; }

@media (max-width: 820px) {
  .hero { padding: 2rem 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hero h1 { font-size: 2.4rem; }
  .docs { display: block; }
  .to-pages { display: block; }
  .sidebar { border-top: 1px solid var(--border); padding-bottom: 2rem; }
}
