/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

*:not(dialog) {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  font-family: sans-serif;
  line-height: 1.5;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
/* End Reset */

:root {
  --macos9-bg-color: #63639c;
  --macos9-gray1: #dddddd;
  --macos9-gray2: #c0c0c0;
}

code {
  font-family: monospace;
  color: rgba(0, 0, 0, 0.9);
  text-wrap-mode: nowrap;
}

dl > dt { font-weight: 500 }

.markdown > p:first-child { margin: 0 }
.markdown > p:not(:first-child) { margin: 1em 0 }

.flash-message.flash-notice { color: green }
.flash-message.flash-alert { color: red }

body {
  background-color: #cfcfe1;
}

body > nav {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 10px;
  margin: 0 0 10px 0;
  background-color: var(--macos9-bg-color);
  border-bottom: solid 4px #444;
}

main {
  padding: 10px;
}

nav > ul {
  margin: 0;
  padding: 6px;
  list-style-type: none;
}
nav > ul > li {
  display: inline-block;
}
nav > ul > li:not(:first-child) {
  padding-left: 14px;
}
nav > ul > li > a.btn {
  display: inline-block;
  border: solid 1px dimgray;
  padding: 0.2em 1em;
  margin: 0;
  background-color: var(--macos9-gray1);
  text-decoration: none;
  transition: background-color 0.3s;
}
nav > ul > li > a.btn:hover {
  background-color: var(--macos9-gray2);
}
nav > ul > li > a:not(.btn) {
  color: lightgray;
}

body > main {
  max-width: 1200px;
}

h1:not(:first-child) { margin: 0.2em 0 0.3em; }
h2:not(:first-child) { margin: 0.7em 0 0.5em; }
h3:not(:first-child) { margin: 0.6em 0 0.4em; }

/* This is a crime. Refactor this */
form > div {
  margin: 1em 0;
}
form > div {
  display: grid;
  grid-template-columns: 1fr 3fr;
}
form > div label { font-weight: 500 }

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

table {
  border-spacing: 0;
}
thead > tr > th {
  text-align: left;
}
thead th {
  border-bottom: solid 2px dimgray;
}
tbody td {
  border-bottom: solid 1px rgba(0, 0, 0, 0.1);
}
td.numeric {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
th.numeric {
  text-align: right;
}
td, th {
  padding: 0.2em 0.4em;
}

.helptext {
  font-size: 0.8rem;
  color: navy;
}

.private-alert {
  background-color: lightyellow;
  border: solid brown 1px;
  padding: 10px;
}

tbody tr:hover {
  background-color: rgba(0,0,0,0.05);
}

td svg {
  display: inline-block;
}
