/* NWIC MATH 102 Stream C — Shared Stylesheet
   Colors from NWIC Canvas Course Design Guide:
   - Red (headings): #892e2f
   - Teal (dividers/accents): #729786
   - Dark text: #2c3e50
   Accessibility (WCAG AA) text-color variants:
   - Sage text on white/light: #5b786a (4.84:1 on white, 4.59:1 on cream)
   - Gold text (large) on light bg: #b48813 (3.08:1)
   - Gold text (normal) on light bg: #8e6b0f (4.57:1)
   - Forest green text on light bg: #487957 (4.57:1)
*/

/* === Base === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.7;
  color: #2c3e50;
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}
h1 {
  color: #892e2f;
  font-size: 1.8em;
  border-bottom: 3px solid #729786;
  padding-bottom: 8px;
  margin-bottom: 20px;
}
h2 {
  color: #892e2f;
  font-size: 1.3em;
  margin: 28px 0 12px 0;
}
h3 {
  color: #4a4a4a;
  font-size: 1.1em;
  margin: 20px 0 8px 0;
}
p { margin-bottom: 14px; }
hr {
  border: none;
  border-top: 2px solid #729786;
  margin: 24px 0;
}

/* === Badges === */
.outcome-badge {
  display: inline-block;
  background: #5d7b6d;
  color: #fff;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85em;
  margin-bottom: 16px;
}

