/* pico-ate: one column, system fonts, two PICO-8 accent colours. */

:root {
  --dark-blue: #1d2b53; /* PICO-8 colour 1 */
  --red: #ff004d;       /* PICO-8 colour 8 */
  --text: #222;
  --muted: #666;
  --background: #fff;
}

body {
  max-width: 40em;
  margin: 0 auto;
  padding: 1rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--background);
}

a {
  color: var(--dark-blue);
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

h1 {
  margin-bottom: 0;
  color: var(--dark-blue);
}

h2 {
  margin-top: 2rem;
  border-bottom: 2px solid var(--red);
  font-size: 1.25rem;
}

.subtitle {
  margin-top: 0;
  color: var(--muted);
}

.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter a {
  padding: 0.25rem 0.625rem;
  border: 1px solid var(--dark-blue);
  border-radius: 0.25rem;
  text-decoration: none;
}

.filter a[aria-current="true"] {
  color: var(--background);
  background: var(--dark-blue);
  box-shadow: inset 0 -3px 0 var(--red);
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.375rem;
}

.author {
  color: var(--muted);
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--muted);
  font-size: 0.875rem;
}

/* Admin */

.admin-nav {
  display: flex;
  gap: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--red);
  font-weight: bold;
}

.flash,
.form-errors {
  padding: 0.5rem 0.75rem;
  border-left: 4px solid var(--dark-blue);
  background: #f2f2f2;
}

.flash-alert,
.form-errors {
  border-left-color: var(--red);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

.actions {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

.actions form {
  display: inline;
}

.field {
  margin-bottom: 0.75rem;
}

.field label {
  display: block;
  font-weight: bold;
}

.field input:not([type="number"]),
.field select,
.field textarea {
  box-sizing: border-box;
  width: 100%;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
