/* Kadrin Docs: plain CSS, light and dark, no scripts (the pages' Content-Security-Policy allows none). Code samples
   in a row are tabs made of radio buttons: the checked one shows its sample. */
:root {
  --bg: #f7f7f5; --card: #ffffff; --ink: #1d1d1b; --muted: #5f5f5a; --line: #deded8; --code: #efefea;
  --accent: #1f5f8b; --accent-ink: #ffffff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg);
  line-height: 1.55;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161615; --card: #20201e; --ink: #ecece8; --muted: #a8a8a1; --line: #3a3a36; --code: #2a2a27;
          --accent: #6fb0dd; --accent-ink: #0d1b24; }
}
body { margin: 0; background: var(--bg); }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 0.5rem; background: var(--card); padding: 0.4rem 0.8rem; z-index: 1; }

.top { display: flex; gap: 1.5rem; align-items: center; padding: 0.75rem 1.25rem; background: var(--card);
       border-bottom: 1px solid var(--line); }
.top a { text-decoration: none; }
.brand { font-weight: 700; color: var(--ink); margin-right: auto; }

.layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); max-width: 76rem; margin: 0 auto; }
.side { padding: 1.25rem 1rem 2rem 1.25rem; border-right: 1px solid var(--line); font-size: 0.93rem; }
.side ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.side li a { display: block; padding: 0.2rem 0.5rem; border-radius: 4px; text-decoration: none; color: var(--ink); }
.side li a:hover { background: var(--code); }
.side a[aria-current="page"] { background: var(--code); font-weight: 600; color: var(--accent); }
.nav-head { margin: 0 0 0.3rem 0.5rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
            letter-spacing: 0.04em; color: var(--muted); }
main { padding: 1.25rem 2rem 4rem; max-width: 50rem; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; padding: 1rem 1.25rem;
         text-align: center; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2.25rem 0 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.08rem; margin: 1.6rem 0 0.4rem; }
h2 code, h3 code { font-size: 0.92em; }
.lead { font-size: 1.12rem; color: var(--muted); }
.muted, .note { color: var(--muted); }
.req { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
blockquote { margin: 1rem 0; padding: 0.25rem 1rem; border-left: 3px solid var(--line); color: var(--muted); }

code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9em; background: var(--code);
       padding: 0.1em 0.3em; border-radius: 4px; overflow-wrap: anywhere; }
pre { background: var(--code); border: 1px solid var(--line); border-radius: 6px; padding: 0.75rem 1rem;
      overflow-x: auto; line-height: 1.45; }
pre code { background: none; padding: 0; font-size: 0.86rem; overflow-wrap: normal; }
.endpoint { font-size: 1.02rem; }
.method { font-weight: 700; font-size: 0.8rem; color: var(--accent-ink); background: var(--accent); border-radius: 4px;
          padding: 0.15em 0.45em; letter-spacing: 0.03em; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 0.75rem 0; }
th, td { text-align: left; vertical-align: top; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
td p { margin: 0 0 0.4rem; }
td p:last-child { margin: 0; }
td ul { margin: 0.2rem 0; padding-left: 1.1rem; }
.fields td:first-child { white-space: nowrap; }
.measures { table-layout: fixed; min-width: 40rem; }
.measures th:nth-child(1) { width: 34%; } .measures th:nth-child(2) { width: 18%; }
.measures th:nth-child(3) { width: 26%; } .measures td:first-child { white-space: normal; }
tr:target, h2:target, h3:target { background: var(--code); }

.samples { display: flex; flex-wrap: wrap; margin: 1rem 0; position: relative; }
.samples input { position: absolute; opacity: 0; pointer-events: none; }
.samples label { padding: 0.35rem 0.9rem; border: 1px solid var(--line); border-bottom: none; margin-right: -1px;
                 border-radius: 6px 6px 0 0; cursor: pointer; font-size: 0.88rem; color: var(--muted);
                 background: var(--card); }
.samples input:checked + label { color: var(--ink); font-weight: 600; background: var(--code); }
.samples input:focus-visible + label { outline: 3px solid var(--accent); outline-offset: -3px; }
.samples pre { display: none; order: 1; width: 100%; margin: 0; border-top-left-radius: 0; }
.samples input:nth-of-type(1):checked ~ pre:nth-of-type(1),
.samples input:nth-of-type(2):checked ~ pre:nth-of-type(2),
.samples input:nth-of-type(3):checked ~ pre:nth-of-type(3) { display: block; }

@media (max-width: 50rem) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { border-right: none; border-bottom: 1px solid var(--line); padding: 0.75rem 1rem; }
  .side ul { display: flex; flex-wrap: wrap; gap: 0.1rem 0.4rem; margin-bottom: 0.5rem; }
  main { padding: 1rem 1rem 3rem; }
  h1 { font-size: 1.6rem; }
}
