/* ============================================
   Future Course Template System — Version 2
   UMA Brand Guide + Team Recommendations
   ============================================ */

/* Google Fonts — Merriweather (hero H1) + Roboto (all body and subheadings) */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@900&family=Roboto:wght@400;700&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */

:root {
  /* Primary Brand Colors — UMA Brand Guide */
  --color-navy:    #0d3553;   /* Legend Blue  — hero, sidebar, dark headers */
  --color-blue:    #1d6ba6;   /* Hero Blue    — H2, links, active states    */
  --color-horizon: #0095c8;   /* Horizon Blue — tip callout, secondary icon */
  --color-cta:     #15eac4;   /* Journey Green — all buttons and CTAs        */

  /* Semantic Colors */
  --color-gold:    #f2b84b;   /* Important/Warning callout */
  --color-danger:  #c93f38;   /* Danger callout, incorrect answer */
  --color-success: #2f7d59;   /* Correct answer, success badge */

  /* Surface + Text */
  --color-bg:            #f7f9fb;
  --color-surface:       #ffffff;
  --color-surface-muted: #eef4f7;
  --color-text:          #28323a;
  --color-muted:         #66737d;
  --color-border:        #d6e0e6;
  --color-focus:         #ffbf47;

  /* Typography */
  --font-body: 'Roboto', Arial, Helvetica, sans-serif;
  --font-hero: 'Merriweather', Georgia, "Times New Roman", serif;

  /* Spacing */
  --space-xxs:     0.25rem;
  --space-xs:      0.5rem;
  --space-sm:      1rem;
  --space-md:      1.5rem;
  --space-lg:      2rem;
  --space-xl:      3rem;
  --space-section: 3rem;

  /* Shape */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-pill: 50px;

  /* Shadows */
  --shadow-sm: 0 1px 4px rgba(13, 53, 83, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 53, 83, 0.12);
}

/* ============================================
   RESET + BASE
   ============================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-blue);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-navy);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

table {
  border-collapse: collapse;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* ============================================
   SKIP LINK
   ============================================ */

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: var(--space-sm);
  z-index: 20;
  padding: 0.65rem 1rem;
  color: var(--color-navy);
  background: var(--color-focus);
  border-radius: var(--radius-pill);
  font-weight: 700;
  transform: translateY(-140%);
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ============================================
   TYPOGRAPHY
   V2: H1 = Merriweather hero only, non-italic
       H2 = Roboto Bold, Hero Blue
       H3+ = Roboto Bold, Legend Blue
   ============================================ */

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-sm);
  font-weight: 700;
  font-style: normal;
  line-height: 1.25;
}

/* H1 — hero banner only; Merriweather per brand guide */
h1 {
  font-family: var(--font-hero);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--color-navy);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

/* H2 — Roboto Bold, Hero Blue, reduced margin per recommendation */
h2 {
  font-family: var(--font-body);
  font-size: 1.6rem;
  color: var(--color-blue);
  margin-bottom: 0.375rem;
}

/* H3 — Roboto Bold, Legend Blue */
h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-navy);
}

/* H4 — Roboto Bold, Legend Blue */
h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-navy);
}

p,
ul,
ol {
  margin-top: 0;
}

p,
li {
  max-width: 72ch;
}

ul,
ol {
  padding-left: 1.35rem;
  margin-bottom: var(--space-sm);
}

li + li {
  margin-top: 0.35rem;
}

code {
  padding: 0.1rem 0.28rem;
  color: var(--color-navy);
  background: var(--color-surface-muted);
  border-radius: var(--radius-sm);
  font-size: 0.95em;
}

/* ============================================
   LAYOUT
   ============================================ */

.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar — prototype navigation only
   Remove this element when deploying to D2L.
   Use D2L's native Table of Contents instead. */
.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 260px;
  width: 260px;
  height: 100vh;
  padding: var(--space-md);
  overflow-y: auto;
  color: #ffffff;
  background: var(--color-navy);
}

