.shell {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100vh;
  min-height: 0;
}

.site-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  min-height: 0;
}

.sidebar-brand {
  padding: 1.15rem 1.1rem 0.9rem;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.sidebar-brand a {
  text-decoration: none;
  color: inherit;
}

.sidebar-brand .eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #92702a;
  margin-bottom: 0.35rem;
}

.sidebar-brand h1 {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.15;
  color: #0f172a;
}

.sidebar-scroll {
  flex: 1;
  overflow: auto;
  padding: 0.65rem 0.55rem 1rem;
}

.nav-task {
  margin-bottom: 0.85rem;
}

.nav-task-title {
  margin: 0 0 0.35rem;
  padding: 0.35rem 0.55rem;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: #1e293b;
}

.nav-task.race .nav-task-title { color: #854d0e; }
.nav-task.gender .nav-task-title { color: #1d4ed8; }

.nav-theory {
  margin-bottom: 0.35rem;
  border-radius: 8px;
  overflow: hidden;
}

.nav-theory summary {
  list-style: none;
  cursor: pointer;
  padding: 0.5rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  user-select: none;
  border-radius: 8px;
  transition: background 0.15s;
}

.nav-theory summary::-webkit-details-marker { display: none; }

.nav-theory summary::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 2px solid #475569;
  border-bottom: 2px solid #475569;
  transform: rotate(-45deg);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.nav-theory[open] summary::before {
  transform: rotate(45deg);
  margin-top: -0.1rem;
}

.nav-theory summary:hover { background: #eef2f7; }

.nav-phase {
  padding: 0.15rem 0.35rem 0.35rem 1.15rem;
}

.nav-phase-label {
  margin: 0.35rem 0 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.25rem;
}

.nav-task.has-active > .nav-task-title {
  font-weight: 600;
}

.nav-task.race.has-active > .nav-task-title { color: #92400e; }
.nav-task.gender.has-active > .nav-task-title { color: #1d4ed8; }

.nav-theory.has-active > summary {
  color: #1e40af;
  font-weight: 700;
}

.nav-phase.has-active > .nav-phase-label {
  color: #1d4ed8;
  font-weight: 700;
}

.nav-links a {
  display: block;
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #475569;
  padding: 0.38rem 0.5rem;
  border-radius: 6px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-links a:hover {
  color: #0f172a;
  background: #e8f2ff;
  border-color: #bfdbfe;
  border-left-color: #93c5fd;
}

.nav-links a.active {
  color: #1e3a8a;
  background: #dbeafe;
  border-color: #93c5fd;
  border-left-color: #2563eb;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.shell-main {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
}

.shell-main.index-main {
  overflow: auto;
}

.index-welcome {
  padding: 2.5rem 2.25rem 3rem;
  max-width: 52rem;
}

.index-welcome h2 {
  margin: 0 0 0.75rem;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 400;
  color: #0f172a;
}

.index-welcome p {
  margin: 0 0 1rem;
  color: #475569;
  line-height: 1.65;
  font-size: 0.95rem;
}

.index-welcome .index-cta {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.index-welcome .index-glossary {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.index-welcome .index-glossary dt {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #334155;
}

.index-welcome .index-glossary dd {
  margin: 0 0 0.85rem;
  color: #475569;
  line-height: 1.6;
  font-size: 0.9rem;
}

.index-welcome .index-glossary dd:last-child {
  margin-bottom: 0;
}

.index-welcome .index-howto {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.index-welcome ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #64748b;
  line-height: 1.7;
  font-size: 0.9rem;
}

