/* The style sheet of the public documentation. Our own work: no third-party code, no font
   file, no image. The pages have no script. System fonts only.
   The colours are those of revisoradgang.dk (light and dark). */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --border: #e5e5e5;
  --text: #0a0a0a;
  --muted: #737373;
  --strong-muted: #525252;
  --primary: #2563eb;
  --on-primary: #ffffff;
  --link: #2563eb;
  --tint: #eff6ff;
  --on-tint: #1d4ed8;
  --code-bg: #f5f5f5;
  --panel: #0a0a0a;
  --panel-border: #0a0a0a;
  --panel-text: #fafafa;
  --ok-bg: #ecfdf5;
  --ok-border: #a7f3d0;
  --ok: #047857;
  --get-bg: #ecfdf5;
  --get: #047857;
  --post-bg: #eff6ff;
  --post: #1d4ed8;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px rgb(0 0 0 / .05);
  --top: 6.6rem;
  --radius: .65rem;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --surface: #171717;
    --border: #2a2a2a;
    --text: #fafafa;
    --muted: #a1a1a1;
    --strong-muted: #b8b8b8;
    --link: #60a5fa;
    --tint: #172554;
    --on-tint: #93c5fd;
    --code-bg: #262626;
    --panel: #171717;
    --panel-border: #2a2a2a;
    --ok-bg: #022c22;
    --ok-border: #065f46;
    --ok: #6ee7b7;
    --get-bg: #022c22;
    --get: #6ee7b7;
    --post-bg: #172554;
    --post: #93c5fd;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--top) + 1rem); }

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

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

.skip { position: absolute; left: -999px; top: 0; padding: .5rem 1rem; background: var(--bg); }
.skip:focus { left: .5rem; top: .5rem; z-index: 10; }

/* The two rows at the top: product, and one tab for each section. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.bar, .tabs { max-width: 90rem; margin: 0 auto; padding: 0 1.75rem; }
.bar { display: flex; align-items: center; gap: .75rem; height: 3.75rem; }
.product {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.mark { color: var(--primary); flex: none; }
.tag { color: var(--link); font-size: .9rem; }
.version {
  margin-left: auto;
  padding: .1rem .65rem;
  border: 1px solid var(--ok-border);
  border-radius: 99px;
  background: var(--ok-bg);
  color: var(--ok);
  font-size: .78rem;
  font-weight: 500;
  white-space: nowrap;
}
.button {
  padding: .4rem 1rem;
  border-radius: 99px;
  background: var(--primary);
  color: var(--on-primary);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: #1d4ed8; }
.button.second { border: 1px solid var(--border); background: none; color: var(--text); }
.button.second:hover { background: var(--surface); }
.search { display: flex; min-width: 0; }
.search input {
  width: 15rem;
  min-width: 0;
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: 99px 0 0 99px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .88rem;
}
.search input::placeholder { color: var(--muted); opacity: 1; }
.search button {
  padding: .4rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0 99px 99px 0;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
}
.search button:hover { background: var(--surface); }
.tabs ul { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; }
.tabs li { margin: 0; }
.tabs a {
  display: block;
  padding: .45rem 0 .65rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); font-weight: 500; border-bottom-color: var(--primary); }

.layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 14rem;
  gap: 3.5rem;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1.75rem;
}
/* Only a narrow screen has the switch for the list of pages. */
.menu, .menu + label { display: none; }

nav.site, nav.toc {
  position: sticky;
  top: var(--top);
  align-self: start;
  max-height: calc(100vh - var(--top));
  overflow-y: auto;
  padding: 2rem 0;
  font-size: .9rem;
}
nav h2 {
  margin: 1.8rem 0 .5rem;
  padding: 0 .75rem;
  border: 0;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text);
}
nav h2:first-child { margin-top: 0; }
nav.site ul, nav.toc ul { list-style: none; margin: 0; padding: 0; }
nav.site li, nav.toc li { margin: .1rem 0; }
nav.site a, nav.toc a { display: block; color: var(--strong-muted); text-decoration: none; }
nav.site a { padding: .38rem .75rem; border-radius: var(--radius); }
nav.site a:hover { background: var(--surface); color: var(--text); }
nav.site a[aria-current="page"] { background: var(--tint); color: var(--on-tint); font-weight: 500; }
nav.toc h2 { padding: 0; letter-spacing: 0; text-transform: none; font-size: .85rem; }
nav.toc ul { border-left: 1px solid var(--border); }
nav.toc a { padding: .25rem 0 .25rem .9rem; font-size: .84rem; line-height: 1.45; }
nav.toc a:hover { color: var(--link); }

main { min-width: 0; max-width: 52rem; padding: 2.5rem 0 4rem; }