/* === Three Lanes === */
.lane {
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
}
.lane-traditional {
  background: #fef9e7;
  border-left: 5px solid #d4a017;
}
.lane-visual {
  background: #eef5f0;
  border-left: 5px solid #729786;
}
.lane-story {
  background: #f4ecf7;
  border-left: 5px solid #892e2f;
}
.lane-label {
  font-weight: bold;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.lane-traditional .lane-label { color: #b48813; }
.lane-visual .lane-label { color: #5b786a; }
.lane-story .lane-label { color: #892e2f; }

/* === Key Idea / Insight Boxes === */
.key-idea {
  background: #eef5f0;
  border: 2px solid #729786;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}
.key-idea strong { color: #487957; }

.warning {
  background: #fdf0f0;
  border: 1px solid #892e2f;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}
.warning strong { color: #892e2f; }

/* === Examples === */
.example {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 12px 0;
}
.step { margin: 6px 0 6px 20px; }

/* === Tables (NWIC Accessible) === */
table {
  border-collapse: collapse;
  margin: 12px 0;
  width: 100%;
}
caption {
  font-weight: bold;
  margin-bottom: 6px;
  text-align: left;
  color: #4a4a4a;
}
th, td {
  border: 1px solid #bbb;
  padding: 8px 12px;
  text-align: center;
}
th {
  background: #5d7b6d;
  color: #fff;
}
tbody tr:nth-child(even) {
  background: #f9f9f9;
}

/* === Book References === */
.book-ref {
  background: #fdf5ef;
  border: 1px solid #d4a017;
  border-radius: 6px;
  padding: 10px 14px;
  margin: 16px 0;
  font-size: 0.9em;
}
.book-ref strong { color: #8e6b0f; }

/* === Check Yourself (spoiler hover) === */
.check-yourself {
  background: #eef5f0;
  border: 2px solid #729786;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}
.check-yourself h3 { color: #5b786a; margin-top: 0; }
.spoiler {
  background: #2c3e50;
  color: #2c3e50;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.3s;
}
.spoiler:hover { color: #fff; }

/* === Worksheet-specific === */
.problem {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 14px 0;
}
.problem-number {
  font-weight: bold;
  color: #892e2f;
  font-size: 1.1em;
}
.answer-space {
  border: 1px dashed #bbb;
  border-radius: 6px;
  min-height: 60px;
  margin: 10px 0;
  padding: 10px;
  background: #fff;
  color: #757575;
  font-style: italic;
}
.answer-space-tall { min-height: 120px; }

/* Section headers for worksheet lanes */
.h2-traditional { background: #fef9e7; border-left: 5px solid #d4a017; padding: 8px 14px; border-radius: 6px; color: #7d6608; }
.h2-visual { background: #eef5f0; border-left: 5px solid #729786; padding: 8px 14px; border-radius: 6px; color: #487957; }
.h2-story { background: #f4ecf7; border-left: 5px solid #892e2f; padding: 8px 14px; border-radius: 6px; color: #892e2f; }
.h2-synthesis { background: #eef5f0; border-left: 5px solid #729786; padding: 8px 14px; border-radius: 6px; color: #487957; }

/* === TILT Sections (for assignments/worksheets) === */
.tilt-purpose, .tilt-task, .tilt-criteria {
  margin: 16px 0;
}
.tilt-purpose h2, .tilt-task h2, .tilt-criteria h2 {
  color: #892e2f;
}
.tilt-divider {
  border: none;
  border-top: 2px solid #729786;
  margin: 20px 0;
}

/* === Portfolio Note === */
.portfolio-note {
  background: #fdf5ef;
  border: 2px solid #d4a017;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
}
.portfolio-note strong { color: #8e6b0f; }

/* === Instructor-Only (Socratic Guides) === */
.instructor-only {
  background: #fdf0f0;
  border: 2px solid #892e2f;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #892e2f;
}
.question-block {
  background: #fef9e7;
  border-left: 5px solid #d4a017;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 14px 0;
}
.question-block .q {
  font-weight: bold;
  font-size: 1.1em;
  color: #7d6608;
  margin-bottom: 8px;
}
.anticipated { color: #666; font-style: italic; margin-bottom: 6px; }
.followup { color: #5b786a; margin-left: 20px; font-weight: 500; }
.misconception {
  background: #fdf0f0;
  border: 1px solid #892e2f;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
}
.misconception strong { color: #892e2f; }
.insight {
  background: #eef5f0;
  border: 1px solid #729786;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
}
.insight strong { color: #487957; }
.timing {
  display: inline-block;
  background: #5d7b6d;
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8em;
}
.prep-note {
  background: #eef5f0;
  border-radius: 6px;
  padding: 14px;
  margin: 14px 0;
}
.prep-note strong { color: #5b786a; }
.transition {
  background: #f4ecf7;
  border-left: 4px solid #892e2f;
  padding: 10px 16px;
  margin: 12px 0;
  font-style: italic;
  color: #892e2f;
}
.live-calc {
  background: #fff9e6;
  border: 2px solid #d4a017;
  border-radius: 8px;
  padding: 14px;
  margin: 12px 0;
}

/* === SVG Text === */
svg text { font-family: 'Segoe UI', Arial, sans-serif; }

/* === Info Box (Session Notes) === */
.info-box {
  background: #eef5f0;
  border-radius: 8px;
  padding: 16px;
  margin: 14px 0;
}
.video-box {
  background: #fef9e7;
  border: 2px solid #d4a017;
  border-radius: 8px;
  padding: 16px;
  margin: 14px 0;
}
.video-box a { color: #5b786a; font-weight: bold; }
a { color: #5b786a; }

/* === Raven Says (Cultural Commentary — Project 7) === */
.raven-says {
  background: #1a1a2e;
  color: #e0dcd0;
  border-left: 5px solid #d4a017;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.95em;
  line-height: 1.6;
}
.raven-says .raven-label {
  font-weight: bold;
  color: #d4a017;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}
.raven-says em { color: #c8c4b8; }
.raven-says strong { color: #d4a017; }

/* === Global list styles === */
ul, ol { margin-left: 22px; margin-bottom: 14px; }
li { margin-bottom: 6px; }

/* === Session Header (new template, Sessions 05+) === */
.session-header {
  background: #892e2f;
  color: white;
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.session-header h1 {
  color: white;
  border-bottom: none;
  margin-bottom: 4px;
  padding-bottom: 0;
}
.session-label {
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
  margin-bottom: 6px;
}
.session-subtitle {
  color: #5b786a;
  font-style: italic;
  font-size: 0.95em;
  margin: 4px 0 16px 0;
}

/* === Subtitle (old template, Sessions 01–04) === */
.subtitle {
  color: #5b786a;
  font-size: 1em;
  margin-bottom: 16px;
  font-style: italic;
}

/* === Generic Box Label === */
.box-label {
  font-weight: bold;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

/* === Where We Are === */
.where-we-are {
  background: #f4ecf7;
  border-left: 5px solid #892e2f;
  border-radius: 0 8px 8px 0;
  padding: 14px 20px;
  margin: 16px 0;
}
.where-we-are .box-label { color: #892e2f; }
.where-we-are h2 { color: #892e2f; }

/* === Video Embed (old template) === */
.video-embed {
  margin: 20px 0;
  padding: 16px 20px;
  background: #fef9e7;
  border: 2px solid #d4a017;
  border-radius: 8px;
}
.video-embed h3 { color: #b48813; margin-top: 0; }
.video-embed iframe {
  display: block;
  margin: 10px auto;
  max-width: 100%;
  border-radius: 6px;
}
.video-embed .video-note { font-size: 0.85em; color: #727272; margin-top: 8px; }
.video-embed a { color: #5b786a; font-weight: bold; }

/* === Video Container (new template) === */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  margin: 12px 0;
}
.video-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* === Alt Videos === */
.alt-videos { margin: 16px 0; }

/* === Big Idea === */
.big-idea {
  background: #eef5f0;
  border: 2px solid #729786;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}
.big-idea .box-label { color: #487957; }

/* === Three Lanes Header === */
.three-lanes-header {
  font-weight: bold;
  font-size: 1em;
  color: #2c3e50;
  margin: 24px 0 8px 0;
  padding: 8px 0;
  border-bottom: 2px solid #729786;
}

/* === Generic Section Wrapper (new template) === */
.section { margin: 20px 0; }

/* === Story Lane (new template) — dark Raven Says style === */
.story-lane {
  background: #1a1a2e;
  color: #e0dcd0;
  border-left: 5px solid #d4a017;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.95em;
  line-height: 1.75;
}
.story-lane h2 { color: #d4a017; border-bottom: none; margin-bottom: 10px; }
.story-lane p { color: #e0dcd0; }
.story-lane em { color: #c8c4b8; }
.story-lane strong { color: #d4a017; }

/* === Visual Lane (new template) === */
.visual-lane {
  background: #eef5f0;
  border-left: 5px solid #729786;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 16px 0;
}

/* === Traditional Lane (new template) === */
.traditional-lane {
  background: #fef9e7;
  border-left: 5px solid #d4a017;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 16px 0;
}

/* === Desmos Demo (new) and Desmos Box (old) === */
.desmos-demo, .desmos-box {
  background: #fff9e6;
  border: 2px solid #d4a017;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}
.desmos-demo h2, .desmos-box h3 { color: #b48813; margin-top: 0; }

/* === Key Takeaways (new template) === */
.key-takeaways {
  background: #eef5f0;
  border: 2px solid #729786;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}
.key-takeaways h2 { color: #487957; }

/* === Rules Box === */
.rules-box {
  background: #fef9e7;
  border: 2px solid #d4a017;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}
.rules-box h2, .rules-box h3 { color: #b48813; margin-top: 0; }

/* === Pitfalls (old template) === */
.pitfalls {
  background: #fdf0f0;
  border: 1px solid #892e2f;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}
.pitfalls .box-label { color: #892e2f; margin-bottom: 8px; }
.pitfall-item { margin-bottom: 10px; }
.pitfall-item strong { color: #892e2f; }

/* === Pitfalls Box (new template) === */
.pitfalls-box {
  background: #fdf0f0;
  border: 1px solid #892e2f;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 16px 0;
}
.pitfalls-box h2 { color: #892e2f; }

/* === Real World === */
.real-world {
  background: #eef5f0;
  border-left: 5px solid #4a7c59;
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 16px 0;
}
.real-world .box-label { color: #487957; }
.real-world h2 { color: #487957; }

/* === Confidence / Confidence Booster === */
.confidence, .confidence-booster {
  background: #fef9e7;
  border: 2px solid #d4a017;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
  text-align: center;
  font-size: 1.05em;
}

/* === Accordion Self-Check === */
.self-check, .check-yourself {
  background: #eef5f0;
  border: 2px solid #729786;
  border-radius: 8px;
  padding: 16px;
  margin: 20px 0;
}
.self-check h2, .self-check h3,
.check-yourself h2, .check-yourself h3 { color: #5b786a; margin-top: 0; }
.check-yourself .check-intro { font-size: 0.9em; color: #555; margin-bottom: 12px; }

details {
  background: #fff;
  border: 1px solid #b5d0c0;
  border-radius: 6px;
  margin: 10px 0;
}
summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
  color: #2c3e50;
  list-style: none;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::before { content: "\25BA\0020"; color: #5b786a; font-size: 0.8em; }
details[open] > summary::before { content: "\25BC\0020"; }
details[open] > summary { border-bottom: 1px solid #b5d0c0; }
.answer, .answer-content {
  padding: 12px 14px;
  background: #f0f7f4;
  border-radius: 0 0 6px 6px;
}
.answer p, .answer-content p { margin-bottom: 8px; }
.answer p:last-child, .answer-content p:last-child { margin-bottom: 0; }

/* === Workshop Preview === */
.workshop-preview, .workshop {
  background: #f4ecf7;
  border-left: 5px solid #892e2f;
  border-radius: 0 8px 8px 0;
  padding: 14px 20px;
  margin: 16px 0;
}
.workshop-preview h2, .workshop h2, .workshop h3 { color: #892e2f; margin-top: 0; }
.workshop-preview .box-label { color: #892e2f; }

/* === Next Connection / Next Session === */
.next-connection, .next-session {
  background: #eef5f0;
  border: 1px solid #729786;
  border-radius: 8px;
  padding: 14px 20px;
  margin: 16px 0;
}
.next-connection h2 { color: #487957; }
.next-session .box-label { color: #487957; }

/* === Book References (new template) === */
.book-references {
  background: #fdf5ef;
  border: 1px solid #d4a017;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.9em;
}
.book-references h2 { color: #b48813; }

/* === Book Ref Item (old template) === */
.book-ref-item {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0dfc0;
}
.book-ref-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.book-ref .box-label { color: #b48813; }

/* === Example Box (new template) === */
.example-box {
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 12px 0;
}

/* === Video Section wrapper === */
.video-section {
  margin: 20px 0;
  padding: 16px 20px;
  background: #fef9e7;
  border: 2px solid #d4a017;
  border-radius: 8px;
}
.video-section h2 { color: #b48813; margin-top: 0; }

/* === Print === */
@media print {
  body { max-width: 100%; padding: 10px; }
  .spoiler { color: #fff !important; background: #666; }
  .raven-says { background: #f5f5f0; color: #333; border-left-color: #999; }
  .raven-says .raven-label { color: #666; }
  .raven-says em { color: #555; }
  .raven-says strong { color: #333; }
}
