:root {
  --bg: #09090b;
  --card-bg: #18181b;
  --border: #27272a;
  --text: #e4e4e7;
  --muted: #a1a1aa;
  --emerald: #10b981; /* completed-check accent */
  --accent: #10b981; /* per-tile, overridden inline */

  --font-display: "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "Geist", ui-monospace, "SF Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 64px 20px;
}

/* --- Active tiles --- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  justify-content: center;
}

.tile {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 1rem;
  padding: 32px;
}

.name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Reserve two lines so the number/label/range align across cards
     whether the title wraps or not (2 lines x 1.2 line-height). */
  min-height: 2.4em;
}

.count-block {
  margin: 1.5rem 0;
}

.num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.label {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.timeline {
  margin-top: auto;
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-grid {
  display: grid;
  grid-template-rows: repeat(7, 16px);
  grid-auto-flow: column;
  grid-auto-columns: 16px;
  gap: 4px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cell {
  border-radius: 2px;
}

.cell-passed {
  background-color: var(--accent);
}

.cell-skipped {
  background-color: var(--border);
}

.cell-remaining {
  background-color: transparent;
  border: 1px solid var(--border);
}

.cell-current {
  background-color: color-mix(in srgb, var(--accent) 20%, transparent);
  border: 1px solid var(--accent);
  box-shadow: 0 0 4px var(--accent);
}

.cell-pad {
  background-color: transparent;
}

.tile.empty {
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-left-color: var(--border);
}

.tile.empty .label {
  color: var(--muted);
}

/* --- Completed list --- */

.completed {
  margin-top: auto; /* push to the bottom of the viewport */
  padding-top: 64px; /* but keep a gap from the cards when content is tall */
}

.completed-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.5rem;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.completed-title .rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

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

.completed-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--muted);
  opacity: 0.6;
}

.check {
  color: var(--emerald);
  font-weight: 700;
}

.completed-name {
  flex: 1;
  font-family: var(--font-body);
  font-size: 1rem;
  text-decoration: line-through;
}

.completed-date {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* --- Responsive --- */

/* Tablet / small desktop: 2-3 centered columns, cards capped so they don't
   stretch and so 2 cards stay centered rather than left-justified. */
@media (min-width: 768px) {
  .page {
    padding: 64px 48px;
  }
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  }
  .num {
    font-size: 4.5rem;
    letter-spacing: -0.04em;
  }
}

/* Large screens: fewer, bigger cards with a larger type scale. */
@media (min-width: 1280px) {
  .page {
    max-width: 1600px;
    padding: 80px 48px;
  }
  .grid {
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(440px, 560px));
  }
  .tile {
    padding: 40px;
    min-height: 300px;
  }
  .name {
    font-size: 1.875rem;
  }
  .num {
    font-size: 6rem;
  }
  .label,
  .timeline-head {
    font-size: 0.875rem;
  }
  .timeline-grid {
    grid-template-rows: repeat(7, 20px);
    grid-auto-columns: 20px;
    gap: 5px;
  }
}
