:root,
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  line-height: 1.6;
  --width: 960px;
  --color: #a70000;
  --border: color-mix(in oklch, var(--color) 20%, hsl(0 0 98%));
  --highlight: color-mix(in oklch, var(--color) 2%, hsl(0 0 98%));
}

body > * {
  padding: 0 max(0.5em, calc((100vw - var(--width)) / 2));
}

main {
  overflow-x: auto;
}

header {
  background-color: var(--color);
  color: white;
}

table {
  border-spacing: 0;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

textarea {
  display: block;
  box-sizing: border-box;
  resize: block;
  width: 100%;
  height: 8em;
}

button,
input[type='submit'],
input[type='button'] {
  background-color: var(--highlight);
}

button,
input,
textarea {
  font-size: inherit;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-block: 0.5em;
  padding: 0.5em;
}

/*Nav and Search bar*/
header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  line-height: 1;
  min-height: 64px;
}

header nav a {
  color: white;
  text-decoration: none;
}

header nav span:last-of-type {
  align-self: end;
}

header nav span:last-of-type > a {
  border: 2px solid white;
  border-bottom: 0;
  padding: 0.4em;
  display: inline-block;
  border-radius: 8px 8px 0 0;
}

header nav h1 {
  display: inline;
  white-space: nowrap;
  margin: auto;
  color: white;
}

nav input[type='search'] {
  height: 35px;
  border: 0;
  border-radius: 28px;

  background-image: url('searchicon.svg');
  background-repeat: no-repeat;
  background-position: center left 0.4rem;
  background-size: 1.3em auto;
  padding-left: 2em;
}

caption {
  text-align: left;
}

:any-link {
  color: var(--color);
}

nav :any-link {
  color: white;
}

tbody td {
  border-top: 1px solid var(--border);
}

tbody tr:hover,
thead tr {
  background-color: var(--highlight);
}

thead tr {
  border-radius: 8px;
}

tr > * {
  padding: 10px 8px;
  text-align: left;
}

thead th {
  background-clip: padding-box;
}

th:first-child {
  border-top-left-radius: 7.5px;
}

th:last-child {
  border-top-right-radius: 7.5px;
}

label {
  display: block;
}

/*Hymn page styling*/
blockquote {
  white-space: pre-line;
  margin-left: 0;
  padding-left: 2em;
  border-left: 3px solid var(--color);
}

dt,
dd {
  display: inline;
  margin-left: 0;
}

dt {
  font-weight: bold;
}

dt::before {
  content: '';
  display: block;
}

dt::after {
  content: ': ';
}