.sidebar-badge {
  display: inline-block;
  margin-bottom: var(--space-sm);
  padding: 0.2rem 0.6rem;
  color: var(--color-navy);
  background: var(--color-cta);
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-title {
  margin: 0 0 var(--space-sm);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar-nav li {
  max-width: none;
  margin: 0;
}

.sidebar-nav a,
.nav-section-label {
  display: block;
  border-radius: var(--radius-sm);
}

.sidebar-nav a {
  padding: 0.48rem 0.75rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active,
.sidebar-nav a[aria-current="true"] {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.sidebar-nav a.active::before,
.sidebar-nav a[aria-current="true"]::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--color-cta);
  border-radius: 2px;
  margin-right: 0.5rem;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.nav-section-label {
  padding: var(--space-md) 0.75rem 0.35rem;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.main-content {
  flex: 1;
  width: 100%;
  max-width: 960px;
  padding: var(--space-lg) var(--space-xl);
}

.content-section {
  margin-bottom: var(--space-section);
  scroll-margin-top: var(--space-md);
}

/* ============================================
   HERO BANNER
   ============================================ */

.course-header {
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(13, 53, 83, 0.97) 0%, rgba(29, 107, 166, 0.90) 100%),
    var(--color-navy);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative accent in hero — brand-aligned angular shape */
.course-header::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 240px;
  height: 240px;
  background: rgba(21, 234, 196, 0.07);
  border-radius: 50%;
  pointer-events: none;
}

.course-header h1 {
  color: #ffffff;
  max-width: 18ch;
  margin-bottom: var(--space-sm);
  font-size: 2.1rem;
  line-height: 1.1;
}

.course-label {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  margin: var(--space-sm) 0 0;
  list-style: none;
}

.course-meta li {
  max-width: none;
  padding: 0.38rem 0.8rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
}

.course-meta li + li {
  margin-top: 0;
}

.meta-label {
  font-weight: 700;
}

/* ============================================
   IN-PAGE ANCHOR NAVIGATION
   Replaces the fake progress bar.
   Provides jump-link orientation within the page.
   ============================================ */

.inpage-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: var(--space-lg);
  padding: 0.7rem var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.inpage-nav-label {
  color: var(--color-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 0.25rem;
  white-space: nowrap;
}

.inpage-nav a {
  padding: 0.3rem 0.75rem;
  color: var(--color-blue);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.inpage-nav a:hover {
  background: var(--color-blue);
  border-color: var(--color-blue);
  color: #ffffff;
}

/* ============================================
   SECTION HEADERS + KICKERS
   ============================================ */

.section-header {
  margin-bottom: var(--space-md);
}

.section-header h2 {
  margin-bottom: 0;
}

.section-kicker {
  margin: 0 0 0.25rem;
  color: var(--color-blue);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-eyebrow {
  margin: 0 0 0.35rem;
  color: var(--color-blue);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================
   OVERVIEW GRID + CARD GRID
   ============================================ */

.overview-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

/* Row variant — forces horizontal layout for 3-objective lesson pages */
.card-grid--row {
  grid-template-columns: repeat(3, 1fr);
}

.overview-item,
.card,
.reflection-block,
.checklist-block,
.knowledge-check,
.next-steps {
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

/* No hover lift on non-link cards — removes misleading interactive cue */
.overview-item h3,
.card-title,
.reflection-block h3,
.checklist-block h3,
.knowledge-check h3,
.next-steps h3 {
  margin-bottom: var(--space-xs);
}

.overview-item p:last-child,
.card p:last-child,
.reflection-block p:last-child,
.checklist-block p:last-child,
.knowledge-check p:last-child,
.next-steps p:last-child,
.callout p:last-child,
.accordion-panel p:last-child,
.tab-panel p:last-child {
  margin-bottom: 0;
}

/* ============================================
   CALLOUTS
   V2: Four distinct types with unique icons,
   colors, and labels for rapid scan recognition.
   ============================================ */

.callout {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left-width: 5px;
  border-radius: var(--radius-md);
}

.callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  color: #ffffff;
  background: var(--color-blue);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1;
}

.callout-body {
  flex: 1;
}

.callout-title {
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* NOTE — Hero Blue */
.callout-info {
  border-left-color: var(--color-blue);
  background: #edf6fb;
}

.callout-info .callout-icon {
  background: var(--color-blue);
  color: #ffffff;
}

.callout-info .callout-title {
  color: var(--color-blue);
}

/* TIP — Horizon Blue */
.callout-tip {
  border-left-color: var(--color-horizon);
  background: #e8f5fb;
}

.callout-tip .callout-icon {
  background: var(--color-horizon);
  color: #ffffff;
}

.callout-tip .callout-title {
  color: #007aaa;
}

/* IMPORTANT — Gold (accessible navy text on gold) */
.callout-warning {
  border-left-color: var(--color-gold);
  background: #fff8e8;
}

.callout-warning .callout-icon {
  background: var(--color-gold);
  color: var(--color-navy);
}

.callout-warning .callout-title {
  color: #8a5a00;
}

/* DANGER — Red */
.callout-danger {
  border-left-color: var(--color-danger);
  background: #fff0ee;
}

.callout-danger .callout-icon {
  background: var(--color-danger);
  color: #ffffff;
}

.callout-danger .callout-title {
  color: #a12c26;
}

/* ============================================
   TABLES
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-md) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  background: var(--color-surface);
  /* No global min-width — rubric table opts in via .rubric-table */
}

caption {
  padding: 0.8rem var(--space-sm);
  color: var(--color-muted);
  text-align: left;
  font-size: 0.875rem;
  font-weight: 700;
}

thead {
  color: #ffffff;
  background: var(--color-navy);
}

th,
td {
  padding: 0.75rem var(--space-sm);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--color-border);
}

th {
  font-weight: 700;
}

tbody th {
  color: var(--color-navy);
  background: rgba(238, 244, 247, 0.5);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:nth-child(even) td,
tbody tr:nth-child(even) th {
  background: #f9fbfc;
}

/* Rubric table — opts into min-width since it genuinely needs column space */
.rubric-table {
  min-width: 580px;
}

.rubric-table td,
.rubric-table th {
  min-width: 120px;
}

/* ============================================
   MEDIA BLOCK
   V2: 16:9 responsive container, required
   metadata fields, black caption text.
   ============================================ */

.media-block {
  margin: var(--space-md) 0;
}

.media-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 0.5rem;
}

.media-type-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  color: #ffffff;
  background: var(--color-navy);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.media-duration {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 700;
}

/* 16:9 intrinsic ratio container — scales correctly at all widths */
.media-ratio {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: var(--color-surface-muted);
  border: 1px dashed var(--color-blue);
  border-radius: var(--radius-md);
}

.media-ratio-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-xs);
}

.media-placeholder-text {
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.95rem;
}

.media-placeholder-note {
  color: var(--color-muted);
  font-size: 0.82rem;
  text-align: center;
  max-width: 36ch;
}

/* Caption — black text per recommendation */
.media-caption {
  margin: 0.65rem 0 0.35rem;
  color: var(--color-text);
  font-size: 0.9rem;
  max-width: none;
}

.media-transcript {
  margin: 0;
  font-size: 0.875rem;
  max-width: none;
}

.media-transcript a {
  font-weight: 700;
}

/* ============================================
   TABS
   V2: Dark navy active state with white text —
   unambiguous which tab is selected.
   ============================================ */

.tabs {
  margin: var(--space-md) 0;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.3rem;
  margin-bottom: 0;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tab-button {
  min-height: 2.5rem;
  padding: 0.5rem var(--space-sm);
  color: var(--color-navy);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background 0.14s ease, color 0.14s ease;
}

.tab-button:hover:not([aria-selected="true"]) {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

/* Active tab — dark navy + white, clearly selected */
.tab-button[aria-selected="true"] {
  background: var(--color-navy);
  color: #ffffff;
  box-shadow: none;
}

.tab-panel {
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
}

.tab-panel > .accordion {
  margin-top: 0;
  margin-bottom: 0;
}

/* ============================================
   ACCORDIONS
   V2: Open trigger changes to dark navy with
   white text + internal top padding added.
   ============================================ */

.accordion {
  overflow: hidden;
  margin: var(--space-md) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.accordion-item + .accordion-item {
  border-top: 1px solid var(--color-border);
}

.accordion-item h3 {
  margin: 0;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3.25rem;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-navy);
  background: var(--color-surface);
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.accordion-trigger:hover:not([aria-expanded="true"]) {
  background: var(--color-surface-muted);
}

/* Open state — dark navy header with white text */
.accordion-trigger[aria-expanded="true"] {
  background: var(--color-navy);
  color: #ffffff;
}

.accordion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  margin-left: var(--space-sm);
  color: #ffffff;
  background: var(--color-blue);
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.14s ease;
}

.accordion-icon::before {
  content: "+";
  font-weight: 700;
}

/* Icon on open trigger — semi-transparent against dark background */
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon::before {
  content: "−";
}

/* Panel — top padding added per recommendation */
.accordion-panel {
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

/* ============================================
   KNOWLEDGE CHECK
   ============================================ */

.knowledge-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-sm);
}

.choice-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 var(--space-sm);
}

.choice-button {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.65rem var(--space-sm);
  color: var(--color-navy);
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  text-align: left;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.choice-button:hover:not([disabled]) {
  border-color: var(--color-blue);
  background: var(--color-surface);
}

.choice-button[disabled] {
  cursor: not-allowed;
}

.choice-button.is-correct {
  color: #ffffff;
  background: var(--color-success);
  border-color: var(--color-success);
}

.choice-button.is-incorrect {
  color: #ffffff;
  background: var(--color-danger);
  border-color: var(--color-danger);
}

.knowledge-feedback {
  min-height: 1.5rem;
  margin: 0 0 var(--space-xs);
  font-weight: 700;
  font-size: 0.9rem;
}

.knowledge-feedback.is-success {
  color: var(--color-success);
}

.knowledge-feedback.is-error {
  color: var(--color-danger);
}

/* ============================================
   REFLECTION BLOCK
   ============================================ */

.reflection-block {
  border-left: 5px solid var(--color-cta);
}

.reflection-label {
  display: block;
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-navy);
}

.reflection-label span {
  font-weight: 400;
  color: var(--color-muted);
}

.reflection-block textarea {
  width: 100%;
  min-height: 120px;
  margin-top: var(--space-sm);
  padding: 0.65rem var(--space-sm);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
}

.reflection-block textarea:focus {
  border-color: var(--color-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29, 107, 166, 0.15);
}

/* ============================================
   CHECKLIST BLOCK
   ============================================ */

.checklist-block {
  margin-top: var(--space-md);
}

.checklist {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

/* ============================================
   INSTRUCTION LIST
   ============================================ */

.instruction-list {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.45rem;
}

.instruction-list li {
  padding-left: 0.25rem;
}

/* ============================================
   RESOURCE LIST
   V2: Clear link affordance — left accent border,
   arrow that moves on hover.
   ============================================ */

.resource-list {
  padding: 0;
  margin: var(--space-md) 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.resource-list li {
  max-width: none;
  margin: 0;
}

.resource-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.85rem var(--space-md);
  color: var(--color-navy);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-blue);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.resource-list a::after {
  content: "→";
  color: var(--color-blue);
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.15s ease;
}

.resource-list a:hover {
  border-color: var(--color-blue);
  border-left-color: var(--color-cta);
  box-shadow: var(--shadow-sm);
  color: var(--color-navy);
}

.resource-list a:hover::after {
  transform: translateX(5px);
  color: var(--color-navy);
}

/* ============================================
   BUTTONS
   V2: Pill shape + correct Journey Green (#15eac4)
   ============================================ */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.4rem;
  color: var(--color-navy);
  background: var(--color-cta);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn-primary {
  color: var(--color-navy);
  background: var(--color-cta);
}

.btn:hover {
  background: #0fd9b5;
  color: var(--color-navy);
  box-shadow: 0 4px 12px rgba(21, 234, 196, 0.35);
}

.btn-outline {
  color: var(--color-blue);
  background: transparent;
  border-color: var(--color-blue);
}

.btn-outline:hover {
  color: #ffffff;
  background: var(--color-blue);
  box-shadow: none;
}

.btn-lg {
  min-height: 3.1rem;
  padding: 0.8rem 1.75rem;
  font-size: 0.95rem;
}

.btn-sm {
  min-height: 2.1rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ============================================
   SUBMIT CTA BLOCK — Assignment page
   ============================================ */

.submit-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  background: linear-gradient(
    135deg,
    rgba(21, 234, 196, 0.07) 0%,
    rgba(29, 107, 166, 0.05) 100%
  );
  border: 2px solid var(--color-cta);
  border-radius: var(--radius-md);
}

.submit-cta-body h3 {
  margin-bottom: 0.3rem;
  font-size: 1.15rem;
}

.submit-cta-body p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
  max-width: 52ch;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-primary {
  color: var(--color-navy);
  background: #dceef8;
}

.badge-warning {
  color: #6f4a00;
  background: #fff1cc;
}

.badge-success {
  color: #19583d;
  background: #daf4e8;
}

/* ============================================
   DIVIDER
   ============================================ */

.divider {
  height: 1px;
  margin: var(--space-lg) 0;
  background: var(--color-border);
  border: 0;
}

/* ============================================
   NEXT STEPS BLOCK
   ============================================ */

.next-steps {
  margin-top: var(--space-lg);
}

/* ============================================
   PAGE FOOTER
   ============================================ */

.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  color: var(--color-muted);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.footer-nav {
  display: flex;
  gap: var(--space-md);
}

.footer-nav a {
  color: var(--color-muted);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.14s ease;
}

.footer-nav a:hover {
  color: var(--color-blue);
}

/* ============================================
   RESPONSIVE — TABLET (≤ 900px)
   ============================================ */

@media (max-width: 900px) {
  .page-wrapper {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
  }

  .main-content {
    max-width: none;
    padding: var(--space-md);
  }

  .course-header {
    padding: var(--space-md);
  }

  .course-header h1 {
    max-width: none;
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .card-grid--row {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .page-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-md);
  }

  .submit-cta {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-md);
  }
}

/* ============================================
   RESPONSIVE — MOBILE (≤ 640px)
   ============================================ */

@media (max-width: 640px) {
  .course-meta,
  .button-row,
  .tab-list {
    display: grid;
  }

  .course-meta li,
  .btn,
  .tab-button {
    width: 100%;
    text-align: center;
  }

  .callout {
    display: block;
  }

  .callout-icon {
    margin-bottom: var(--space-xs);
  }

  h2 {
    font-size: 1.3rem;
  }

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

  .inpage-nav {
    gap: 0.35rem;
  }

  /* Mobile rubric — stacked card view
     Replaces horizontal scroll with readable vertical layout */
  .rubric-table {
    min-width: 0;
  }

  .rubric-table thead {
    display: none;
  }

  .rubric-table tbody,
  .rubric-table tr,
  .rubric-table td,
  .rubric-table th {
    display: block;
    width: 100%;
  }

  .rubric-table tr {
    margin-bottom: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .rubric-table tr:last-child {
    margin-bottom: 0;
  }

  .rubric-table th[scope="row"] {
    background: var(--color-navy);
    color: #ffffff;
    font-size: 0.9rem;
    padding: 0.6rem var(--space-sm);
    border-bottom: 0;
  }

  .rubric-table td {
    padding: 0.55rem var(--space-sm) 0.55rem var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
  }

  .rubric-table td:last-child {
    border-bottom: 0;
  }

  /* Column label injected before each cell value */
  .rubric-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--color-blue);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
  }

  /* Even rows — remove zebra in stacked view */
  .rubric-table tbody tr:nth-child(even) td,
  .rubric-table tbody tr:nth-child(even) th {
    background: var(--color-surface);
  }

  .submit-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   PHASE 2 — NEW COMPONENTS
   ============================================ */

/* COMPARISON BLOCK */
.comparison-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: var(--space-md) 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.comparison-col { padding: var(--space-md); }
.comparison-col h3 {
  text-align: center;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  font-size: 1rem;
  color: inherit;
}
.comparison-col p,
.comparison-col li { font-size: 0.9rem; line-height: 1.65; max-width: none; margin-bottom: var(--space-xs); }
.comparison-col ul { padding-left: 1.2rem; margin-bottom: 0; }
.comparison-col li + li { margin-top: 0.4rem; }
.comparison-col--a { background: var(--color-navy); color: rgba(255,255,255,0.92); }
.comparison-col--a h3 { color: #ffffff; }
.comparison-col--b { background: var(--color-blue); color: rgba(255,255,255,0.92); border-left: 1px solid rgba(255,255,255,0.15); }
.comparison-col--b h3 { color: #ffffff; }
@media (max-width: 640px) {
  .comparison-block { grid-template-columns: 1fr; }
  .comparison-col--b { border-left: none; border-top: 1px solid rgba(255,255,255,0.2); }
}

/* SCENARIO BLOCK */
.scenario-block {
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-horizon);
  border-radius: var(--radius-md);
}
.scenario-label {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  margin-bottom: var(--space-sm);
  background: var(--color-navy);
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.scenario-block p { max-width: none; line-height: 1.75; margin-bottom: var(--space-sm); }
.scenario-block p:last-child { margin-bottom: 0; }

/* QUOTE / EMPHASIS BLOCK */
.quote-block {
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-md) 0;
  background: #edf6fb;
  border-radius: var(--radius-md);
  text-align: center;
}
.quote-block p { margin: 0; font-size: 1.1rem; font-weight: 700; color: var(--color-navy); line-height: 1.65; max-width: none; }

/* ICON CHECKLIST */
.icon-checklist { list-style: none; padding: 0; margin: var(--space-sm) 0; display: grid; gap: 0.55rem; }
.icon-checklist li { display: flex; align-items: flex-start; gap: 0.65rem; max-width: none; margin: 0; }
.icon-checklist li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--color-blue);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.1rem;
  line-height: 1;
}

/* KEY TAKEAWAY CALLOUT */
.callout-key { border-left-color: var(--color-navy); background: #edf2f7; }
.callout-key .callout-icon { background: var(--color-navy); color: #ffffff; font-size: 0.9rem; }
.callout-key .callout-title { color: var(--color-navy); }
.callout-key .callout-body p:not(.callout-title) { font-size: 1.025rem; font-weight: 500; line-height: 1.65; color: var(--color-navy); }

/* ALERT BAR */
.alert-bar {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  background: #f0f7ff;
  border: 1px solid #c3d9ef;
  border-left: 5px solid var(--color-blue);
  border-radius: var(--radius-md);
}
.alert-bar--urgent { background: #fff8e8; border-color: #f2d78c; border-left-color: var(--color-gold); }
.alert-bar-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  background: var(--color-blue);
  color: #ffffff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 0.1rem;
}
.alert-bar--urgent .alert-bar-icon { background: var(--color-gold); color: var(--color-navy); }
.alert-bar-body { flex: 1; }
.alert-bar-body strong { display: block; color: var(--color-navy); font-size: 0.95rem; margin-bottom: 0.2rem; }
.alert-bar-body p { margin: 0; font-size: 0.875rem; color: var(--color-text); max-width: none; }

/* DUE DATE CALLOUT */
.due-date {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem;
  background: #fff8e8;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius-md);
  margin: var(--space-sm) 0;
}
.due-date-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #8a5a00; white-space: nowrap; }
.due-date-value { font-weight: 700; color: var(--color-navy); font-size: 0.95rem; }

/* SUBMISSION HELP BLOCK */
.help-block { padding: var(--space-md); background: #fafafa; border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-top: var(--space-md); }
.help-block-title { display: block; font-size: 0.9rem; font-weight: 700; color: var(--color-navy); margin-bottom: var(--space-sm); }
.help-block ol { margin: 0 0 var(--space-xs); padding-left: 1.25rem; }
.help-block li { font-size: 0.875rem; color: var(--color-text); }
.help-block li + li { margin-top: 0.3rem; }
.help-block-note { margin: var(--space-xs) 0 0; font-size: 0.82rem; color: var(--color-muted); max-width: none; }

/* STEP FLOW */
.step-flow { display: grid; gap: var(--space-sm); margin: var(--space-md) 0; }
.step-item {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-blue);
  border-radius: var(--radius-md);
}
.step-number { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; background: var(--color-navy); color: #ffffff; border-radius: 50%; font-weight: 700; font-size: 0.875rem; }
.step-content { flex: 1; min-width: 0; }
.step-content h4 { margin: 0 0 0.2rem; font-size: 0.95rem; }
.step-content p  { margin: 0; font-size: 0.875rem; color: var(--color-muted); max-width: none; }

/* ACTIVITY TYPE LABELS */
.activity-type-strip { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin: var(--space-sm) 0; }
.activity-label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}
.activity-label--learn    { background: #dceef8; color: var(--color-navy); border-color: #b8d9ef; }
.activity-label--practice { background: #fff8e8; color: #6f4a00;           border-color: #f2d78c; }
.activity-label--do       { background: #daf4e8; color: #19583d;           border-color: #a6e0c4; }
.activity-label--apply    { background: #f0eafb; color: #5a2d82;           border-color: #c9b2e8; }

/* ACTIVITY BADGES */
.activity-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; border-radius: var(--radius-pill); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.activity-badge--graded   { background: #daf4e8; color: #19583d; border: 1px solid #a6e0c4; }
.activity-badge--practice { background: var(--color-surface-muted); color: var(--color-muted); border: 1px solid var(--color-border); }

/* QUICK LINKS */
.quick-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-sm); margin: var(--space-md) 0; }
.quick-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-md) var(--space-sm);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  gap: 0.4rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.quick-link-card:hover { border-color: var(--color-blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.quick-link-icon  { font-size: 1.5rem; color: var(--color-blue); display: block; line-height: 1; }
.quick-link-label { font-size: 0.82rem; font-weight: 700; color: var(--color-navy); }

/* HOME PAGE */
.home-hero {
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 100%);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.home-hero::after { content: ""; position: absolute; right: -80px; bottom: -80px; width: 300px; height: 300px; background: rgba(21,234,196,0.06); border-radius: 50%; pointer-events: none; }
.home-hero h1 { color: #ffffff; font-size: 2.1rem; max-width: 26ch; margin-bottom: var(--space-sm); }
.home-hero p  { color: rgba(255,255,255,0.85); font-size: 1rem; max-width: 58ch; margin-bottom: var(--space-md); }
.home-nav-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin: var(--space-md) 0; }
.home-nav-card {
  display: block;
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.home-nav-card:hover { border-color: var(--color-blue); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.home-nav-kicker { display: block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-blue); margin-bottom: 0.3rem; }
.home-nav-card h3 { margin-bottom: 0.3rem; font-size: 1rem; color: var(--color-navy); }
.home-nav-card p  { margin: 0; font-size: 0.85rem; color: var(--color-muted); max-width: none; }
.mvp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-sm); margin: var(--space-md) 0; }
.mvp-item { display: flex; align-items: flex-start; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.mvp-number { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; background: var(--color-navy); color: #ffffff; border-radius: 50%; font-size: 0.75rem; font-weight: 700; }
.mvp-item-body { flex: 1; }
.mvp-item-name { font-weight: 700; font-size: 0.875rem; color: var(--color-navy); margin: 0 0 0.1rem; display: block; }
.mvp-item-tier { font-size: 0.72rem; color: var(--color-muted); }

/* COMPONENT LIBRARY PAGE */
.cl-intro { padding: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); margin-bottom: var(--space-lg); }
.cl-section { margin-bottom: var(--space-xl); }
.cl-section-header { padding-bottom: var(--space-sm); margin-bottom: var(--space-md); border-bottom: 2px solid var(--color-blue); }
.cl-section-header h2 { margin-bottom: 0.2rem; }
.cl-section-header p  { margin: 0; color: var(--color-muted); font-size: 0.9rem; max-width: none; }
.cl-component { margin-bottom: var(--space-lg); padding: var(--space-md); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.cl-component-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-sm); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-border); flex-wrap: wrap; }
.cl-component-meta { flex: 1; }
.cl-component-name { margin: 0 0 0.2rem; color: var(--color-navy); font-size: 1rem; }
.cl-component-desc { margin: 0; color: var(--color-muted); font-size: 0.85rem; max-width: 56ch; }
.cl-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.cl-tag { display: inline-block; padding: 0.18rem 0.55rem; border-radius: var(--radius-pill); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.cl-tag--tier1 { background: var(--color-navy); color: #ffffff; }
.cl-tag--tier2 { background: var(--color-blue);  color: #ffffff; }
.cl-tag--high  { background: #daf4e8; color: #19583d; }
.cl-tag--med   { background: #fff8e8; color: #6f4a00; }
.cl-preview { padding: var(--space-md); background: var(--color-bg); border: 1px dashed var(--color-border); border-radius: var(--radius-sm); }
.cl-preview-label { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-muted); margin-bottom: var(--space-sm); }

/* DISCUSSION PAGE */
.discussion-intro { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.discussion-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; background: var(--color-blue); color: #ffffff; border-radius: 50%; font-size: 1.3rem; }
.discussion-questions { margin: var(--space-md) 0; }
.discussion-questions h3 { margin-bottom: var(--space-sm); color: var(--color-blue); }
.discussion-questions ol { display: grid; gap: var(--space-sm); padding-left: 1.35rem; margin-bottom: 0; }
.discussion-questions li { line-height: 1.7; max-width: none; font-size: 1rem; padding-left: 0.25rem; }

/* PRINT */
@media print {
  .sidebar, .inpage-nav, .page-footer, .home-hero .button-row { display: none !important; }
  .page-wrapper { display: block; }
  .main-content { max-width: none; padding: 1rem 0; }
  .course-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
