/* Curriculum widget: 6-column grid that drills into topic content in place. */

.curr-widget { margin: 1.5em 0; }

.curr-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid #d1d9e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.curr-col {
  border-right: 1px solid #d1d9e0;
  padding: 0.9em 0.9em 1.2em;
  min-width: 0;
}
.curr-col:last-child { border-right: none; }

.curr-col-head {
  font-weight: 700;
  text-align: center;
  background: #f0f2f4;
  padding: 0.55em 0.4em;
  margin: -0.9em -0.9em 0.9em;
  border-bottom: 1px solid #d1d9e0;
  font-size: 0.92em;
}

.curr-section { margin-bottom: 1em; }
.curr-section:last-child { margin-bottom: 0; }

.curr-section-name {
  display: inline-block;
  font-weight: 600;
  font-size: 0.88em;
  color: #1f2328;
  border-bottom: 1px solid #57606a;
  margin-bottom: 0.35em;
}

.curr-section ul {
  list-style: disc;
  padding-left: 1.15em;
  margin: 0;
  font-size: 0.82em;
  line-height: 1.55;
}

.curr-section a {
  color: #1f2328;
  text-decoration: none;
}
.curr-section a:hover {
  color: #0969da;
  text-decoration: underline;
}

/* Topic (drill-in) view */
.curr-topic {
  border: 1px solid #d1d9e0;
  border-radius: 8px;
  background: #fff;
  padding: 1em 1.4em 1.4em;
}

.curr-breadcrumb {
  font-size: 0.88em;
  color: #57606a;
  padding-bottom: 0.6em;
  border-bottom: 1px solid #eaecef;
  margin-bottom: 1em;
}
.curr-breadcrumb a {
  color: #0969da;
  text-decoration: none;
}
.curr-breadcrumb a:hover { text-decoration: underline; }
.curr-breadcrumb .sep { color: #8c959f; margin: 0 0.35em; }
.curr-breadcrumb strong { color: #1f2328; }

.curr-topic-body h1 { font-size: 1.3em; margin: 1.2em 0 0.5em; }
.curr-topic-body h1:first-child { margin-top: 0; }
.curr-topic-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.6em 0 1.2em;
  font-size: 0.92em;
}
.curr-topic-body th,
.curr-topic-body td {
  border: 1px solid #d1d9e0;
  padding: 0.45em 0.7em;
  text-align: left;
  vertical-align: top;
}
.curr-topic-body th { background: #f6f8fa; }
.curr-topic-body .katex { font-size: 1em; }

.curr-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  margin-top: 1.2em;
  padding-top: 0.8em;
  border-top: 1px solid #eaecef;
  font-size: 0.9em;
}
.curr-prevnext a {
  color: #0969da;
  text-decoration: none;
  max-width: 48%;
}
.curr-prevnext a:hover { text-decoration: underline; }
.curr-prevnext .spacer { visibility: hidden; }

.curr-loading {
  color: #8c959f;
  font-style: italic;
  padding: 1em 0;
}

@media (max-width: 1000px) {
  .curr-grid { grid-template-columns: repeat(3, 1fr); }
  .curr-col:nth-child(3) { border-right: none; }
  .curr-col:nth-child(n+4) { border-top: 1px solid #d1d9e0; }
}
@media (max-width: 600px) {
  .curr-grid { grid-template-columns: repeat(2, 1fr); }
  .curr-col { border-right: 1px solid #d1d9e0; }
  .curr-col:nth-child(2n) { border-right: none; }
  .curr-col:nth-child(n+3) { border-top: 1px solid #d1d9e0; }
}
