/* Postilio docs. Colours from the portal's "Calm cobalt" tokens (web/src/styles/tokens.css); build.py checks the
   text pairs for 4.5:1 in both schemes (CONTRAST_PAIRS). System fonts: the site loads nothing but this file. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface-2: #f3f5f8;
  --border: #e4e7ec;
  --text: #161a20;
  --text-2: #49515e;
  --text-3: #616977;
  --link: #2341c8;
  --focus: #2747d6;
  --note-bg: #eef2ff;
  --note-text: #161a20;
  --note-border: #c3cffc;
  --get: #127a3a;
  --post: #2341c8;
  --patch: #8f5600;
  --delete: #c42b23;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121519;
    --surface-2: #0b0d11;
    --border: #2f353e;
    --text: #e8eaee;
    --text-2: #b3bac5;
    --text-3: #8a92a0;
    --link: #8da2ff;
    --focus: #8da2ff;
    --note-bg: #172044;
    --note-text: #e8eaee;
    --note-border: #2c3c86;
    --get: #4cc97c;
    --post: #8da2ff;
    --patch: #f0b44a;
    --delete: #ff7a70;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

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

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

.skip { position: absolute; left: -999px; top: 8px; padding: 8px 12px; background: var(--bg); z-index: 10; }
.skip:focus { left: 8px; }

.top { border-bottom: 1px solid var(--border); padding: 14px 24px; }
.brand { color: var(--text); font-weight: 650; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--text-2); font-weight: 450; }

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

.side { border-right: 1px solid var(--border); padding: 24px 16px; }
.side ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 16px; }
.side a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--text-2); text-decoration: none; }
.side a:hover { color: var(--text); background: var(--surface-2); }
.side a[aria-current="page"] { color: var(--link); background: var(--note-bg); font-weight: 600; }

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

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; scroll-margin-top: 16px; }
h1 { font-size: 32px; margin: 0 0 16px; }
h2 { font-size: 24px; margin: 48px 0 12px; padding-top: 16px; border-top: 1px solid var(--border); }
h3 { font-size: 19px; margin: 32px 0 8px; }
h4 { font-size: 15px; margin: 20px 0 6px; color: var(--text-2); }
p, ul, ol { margin: 0 0 14px; }
li { margin: 4px 0; }

code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 16px; }
pre code { background: none; padding: 0; font-size: 13.5px; line-height: 1.55; overflow-wrap: normal; }

.table { overflow-x: auto; margin: 0 0 16px; }
/* Whole in a cell: the table scrolls sideways instead of breaking a field name or code in the middle. */
td code, th code { overflow-wrap: normal; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); color: var(--text-2); font-weight: 600; }

.note { background: var(--note-bg); color: var(--note-text); border-left: 3px solid var(--note-border); border-radius: 6px; padding: 12px 16px; margin: 0 0 16px; }
.note p { margin: 0; }

.toc ul { margin: 0 0 8px; }
.endpoint { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.method { font: 700 12px/1 var(--font-mono); padding: 4px 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); }
.method--get { color: var(--get); }
.method--post { color: var(--post); }
.method--patch, .method--put { color: var(--patch); }
.method--delete { color: var(--delete); }
.op { margin-bottom: 8px; }

.foot { border-top: 1px solid var(--border); padding: 20px 24px; color: var(--text-3); font-size: 14px; }
.foot p { max-width: 1200px; margin: 0 auto; }

@media (max-width: 760px) {
  .top { padding: 12px 16px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: 0; border-bottom: 1px solid var(--border); padding: 12px 16px; }
  .side ul { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side a { padding: 4px 10px; border: 1px solid var(--border); font-size: 14px; }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }
}