.eyebrow {
  margin: 0 0 .5rem;
  color: var(--link);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
h1, h2, h3 { letter-spacing: -.02em; }
h1 { font-size: 2.25rem; font-weight: 600; line-height: 1.15; margin: 0 0 1rem; }
h1 + p { color: var(--strong-muted); font-size: 1.08rem; }
h2 { font-size: 1.45rem; font-weight: 600; line-height: 1.3; margin: 3rem 0 .8rem; }
h3 { font-size: 1.12rem; font-weight: 600; margin: 2.2rem 0 .6rem; }
h4 { font-size: .9rem; font-weight: 600; margin: 1.8rem 0 .5rem; }
p, ul, ol { margin: .9rem 0; }
main li { margin: .35rem 0; }
main li::marker { color: var(--muted); }
li > p { margin: .4rem 0; }

/* Links to the datasets on the start page. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 1.8rem 0;
  padding: 0;
}
main .cards li { margin: 0; }
.cards a {
  display: block;
  height: 100%;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
}
.cards a:hover { border-color: var(--primary); }
.cards strong { display: block; font-weight: 600; letter-spacing: -.01em; }
.cards strong::after { content: " \2192"; color: var(--link); }
.cards span { display: block; margin-top: .35rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }

/* The results of a search. */
.results { list-style: none; margin: 1.5rem 0; padding: 0; }
main .results li { margin: 0; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.results a { text-decoration: none; }
.results strong { font-weight: 600; overflow-wrap: anywhere; }
.results span { margin-left: .6rem; color: var(--muted); font-size: .84rem; }
.results p { margin: .3rem 0 0; color: var(--strong-muted); font-size: .92rem; overflow-wrap: anywhere; }
mark { background: var(--tint); color: var(--on-tint); border-radius: 3px; }

code {
  font-family: var(--mono);
  font-size: .86em;
  padding: .15em .4em;
  border-radius: 5px;
  background: var(--code-bg);
  overflow-wrap: anywhere;
}
a code { color: inherit; }
pre {
  margin: 1.1rem 0;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--panel-text);
  font-size: .85rem;
  line-height: 1.6;
}
pre code { padding: 0; background: none; color: inherit; font-size: inherit; overflow-wrap: normal; }

.table { margin: 1.1rem 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.55; }
th, td {
  padding: .65rem .9rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
td:first-child code { white-space: nowrap; overflow-wrap: normal; }
th { font-size: .82rem; font-weight: 500; color: var(--strong-muted); background: var(--surface); white-space: nowrap; }

.operation {
  margin: 1.8rem 0 2.8rem;
  padding: 0 1.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.4);
  box-shadow: var(--shadow);
}
.operation h3 {
  margin: 0 -1.4rem;
  padding: .9rem 1.4rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0;
}
.operation h3 code { background: none; padding: 0; font-size: .98rem; }
.operation .summary { font-weight: 600; margin-top: 1.1rem; }
.method {
  display: inline-block;
  margin-right: .5rem;
  padding: .1rem .6rem;
  border-radius: 99px;
  background: var(--get-bg);
  font: 600 .76rem/1.6 var(--mono);
  color: var(--get);
}
.method-post { background: var(--post-bg); color: var(--post); }

details { margin: 1rem 0; }
summary { cursor: pointer; font-weight: 500; }

.steps { display: flex; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.steps a {
  flex: 0 1 50%;
  padding: .8rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.steps a:hover { border-color: var(--primary); }
.steps span { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.steps .after { margin-left: auto; text-align: right; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.4rem;
  max-width: 90rem;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .85rem;
}
.foot a { color: inherit; }

@media (max-width: 75rem) {
  .layout { grid-template-columns: 14rem minmax(0, 1fr); gap: 2.5rem; }
  nav.toc { display: none; }
}
@media (max-width: 48rem) {
  :root { --top: 0rem; }
  .top { position: static; }
  .bar, .tabs, .foot { padding-left: 1.1rem; padding-right: 1.1rem; }
  .tag, .version, .button:not(.second) { display: none; }
  .bar { flex-wrap: wrap; height: auto; gap: .6rem; padding-top: .8rem; padding-bottom: .8rem; }
  .product { margin-right: auto; }
  .search { order: 1; flex: 1 0 100%; }
  .search input { flex: 1; }
  .layout { display: block; padding: 0 1.1rem; }
  /* The switch stays reachable with the keyboard: not visible, and not removed. */
  .menu { display: block; position: absolute; opacity: 0; }
  .menu + label {
    display: block;
    margin-top: 1rem;
    padding: .6rem .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 500;
    cursor: pointer;
  }
  .menu + label::after { content: "+"; float: right; color: var(--muted); }
  .menu:checked + label::after { content: "\2212"; }
  .menu:focus-visible + label { outline: 2px solid var(--link); outline-offset: 2px; }
  nav.site { display: none; position: static; max-height: none; padding: 1rem 0; border-bottom: 1px solid var(--border); }
  .menu:checked ~ nav.site { display: block; }
  main { padding-top: 1.8rem; }
  h1 { font-size: 1.85rem; }
  th, td { min-width: 7rem; padding: .6rem .7rem; }
  td:first-child { min-width: 9.5rem; }
  td:first-child code { white-space: normal; overflow-wrap: anywhere; }
  .operation { padding: 0 1rem 1rem; }
  .operation h3 { margin: 0 -1rem; padding: .8rem 1rem; }
  .steps { flex-direction: column; }
  .steps .after { margin-left: 0; text-align: left; }
}
@media print {
  nav.site, nav.toc, .top, .steps, .menu + label, .foot { display: none; }
  .layout { display: block; }
  pre { background: none; color: inherit; border-color: var(--border); }
}
