/* The LogSure site: the type, spacing and header every page shares, the docs and the API reference. The colour tokens
   are the web console's (logsure/web css/tokens.css). Flat: no gradients, glows, blur or heavy shadows. The theme
   follows the system. */
:root {
  --bg: #ffffff; --panel: #ffffff; --raise: #f5f6f9; --ink: #0f1525; --ink2: #3a4256; --ink3: #5f6779; --line: #e7e9f0; --line2: #eef0f5; --soft: #f4f6fa;
  --accent: #a3172f; --accent-soft: #f9e8eb; --on-accent: #ffffff; --good: #147436; --warn: #b45309;
  --sans: Inter, "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 40px); --max: 1180px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0b0d12; --panel: #13161d; --raise: #171a22; --ink: #eef0f5; --ink2: #c3c8d4; --ink3: #949bad; --line: #262a35; --line2: #1e222b; --soft: #1b1f28;
    --accent: #ec6a7d; --accent-soft: #2e1016; --on-accent: #0b0d12; --good: #4ade80; --warn: #fbbf24; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; }
p { margin: 0 0 14px; }
code { font: 13px/1.5 var(--mono); padding: 1px 5px; border-radius: 5px; background: var(--soft); overflow-wrap: anywhere; }
pre { margin: 0 0 16px; padding: 14px 16px; background: var(--raise); border-radius: 10px; overflow-x: auto; font: 13px/1.65 var(--mono); }
pre code { padding: 0; background: none; overflow-wrap: normal; white-space: pre; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; padding: 6px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.skip:focus { left: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line2); }
.top-in { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 56px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; font-size: 16px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.top nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.top nav a { color: var(--ink2); font-size: 14px; }
.top nav a:hover { color: var(--ink); text-decoration: none; }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; color: var(--ink2); font-size: 14px; display: flex; align-items: center; gap: 4px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.menu > summary:hover, .menu[open] > summary, .menu.here > summary { color: var(--ink); }
.menu.here > summary { font-weight: 600; }
.menu-panel { position: absolute; top: calc(100% + 16px); left: 50%; margin-left: -280px; width: 560px; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; z-index: 30; }
.menu-panel a { display: block; padding: 10px 12px; border-radius: 9px; color: var(--ink); }
.menu-panel a:hover { background: var(--soft); text-decoration: none; }
.menu-panel a[aria-current="page"] { background: var(--soft); }
.menu-panel b { display: block; font-size: 14px; font-weight: 600; }
.menu-panel span { display: block; font-size: 13px; color: var(--ink3); margin-top: 2px; line-height: 1.4; }
.menu-panel .extra { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .menu[open] .menu-panel { animation: drop .22s var(--ease); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Docs */
.docs { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; }
.side { position: sticky; top: 56px; align-self: start; max-height: calc(100vh - 56px); overflow-y: auto; padding: 32px 0 40px; }
.side h2 { font-size: 12px; font-weight: 600; color: var(--ink3); letter-spacing: 0; padding: 18px 10px 6px; }
.side h2:first-child { padding-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--ink2); font-size: 14px; }
.side a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.side a[aria-current="page"] { background: var(--soft); color: var(--ink); font-weight: 600; }
.side details summary { display: none; }
.doc { padding: 40px 0 80px; min-width: 0; max-width: 760px; }
.doc h1 { font-size: 40px; letter-spacing: -.03em; margin-bottom: 12px; }
.doc h2 { font-size: 24px; margin: 48px 0 12px; }
.doc h3 { font-size: 17px; margin: 28px 0 8px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin: 4px 0; }
.doc .lead { font-size: 18px; line-height: 1.55; color: var(--ink2); margin-bottom: 24px; }
.doc .shot { margin: 8px 0 24px; }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.shot img { width: 100%; }
/* A Mac app screenshot: the window as macOS drew it, cut to its rounded shape with transparent corners. No frame,
   border or background behind it. */
figure.mac { margin: 0; background: none; border: 0; }
figure.mac img { width: 100%; border-radius: 1.53% / 2.34%; box-shadow: 0 0 0 1px var(--line); }
.shot figcaption { padding: 9px 14px; border-top: 1px solid var(--line); color: var(--ink3); font-size: 13px; }
.note { padding: 12px 16px; border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; background: var(--raise); margin: 0 0 16px; color: var(--ink2); }
.note.warn { border-left-color: var(--warn); }
table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; display: block; overflow-x: auto; }
thead, tbody { display: table; width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; color: var(--ink3); }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; color: var(--ink); font-weight: 550; }
.pager a:hover { text-decoration: none; border-color: var(--ink3); }
.pager small { color: var(--ink3); font-weight: 400; }
.pager .next { margin-left: auto; text-align: right; }

/* API reference */
.op { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; }
.op > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: baseline; padding: 10px 14px; flex-wrap: wrap; }
.op > summary::-webkit-details-marker { display: none; }
.op > summary:hover { background: var(--soft); }
.op[open] > summary { border-bottom: 1px solid var(--line2); }
.op .body { padding: 12px 16px 6px; }
.op .body h3.sub { font-size: 12px; color: var(--ink3); margin: 14px 0 6px; letter-spacing: 0; }
.op .sum { color: var(--ink2); flex: 1 1 260px; min-width: 0; }
.path { font: 600 13.5px/1.5 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.verb { display: inline-block; min-width: 54px; font: 700 12px/20px var(--mono); color: var(--ink3); }
.verb.post { color: var(--accent); }
.verb.delete { color: var(--warn); }
.verb.get { color: var(--good); }
.pill { display: inline-block; padding: 0 6px; border-radius: 5px; font: 600 12px/20px var(--mono); background: var(--soft); color: var(--ink2); }
.schema { font: 13px/1.65 var(--mono); background: var(--raise); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.schema .k { color: var(--ink); font-weight: 600; }
.schema .t { color: var(--accent); }
.schema .d { color: var(--ink3); font-family: inherit; }
.toc-ops { columns: 2 260px; padding: 0; list-style: none; margin: 0 0 20px; font-size: 14px; }
.toc-ops li { break-inside: avoid; padding: 2px 0; }

/* Footer */
footer.foot { border-top: 1px solid var(--line2); padding: 28px 0 40px; color: var(--ink3); font-size: 13px; }
footer.foot .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
footer.foot a { color: var(--ink2); }
footer.foot .sp { margin-left: auto; }

@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { position: static; max-height: none; padding: 16px 0 0; }
  .side details { border: 1px solid var(--line); border-radius: 10px; }
  .side details summary { display: block; padding: 10px 14px; cursor: pointer; font-weight: 600; }
  .side details > div { padding: 0 6px 10px; }
  .doc { padding-top: 28px; }
  .doc h1 { font-size: 32px; }
}
@media (max-width: 640px) {
  .top nav { gap: 16px; }
  .top nav > a.wide { display: none; }
  .menu { position: static; }
  .menu-panel { position: fixed; top: 56px; left: 0; right: 0; margin-left: 0; width: auto; max-height: calc(100vh - 56px); overflow-y: auto; border-radius: 0 0 14px 14px; border-width: 0 0 1px; grid-template-columns: 1fr; padding: 8px var(--gutter) 16px; }
  .menu-panel .extra { display: block; border-top: 1px solid var(--line2); margin-top: 6px; padding-top: 14px; }
  .menu-panel .extra + .extra { border-top: 0; margin-top: 0; padding-top: 10px; }
}
