/* The public status page (/status). No external assets. Light and dark follow the system setting. */

:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6b66;
  --border: #dcdcd6;
  --accent: #2f5d8a;
  --up: #2e7d4f;
  --up-bg: #e6f4ea;
  --down: #a3261b;
  --down-bg: #fbeae8;
  --part: #9a6a00;
  --part-bg: #fbf1d9;
  --none: #8d8d86;
  --radius: 10px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171716;
    --surface: #21211f;
    --text: #e8e8e3;
    --muted: #a3a39c;
    --border: #383835;
    --accent: #6f9fcf;
    --up: #6cc28f;
    --up-bg: #1d3325;
    --down: #f19a90;
    --down-bg: #3a1f1c;
    --part: #e0b44f;
    --part-bg: #3a3018;
    --none: #77776f;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

.status {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

h1 { margin: 0 0 0.75rem; font-size: 1.5rem; font-weight: 650; }
h2 { margin: 0; font-size: 1.05rem; font-weight: 600; }

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- the line at the top */

.summary {
  margin: 0 0 0.35rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 600;
}
.summary-up { background: var(--up-bg); color: var(--up); border-color: transparent; }
.summary-down { background: var(--down-bg); color: var(--down); border-color: transparent; }
.summary-unread { background: var(--surface); color: var(--muted); }

.at { margin: 0 0 1rem; color: var(--muted); font-size: 0.875rem; }

/* ---------------------------------------------------------------- the parts */

.parts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }

.part {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem 0.7rem;
}

.part-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; }

.state { margin: 0; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.state .mark { display: inline-block; width: 1.1em; text-align: center; }
.state-up { color: var(--up); }
.state-down { color: var(--down); }
.state-partly { color: var(--part); }
.state-no_data, .state-not_watched { color: var(--muted); }

.seen { margin: 0.15rem 0 0.6rem; color: var(--muted); font-size: 0.875rem; }

/* ---------------------------------------------------------------- the 30 day marks */

.days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 2px;
  height: 28px;
  align-items: end;
}

.day, .key {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.day-up { background: var(--up); }
.day-partly { background: linear-gradient(to top, var(--part) 0 50%, var(--part-bg) 50% 100%); }
.day-down {
  background: repeating-linear-gradient(135deg, var(--down) 0 3px, var(--down-bg) 3px 5px);
}
.day-no_data { border: 1px dashed var(--none); height: 40%; }
.day-not_watched { border: 1px dotted var(--none); height: 15%; }

.scale {
  margin: 0.25rem 0 0;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---------------------------------------------------------------- key and foot */

.legend {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.legend li { display: flex; align-items: center; gap: 0.4rem; }
.key { width: 8px; height: 16px; }
.key.day-no_data { height: 7px; }

.foot { margin: 1rem 0 0; color: var(--muted); font-size: 0.8rem; }

@media (min-width: 700px) {
  .status { padding-top: 2.5rem; }
  .days { gap: 3px; height: 32px; }
}
