:root {
  color: #1b1b1b;
  background: #f3f4f6;
  --home-scale: 1;
  --home-base-width: 960px;
}

* {
  box-sizing: border-box;
}

body.home {
  margin: 0;
  font-family: "Century Gothic", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: #f3f4f6;
  min-height: 100vh;
}

.home-outer {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
}

.home-scale-root {
  width: var(--home-base-width, 960px);
  max-width: var(--home-base-width, 960px);
  transform-origin: top center;
  transform: scale(var(--home-scale, 1));
}

.home-shell {
  padding: 2rem 1rem 3rem;
}

.home-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.home-header h1 {
  font-size: 2rem;
  margin: 0;
}

.home-status {
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.95rem;
}

.chapter-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.1);
}

.chapter-table th,
.chapter-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.chapter-table th {
  background: #0f172a;
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chapter-table tr:last-child td {
  border-bottom: none;
}

.chapter-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.chapter-link::after {
  content: '↗';
  font-size: 0.85rem;
}

.chapter-meta {
  color: #475569;
  font-size: 0.9rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-transform: lowercase;
}

.status-pill--done {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.status-pill--in-progress {
  background: #fef3c7;
  border-color: #fde68a;
  color: #b45309;
}

.status-pill--not-started {
  background: #fee2e2;
  border-color: #fecdd3;
  color: #b91c1c;
}

.home-error {
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  box-shadow: inset 0 0 0 1px rgba(185, 28, 28, 0.15);
  margin-bottom: 1.25rem;
}

body.home--scaled .home-scale-root {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.home-mobile-hint {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  font-size: 0.85rem;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.45);
  z-index: 40;
}

body.home--minscale .home-mobile-hint {
  display: block;
}

@media print {
  :root,
  body.home {
    background: white;
    color: #1b1b1b;
  }

  .home-outer {
    overflow: visible;
  }

  .home-scale-root {
    transform: none !important;
  }

  .home-mobile-hint {
    display: none !important;
  }
}
