/* Inkblot documentation. Plain, readable, the theme's own palette. */
:root {
  --bg: #ffffff;
  --fg: #171717;
  --muted: #5c5c5c;
  --line: #e5e5e5;
  --soft: #f6f5f2;
  --accent: #b86e00;      /* amber, darkened to 4.6:1 on white for text */
  --accent-bg: #fdf3e1;
  --warn-bg: #fdecea;
  --warn: #a8321f;
  --radius: 6px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --fg: #ececec;
    --muted: #a8a8a8;
    --line: #2e2e2e;
    --soft: #1e1e1e;
    --accent: #f6a529;
    --accent-bg: #2a2114;
    --warn-bg: #3a1c17;
    --warn: #ff9b8a;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius);
  z-index: 10;
}
.skip:focus { top: 12px; }

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--fg); font-weight: 700; font-size: 18px; text-decoration: none; }
.brand span { color: var(--muted); font-weight: 400; }
.version { color: var(--muted); font-size: 14px; }

.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  max-width: 1160px;
  margin: 0 auto;
}

.side { border-right: 1px solid var(--line); padding: 24px 16px; }
.side ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 24px; }
.side a {
  display: block;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: var(--radius);
  color: var(--fg);
  text-decoration: none;
}
.side a:hover { background: var(--soft); }
.side a[aria-current='page'] { background: var(--accent-bg); font-weight: 600; }

main { padding: 32px 40px 64px; max-width: 860px; }
main:focus { outline: none; }

h1 { font-size: 34px; line-height: 1.2; margin: 0 0 24px; }
h2 { font-size: 24px; line-height: 1.3; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 19px; margin: 32px 0 8px; }
h4 { font-size: 16px; margin: 24px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
h3.group { font-size: 16px; margin: 24px 0 8px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
table:focus-visible { outline-offset: 0; }
p, ul, ol, dl, table, pre, figure { margin: 0 0 16px; }
li { margin: 4px 0; }
code, kbd, pre { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--soft); padding: 1px 5px; border-radius: 4px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; padding: 0 5px; border-radius: 4px; }
pre { background: var(--soft); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }

nav[aria-label='On this page'] ul { columns: 2; padding-left: 20px; }

table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tbody th { font-weight: 600; min-width: 160px; }

aside, .note {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
aside > :last-child { margin-bottom: 0; }
aside.warn { background: var(--warn-bg); border-left-color: var(--warn); }
.meta { color: var(--muted); font-size: 14px; margin-top: -4px; }

.contact .form { width: 100%; min-height: 900px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

.foot { border-top: 1px solid var(--line); padding: 20px 24px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 800px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; }
  .side ul { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side a { min-height: 36px; padding: 6px 10px; background: var(--soft); }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 28px; }
  .top { padding: 14px 16px; }
  nav[aria-label='On this page'] ul { columns: 1; }
}
