/* BunterHQ's log: bunter.gshaw.ca's oxblood and warm paper, without Pico. */

:root {
  --serif:
    "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ink: light-dark(#2b2925, #e4dfd6);
  --head: light-dark(#1d1c1a, #f1ece3);
  --muted: light-dark(#6b665d, #a39b8f);
  --paper: light-dark(#f7f5f0, #161412);
  --card: light-dark(#fffdf8, #1d1a17);
  --line: light-dark(#e2ddd2, #332e28);
  --accent: light-dark(#7a2e2e, #e09a8b);
  --good: light-dark(#2f6b4a, #7cc497);
  --good-bg: light-dark(#e3efe6, #1f3328);
  --warn: light-dark(#8a5a0f, #e2b25c);
  --hl: light-dark(#fff1b8, #4a3f14);
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  max-width: 64rem;
  padding: 1rem;
  background: var(--paper);
  color: var(--ink);
  font: 400 0.9375rem/1.5 var(--sans);
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
}

h1 {
  margin: 0;
  color: var(--head);
  font: 600 1.75rem/1.2 var(--serif);
}

a {
  color: var(--accent);
}

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

.status::before {
  content: "●";
  margin-right: 0.35em;
}

.status[data-state="live"]::before {
  color: var(--good);
}

.status[data-state="wait"]::before {
  color: var(--warn);
}

.status[data-state="down"]::before {
  color: var(--accent);
}

.lede,
.empty {
  color: var(--muted);
}

.yes {
  color: var(--good);
}

.log {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  background: var(--card);
}

.log:empty {
  display: none;
}

/* One delivery: time, event, where, who, verdict. Two lines on a phone. */
.log li {
  display: grid;
  grid-template-columns: 6.5rem 19rem 1fr 9rem 10rem;
  gap: 0 0.75rem;
  padding: 0.4rem 0.75rem;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.log li:first-child {
  border-top: 0;
}

.log li.acts {
  background: var(--good-bg);
}

.log li.new {
  animation: arrive 2s ease-out;
}

@keyframes arrive {
  from {
    background: var(--hl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .log li.new {
    animation: none;
  }
}

.log time,
.log .who {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.log .what {
  font-family: var(--mono);
  font-size: 0.85em;
}

.log .verdict {
  color: var(--muted);
}

.log .acts .verdict {
  color: var(--good);
  font-weight: 600;
}

@media (max-width: 44rem) {
  .log li {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "time what what"
      "where where verdict"
      "who who who";
  }

  .log time {
    grid-area: time;
  }

  .log .what {
    grid-area: what;
    overflow-wrap: anywhere;
  }

  .log .where {
    grid-area: where;
  }

  .log .who {
    grid-area: who;
    font-size: 0.85em;
  }

  .log .verdict {
    grid-area: verdict;
    text-align: right;
  }
}
