/* ============================================================
   scifi.css: shared styles for "scifi" course chapters (rule P1 "Styling").

   A chapter links this sheet and its own course sheet, and wraps its content in
       <div class="scifi-lesson <course>">
   where <course> is the course's slug (styles/courses/<course>.css sets that course's colours).
   Every rule is scoped under .scifi-lesson, so nothing leaks into the site.

   The colours that differ between courses are CSS variables; the value after the
   comma in var(--cN, value) is the default (the first course's colour). To start a
   new course in this genre, copy a sibling's styles/courses/<course>.css, rename its
   class and change the values.

   Variables:
     --c1             default #b89ee8    e.g. .compare-table th, .concept-card__title, .course-name
     --c2             default #8a7fa0    e.g. .chapter-sub
     --c3             default #2a2038    e.g. .chapter-sub, .compare-table td, .concept-card
     --c4             default #5a3f8a    e.g. .compare-table th, .concept-card, .reflect-card
     --c5             default #1a1428    e.g. .concept-card, .reflect-card, .section-intro
     --c6             default #241c38    e.g. .compare-table th
     --c7             default #1e1830    e.g. .compare-table tr:nth-child(
     --c8             default #140f20    e.g. .quick-ref
   ============================================================ */
.scifi-lesson {
  font-family: 'Georgia', serif;
  color: #dfe9e1;
  line-height: 1.75;
}

.scifi-lesson *, .scifi-lesson *::before, .scifi-lesson *::after {
  box-sizing: border-box;
}

.scifi-lesson .lesson-head {
  margin-bottom: 1.6rem;
  font-family: system-ui, sans-serif;
}

.scifi-lesson .course-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c1, #b89ee8);
  margin: 0 0 4px;
}

.scifi-lesson .chapter-sub {
  font-size: 0.85rem;
  color: var(--c2, #8a7fa0);
  letter-spacing: 0.02em;
  margin: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c3, #2a2038);
}

.scifi-lesson h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #eef7f0;
  border-bottom: 2px solid var(--c4, #5a3f8a);
  padding-bottom: 8px;
  margin: 2.5rem 0 1rem;
}

.scifi-lesson h2:first-of-type {
  margin-top: 0;
}

.scifi-lesson h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.4rem 0 0.6rem;
  color: var(--c1, #b89ee8);
  font-family: system-ui, sans-serif;
}

.scifi-lesson p {
  margin-bottom: 1rem;
}

.scifi-lesson ul, .scifi-lesson ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.scifi-lesson li {
  margin-bottom: 0.5rem;
  color: #dfe9e1;
}

.scifi-lesson strong {
  color: #eef7f0;
}

.scifi-lesson em {
  color: var(--c1, #b89ee8);
}

.scifi-lesson .section-intro {
  font-style: italic;
  color: #b9c9bd;
  margin: 1rem 0 1.6rem;
  padding: 1rem 1.2rem;
  background: var(--c5, #1a1428);
  border-left: 4px solid var(--c4, #5a3f8a);
}

.scifi-lesson .concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin: 1.2rem 0 1.6rem;
}

.scifi-lesson .concept-card {
  background: var(--c5, #1a1428);
  border: 1px solid var(--c3, #2a2038);
  border-radius: 8px;
  padding: 1.2rem;
  font-family: system-ui, sans-serif;
  border-left: 4px solid var(--c4, #5a3f8a);
}

.scifi-lesson .concept-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--c1, #b89ee8);
  margin-bottom: 0.5rem;
}

.scifi-lesson .concept-card p {
  font-size: 0.86rem;
  color: #b9c9bd;
  margin: 0;
}

.scifi-lesson .work-card {
  background: var(--c5, #1a1428);
  border: 1px solid var(--c3, #2a2038);
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  margin: 1.2rem 0 1.6rem;
  border-left: 4px solid var(--c4, #5a3f8a);
}

.scifi-lesson .work-card .work-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c1, #b89ee8);
  margin-bottom: 0.7rem;
  font-family: system-ui, sans-serif;
}

.scifi-lesson .compare-table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0 1.6rem;
}

.scifi-lesson .compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  font-family: system-ui, sans-serif;
}

.scifi-lesson .compare-table th {
  background: var(--c6, #241c38);
  color: var(--c1, #b89ee8);
  text-align: left;
  padding: 0.65rem 0.9rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--c4, #5a3f8a);
}

.scifi-lesson .compare-table td {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--c3, #2a2038);
  vertical-align: top;
  color: #cdddd0;
}

.scifi-lesson .compare-table tr:nth-child(even) td {
  background: var(--c7, #1e1830);
}

.scifi-lesson .tip-box, .scifi-lesson .warn-box, .scifi-lesson .echo-box {
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.4rem;
  font-family: system-ui, sans-serif;
  font-size: 0.9em;
}

.scifi-lesson .tip-box {
  background: #14251f;
  border-left: 4px solid #4fa878;
  color: #b8d4c2;
}

.scifi-lesson .tip-box strong {
  color: #6fc99a;
}

.scifi-lesson .warn-box {
  background: #251c12;
  border-left: 4px solid #d6954f;
  color: #d8c2a8;
}

.scifi-lesson .warn-box strong {
  color: #e0ac66;
}

.scifi-lesson .echo-box {
  background: #14251f;
  border-left: 4px solid #4fa878;
  color: #b8d4c2;
}

.scifi-lesson .echo-box strong, .scifi-lesson .echo-title {
  color: #6fc99a;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.scifi-lesson .reflect-grid {
  display: grid;
  gap: 1.1rem;
  margin: 1.6rem 0;
}

.scifi-lesson .reflect-card {
  background: var(--c5, #1a1428);
  border: 1px solid var(--c3, #2a2038);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--c4, #5a3f8a);
  font-family: system-ui, sans-serif;
}

.scifi-lesson .reflect-card .reflect-num {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c1, #b89ee8);
  margin-bottom: 0.5rem;
}

.scifi-lesson .reflect-card p {
  color: #cdddd0;
  margin: 0;
  font-size: 0.9rem;
}

.scifi-lesson .quick-ref {
  background: var(--c8, #140f20);
  border: 1px solid var(--c3, #2a2038);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin-top: 2.5rem;
  font-family: system-ui, sans-serif;
}

.scifi-lesson .quick-ref h3 {
  color: var(--c1, #b89ee8);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.scifi-lesson .quick-ref ul {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.scifi-lesson .quick-ref li {
  font-size: 0.88rem;
  color: #cdddd0;
}
