:root {
  color-scheme: light;
  font:
    16px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    sans-serif;
  color: #242422;
  background: #f5f4ef;
  --line: #d6d5cf;
  --muted: #565751;
  --paper: #fffefa;
  --red: #c24233;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: #181916;
  color: #fff;
  padding: 0 clamp(1rem, 5vw, 6rem);
  min-height: 4.5rem;
  flex-wrap: wrap;
}
.logo {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.11em;
  line-height: 1;
}
.logo span {
  color: #ff6149;
}
.brand {
  font-size: 0.95rem;
  padding-left: 1rem;
  border-left: 1px solid #52534e;
}
nav {
  margin-left: auto;
  display: flex;
  gap: 0.2rem;
  flex-wrap: wrap;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  border-radius: 5px;
  padding: 0.5rem 0.9rem;
}
button:hover,
button:focus-visible {
  border-color: #777;
}
nav button {
  color: #c6c6be;
  border: 0;
  background: transparent;
}
nav button[aria-current="page"] {
  color: white;
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}
button.primary {
  color: white;
  background: #20211e;
  border-color: #20211e;
}
button.danger {
  color: #9c3026;
}
button:disabled {
  opacity: 0.48;
  cursor: default;
}
main {
  max-width: 1176px;
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 4rem) clamp(1rem, 4vw, 3.5rem) 6rem;
}
h1,
h2,
h3,
p {
  margin: 0 0 0.8rem;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  font-weight: 550;
  letter-spacing: -0.065em;
  line-height: 1.05;
}
h2 {
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}
h3 {
  font-size: 1rem;
}
.bar,
.actions,
.filters,
.grid,
.cols {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.bar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.filters {
  background: #e9e8e2;
  padding: 1rem;
  border-radius: 0.5rem;
}
.filters label,
.grid label {
  flex: 1 1 125px;
}
.filters label:first-child {
  flex: 2 1 185px;
}
.cols {
  align-items: flex-start;
  gap: 1.5rem;
}
.cols > section:first-child {
  flex: 1.5 1 430px;
}
.cols > section:last-child {
  flex: 1 1 280px;
}
section.panel,
.login,
article.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: clamp(1rem, 2.7vw, 2rem);
  margin-bottom: 1rem;
}
.login {
  max-width: 450px;
  margin: 9vh auto;
}
.login h1 {
  font-size: 2.6rem;
}
.login p,
.hint,
small,
time {
  color: var(--muted);
}
label,
.label {
  display: block;
  font-size: 0.85rem;
  font-weight: 550;
  margin-bottom: 0.8rem;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  color: #21221e;
  background: white;
  padding: 0.6rem;
  border: 1px solid #b9bab3;
  border-radius: 4px;
  margin-top: 0.25rem;
}
input[type="checkbox"] {
  width: auto;
  display: inline;
  margin-right: 0.45rem;
}
label.check {
  display: inline-block;
  margin-right: 1rem;
}
textarea {
  resize: vertical;
  min-height: 4.2rem;
}
textarea#cards {
  min-height: 8rem;
  font:
    1.18rem/1.5 Georgia,
    serif;
}
ul.rows {
  padding: 0;
  list-style: none;
  margin: 1rem 0;
}
.row {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  gap: 1rem;
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1rem;
}
.row:hover {
  background: #f0efe8;
}
.row strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.12rem;
  font-weight: 500;
}
.row span:last-child {
  margin-left: auto;
}
.status {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.78rem;
  white-space: nowrap;
}
.status.published {
  background: #e7efdf;
}
.status.draft {
  background: #f5eddf;
}
fieldset {
  margin: 1rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: 5px;
}
legend {
  font-size: 0.85rem;
  font-weight: 650;
}
.preview {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #121212;
  color: white;
  border-radius: 5px;
  margin-bottom: 1rem;
}
details {
  padding: 0.65rem 0;
}
summary {
  cursor: pointer;
}
pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
}
.actions {
  align-items: center;
  margin: 0.8rem 0;
}
.actions a,
a {
  color: #784136;
}
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4rem 0;
}
#notice {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90vw;
  color: white;
  background: #252623;
  border-radius: 6px;
  padding: 0.7rem 1rem;
  box-shadow: 0 3px 20px #0002;
}
#notice:empty {
  display: none;
}
.num {
  font-variant-numeric: tabular-nums;
}
.quiet {
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 640px) {
  header {
    gap: 0.6rem;
    padding: 0.7rem 1rem;
  }
  nav {
    order: 3;
    width: 100%;
    margin: 0;
  }
  nav button {
    padding: 0.3rem 0.6rem;
  }
  .bar {
    align-items: flex-start;
  }
  .row {
    align-items: flex-start;
  }
  .cols > * {
    min-width: 0;
  }
  .filters {
    gap: 0.2rem 0.5rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.1s ease;
  }
}
