:root {
  color-scheme: light dark;
  --bg: #f6f6f4;
  --card: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --line: #deddd8;
  --accent: #2f5bd3;
  font: 16px/1.5 system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --card: #1f1f1d;
    --text: #ececea;
    --muted: #9a9a94;
    --line: #34342f;
    --accent: #7c9cf0;
  }
}

* {
  box-sizing: border-box;
}

/* The flex rules below would otherwise override the hidden attribute. */
[hidden] {
  display: none !important;
}

body {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px;
  background: var(--bg);
  color: var(--text);
}

header,
footer,
form {
  display: flex;
  align-items: center;
  gap: 8px;
}

header {
  justify-content: space-between;
}

h1 {
  font-size: 1.25rem;
}

#status:empty {
  display: none;
}

#status {
  color: #c0392b;
}

main {
  display: grid;
  gap: 16px;
}

article {
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

textarea,
input {
  width: 100%;
  padding: 10px;
  color: inherit;
  font: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

footer {
  justify-content: flex-end;
  margin-top: 8px;
}

small {
  margin-right: auto;
  color: var(--muted);
}

button {
  padding: 8px 14px;
  color: #fff;
  font: inherit;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.4;
  cursor: default;
}

.delete,
#logout {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
}
