:root { color-scheme: light dark; --gap: 1rem; --muted: #6b7280; --line: #8884; }
* { box-sizing: border-box; }

/* Must outrank the author `display` rules below (e.g. `nav { display: flex }`),
   which otherwise beat the UA stylesheet's `[hidden] { display: none }` and
   leave elements toggled via `.hidden = true` fully visible. */
[hidden] { display: none !important; }

body { font: 16px/1.5 system-ui, sans-serif; margin: 0; padding: var(--gap); max-width: 60rem; margin-inline: auto; }
header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--gap); flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .75rem; margin-bottom: var(--gap); }
h1 { font-size: 1.25rem; margin: 0; }
nav { display: flex; gap: .5rem; }
nav [aria-current] { font-weight: 600; box-shadow: inset 0 -2px currentColor; }
#logout { margin-inline-start: .5rem; }

form { max-width: 32rem; }
label { display: block; margin-block: .75rem; }
input, textarea, button { font: inherit; padding: .4rem .6rem; }
input, textarea { width: 100%; }
button { cursor: pointer; }
button[disabled] { cursor: progress; opacity: .6; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; }

.hint { color: var(--muted); font-size: .875rem; }
.error { color: #b00; min-height: 1.5em; }
.error:empty { min-height: 0; }
.warn { background: #fff3cd; color: #664d03; padding: .75rem; border-radius: .25rem; }

/* Self-hosting escape hatch. Collapsed and de-emphasised so a hosted tenant,
   who has no reason to know the API origin, never has to think about it. */
.advanced { margin-block: var(--gap); border-top: 1px solid var(--line); padding-top: .5rem; }
.advanced summary { color: var(--muted); font-size: .875rem; cursor: pointer; }

pre { background: #0001; padding: .75rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap { overflow-x: auto; }
.meter { height: 1rem; background: #8884; border-radius: .5rem; overflow: hidden; }
.meter > div { height: 100%; background: #4a7; }
