/* colours are the RICO palette */
:root {
  --c0: #1a1625; --c1: #2e2a3f; --c2: #4a4560; --c3: #7a7391;
  --c4: #c9c3d6; --c5: #f2ece4; --c11: #b0607a; --c12: #e39a9a;
  --c9: #8db3a8; --c15: #e3c78f;
}

* { box-sizing: border-box; }

html { background: var(--c0); }

body {
  margin: 0;
  color: var(--c4);
  font: 15px/1.55 ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

a { color: var(--c15); }
a:hover { color: var(--c5); }

nav {
  background: var(--c1);
  border-bottom: 2px solid var(--c2);
}

nav .wrap { display: flex; gap: 20px; align-items: center; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
nav a { color: var(--c4); text-decoration: none; }
nav a.here, nav a:hover { color: var(--c15); }
nav .brand { color: var(--c5); font-weight: bold; margin-right: auto; }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }

main { padding: 24px 0 60px; }

h1, h2, h3 { color: var(--c5); line-height: 1.25; }
h1 { font-size: 26px; }
h2 { font-size: 20px; margin-top: 44px; padding-bottom: 6px; border-bottom: 2px solid var(--c2); }
h3 { font-size: 16px; margin-top: 28px; color: var(--c15); }

table { border-collapse: collapse; width: 100%; margin: 12px 0; }
th, td { text-align: left; vertical-align: top; padding: 6px 10px; border-bottom: 1px solid var(--c1); }
th { color: var(--c3); font-weight: normal; }
td:first-child { white-space: nowrap; }
table.spec td:first-child { color: var(--c5); font-weight: bold; width: 1%; }
table.api td:first-child { white-space: normal; width: 42%; }

code, pre { font-family: inherit; color: var(--c5); }
code.fn { color: var(--c15); }
pre {
  background: var(--c1);
  border-left: 3px solid var(--c2);
  padding: 12px 14px;
  overflow-x: auto;
}

kbd {
  font-family: inherit;
  color: var(--c5);
  background: var(--c2);
  padding: 0 5px;
  border-radius: 2px;
}

.muted { color: var(--c3); }
.toc { columns: 2; padding-left: 20px; }
.pill { display: inline-block; background: var(--c2); color: var(--c5); padding: 1px 6px; margin: 1px; }

/* home */
.hero { text-align: center; padding: 40px 0 20px; }
.hero img.logo { width: 192px; height: 192px; image-rendering: pixelated; }
.hero h1 { font-size: 34px; margin: 18px 0 4px; }
.hero p { margin: 4px 0; }
.buttons { margin: 26px 0; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none;
  background: var(--c15); color: var(--c0); padding: 8px 18px; font-weight: bold;
}
.btn.alt { background: var(--c2); color: var(--c5); }
.btn:hover { background: var(--c5); color: var(--c0); }
.shot { display: block; margin: 20px auto; max-width: 100%; width: 768px; image-rendering: pixelated; border: 2px solid var(--c2); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.card { background: var(--c1); padding: 12px 16px; }
.card h3 { margin-top: 4px; }

/* cheatsheet */
.sheet { columns: 3 280px; column-gap: 18px; }
.sheet section { break-inside: avoid; background: var(--c1); padding: 8px 12px; margin-bottom: 14px; }
.sheet h3 { margin: 2px 0 6px; font-size: 14px; }
.sheet table { margin: 0; font-size: 13px; }
.sheet td { padding: 2px 4px; border: 0; white-space: normal; }
.sheet pre { font-size: 13px; margin: 0; padding: 4px 0; background: none; border: 0; }

footer { color: var(--c3); border-top: 2px solid var(--c1); padding: 16px 0 30px; font-size: 13px; }

@media print {
  html, body { background: #fff; color: #000; }
  nav, footer { display: none; }
  .sheet section { background: #fff; border: 1px solid #999; }
  .sheet h3, code, pre, a { color: #000; }
}
