/* The whole design. If it isn't here, the browser default is good enough. */
:root {
  color-scheme: light dark;
  --fg: light-dark(#222, #ddd);
  --bg: light-dark(#fff, #121212);
  --muted: light-dark(#666, #999);
  --line: light-dark(#ddd, #333);
  --code: light-dark(#f3f3f3, #1e1e1e);
  --link: light-dark(#0645ad, #8ab4f8);
  --bot: light-dark(#b3261e, #f2b8b5);
  --ok: light-dark(#1b6e2b, #8fd19e);
}

body {
  max-width: 54rem;
  margin: 2rem auto;
  padding: 0 1rem;
  font: 17px/1.6 system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
body.narrow { max-width: 24rem; margin-top: 15vh; }

h1, h2, h3 { line-height: 1.2; }
h2 { margin-top: 2.5rem; }
a { color: var(--link); }
small, .muted { color: var(--muted); }
.bot { color: var(--bot); }
.ok { color: var(--ok); }

header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
nav a + a { margin-left: 1rem; }
[aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: none; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: .4rem .75rem .4rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th { font-weight: 600; white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.radio { text-align: center; padding: .4rem .6rem; }
tbody th[colspan] { padding-top: 1.25rem; }

code, pre { font: .88em/1.5 ui-monospace, monospace; background: var(--code); }
code { padding: .1em .3em; }
pre { padding: .75rem 1rem; overflow-x: auto; }
.key { user-select: all; } /* one click selects the whole key */

input, select, button { font: inherit; }
label { display: block; margin: .75rem 0; }
label input[type="text"], label input[type="email"], label input[type="password"],
label input:not([type]) { display: block; width: 100%; box-sizing: border-box; }
label.inline { display: inline; margin: 0 1rem 0 0; }
input[type="number"] { width: 5em; }
fieldset { border: 1px solid var(--line); margin: 1.25rem 0; }
button { cursor: pointer; }

/* Fake server responses: a form submits to "page.html#id" and the matching message appears. */
.flash { border-left: 4px solid var(--link); margin: 1rem 0; padding: .25rem 1rem; background: var(--code); }
.flash:not(:target) { display: none; }

/* JS methods fade out while the fingerprint page is switched off. */
form:has(#js-integration:not(:checked)) tbody.js { opacity: .4; }

footer { margin: 4rem 0 2rem; font-size: .9em; color: var(--muted); }

/* Panel additions. Messages from the server are always visible, unlike the prototype's .flash. */
.notice { border-left: 4px solid var(--link); margin: 1rem 0; padding: .25rem 1rem; background: var(--code); }
.notice.error { border-left-color: var(--bot); }
.notice h2 { margin-top: .75rem; }
td details pre { margin: .25rem 0; max-width: 36rem; white-space: pre-wrap; overflow-wrap: anywhere; }
