body {
  font-family: "Merriweather", Georgia, serif;
  background: white;
  color: black;
  margin: 0;
}

.page {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.sticky-panel {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  box-sizing: border-box;
}

.section {
  border: 3px solid black;
  padding: 15px;
  margin-bottom: 15px;
}

h1,
h2,
h3 {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section h2 {
  margin-top: 0;
}

.intro-text {
  line-height: 1.5;
  color: #222;
}

/* ---------- Sidebar ---------- */

.current-count {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid black;
  font-weight: bold;
}

#current-setup {
  list-style: decimal;
  padding-left: 36px;
  margin: 0 0 12px;
  overflow-y: auto;
  min-height: 0;
  scrollbar-color: black white;
}

.setup-item {
  padding: 2px 0;
  cursor: pointer;
}

.setup-item:hover {
  text-decoration: underline;
}

.setup-item.empty {
  color: #999;
}

.top-controls button {
  font-family: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border: 2px solid black;
  background: white;
  color: black;
  cursor: pointer;
  width: 100%;
}

.top-controls button:hover {
  background: #d9d9d9;
}

.top-controls button:active {
  background: black;
  color: white;
}

/* ---------- Choice rows ---------- */

.section-number {
  color: #666;
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

button.entry {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 12px 14px;
  border: 2px solid black;
  background: white;
  color: black;
  cursor: pointer;
}

button.entry:hover {
  background: #d9d9d9;
}

button.entry.selected {
  background: black;
  color: white;
}

button.entry.selected:hover {
  background: #222;
}

button.entry:focus-visible {
  outline: 3px dashed black;
  outline-offset: 3px;
}

.entry-name {
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-bottom: 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid currentColor;
}

.entry-description {
  color: inherit;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 1000px) {
  .page {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
    max-height: none;
  }

  #current-setup {
    columns: 2;
  }
}

@media (max-width: 700px) {
  .page {
    margin: 16px auto;
    padding: 0 16px;
  }

  .choice-row {
    grid-template-columns: 1fr;
  }
}
