/* docs.akteora.com. System fonts, no web fonts; light and dark from the visitor's setting. */

:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --sunken: #f3f3f1;
  --text: #16181d;
  --muted: #5b606b;
  --border: #e2e2de;
  --accent: #2f55d4;
  --accent-soft: #e9eefc;
  --code: #f4f4f2;
  --radius: 8px;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #171a1f;
    --sunken: #1d2026;
    --text: #e8e9ec;
    --muted: #a0a5b0;
    --border: #2b2f37;
    --accent: #8ea6ff;
    --accent-soft: #1f2640;
    --code: #1b1e24;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
}

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.brand span {
  color: var(--muted);
  font-weight: 450;
}

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
}

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

.top nav a:hover {
  color: var(--text);
}

.layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  max-width: 76rem;
  margin: 0 auto;
}

.side {
  position: sticky;
  top: 3.3rem;
  align-self: start;
  max-height: calc(100vh - 3.3rem);
  overflow-y: auto;
  padding: 1.5rem 1rem 2rem 1.5rem;
  font-size: 0.9rem;
}

.side-title {
  margin: 1.25rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.side a {
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}

.side a:hover {
  background: var(--sunken);
}

.side a[aria-current='page'] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 550;
}

main {
  min-width: 0;
  max-width: 52rem;
  padding: 2rem 2rem 5rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.2;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  font-size: 1.4rem;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.1rem;
}

h2,
h3 {
  scroll-margin-top: 4rem;
}

:target {
  scroll-margin-top: 4rem;
}

code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--code);
  font-family: var(--mono);
  font-size: 0.88em;
}

pre {
  overflow-x: auto;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--code);
  line-height: 1.5;
}

pre code {
  padding: 0;
  background: none;
  font-size: 0.85rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

blockquote {
  margin: 1rem 0;
  padding: 0.25rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

body.reference {
  background: var(--surface);
}

@media (max-width: 52rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--border);
  }

  main {
    padding: 1.5rem 1.25rem 4rem;
  }
}
