:root {
  color-scheme: light dark;
  --bg: light-dark(#fafaf8, #111110);
  --fg: light-dark(#1c1c1a, #e8e7e2);
  --muted: light-dark(#6b6a65, #8f8e88);
  --faint: light-dark(#9a9993, #64635e);
  --line: light-dark(#e6e5e0, #262623);
  --green: oklch(0.72 0.15 150);
  --blue: oklch(0.72 0.15 250);
  --stripes: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 5px);
}

* {
  box-sizing: border-box;
  transition: background-color 0.2s, color 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--muted);
  font: 15px/1.7 "Geist Mono", ui-monospace, monospace;
}

h1,
h2,
p,
ul {
  margin: 0;
  padding: 0;
  font: inherit;
}

p {
  text-wrap: pretty;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  /* content-box: the 560px is the text column, the padding sits outside it */
  box-sizing: content-box;
  display: flex;
  flex-direction: column;
  gap: 52px;
  max-width: 560px;
  margin: 0 auto;
  padding: 88px 32px 72px;
}

header {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

h1 {
  color: var(--fg);
  font-weight: 500;
}

h2 {
  margin-bottom: 6px;
  color: var(--faint);
}

.entries {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 5px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.row:hover {
  opacity: 0.65;
}

.placeholder {
  background: var(--stripes);
  box-shadow: inset 0 0 0 1px var(--line);
}

.icon {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.title {
  overflow: hidden;
  color: var(--fg);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary,
.meta {
  color: var(--faint);
}

.meta {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.indicator {
  width: 12px;
  text-align: center;
}

.indicator::before {
  content: "+";
}

[aria-expanded="true"] .indicator::before {
  content: "−";
}

.status {
  position: relative;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status.ended::before {
  background: var(--faint);
}

.status.ongoing::before {
  background: var(--green);
}

.status.upcoming::before {
  background: var(--blue);
}

.tooltip {
  position: absolute;
  top: 50%;
  right: 20px;
  display: none;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--muted);
  font-size: 13px;
  transform: translateY(-50%);
}

.status:hover .tooltip,
.row:focus-visible .tooltip {
  display: block;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 0 18px 36px;
}

.panel[hidden] {
  display: none;
}

.part {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.part-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tools img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 8px;
}

.images figure {
  display: grid;
  gap: 6px;
  margin: 0;
}

.images figcaption {
  color: var(--muted);
  font-size: 13px;
}

.images img,
.image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  object-fit: cover;
}

.images img.contain {
  object-fit: contain;
}

.image {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 13px;
}

.link {
  align-self: flex-start;
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}

footer nav {
  display: flex;
  gap: 20px;
}

footer a:hover {
  color: var(--fg);
}
