/* ============================================
   Future Course Template System - Version 2.1.1
   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,
.inpage-nav a.is-active,
.inpage-nav a[aria-current="true"] {
  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;
}

.knowledge-reset {
  margin-top: 0.5rem;
}

.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);
}

/* ============================================
   D2L CONFLICT GUARD
   Brightspace templates style broad selectors like
   body:not(.template-fallback) h1 and a. These scoped
   rules keep the UMA template stable without editing D2L CSS.
   ============================================ */

.uma-course-template {
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
}

.uma-course-template,
.uma-course-template *,
.uma-course-template *::before,
.uma-course-template *::after {
  box-sizing: border-box;
}

.uma-course-template.uma-course-template h1,
.uma-course-template.uma-course-template h2,
.uma-course-template.uma-course-template h3,
.uma-course-template.uma-course-template h4 {
  margin: 0 0 var(--space-sm);
  margin-block: 0 var(--space-sm);
  color: var(--color-navy);
  font-family: var(--font-body);
  font-weight: 700;
  font-style: normal;
  line-height: 1.25;
}

.uma-course-template.uma-course-template h1 {
  font-family: var(--font-hero);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  margin-block-end: 0.75rem;
}

.uma-course-template.uma-course-template h2 {
  color: var(--color-blue);
  font-size: 1.6rem;
  margin-bottom: 0.375rem;
  margin-block-end: 0.375rem;
}

.uma-course-template.uma-course-template h3 {
  font-size: 1.1rem;
}

.uma-course-template.uma-course-template h4 {
  font-size: 1rem;
}

.uma-course-template.uma-course-template h1::after,
.uma-course-template.uma-course-template h2::after,
.uma-course-template.uma-course-template h3::after,
.uma-course-template.uma-course-template h4::after {
  content: none !important;
  display: none !important;
}

.uma-course-template.uma-course-template a {
  color: var(--color-blue);
  border-block-end: 0;
  font-weight: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.uma-course-template.uma-course-template a:hover,
.uma-course-template.uma-course-template a:focus,
.uma-course-template.uma-course-template a:active {
  color: var(--color-navy);
  border-block-end: 0;
}

.uma-course-template.uma-course-template .course-header {
  color: #ffffff;
}

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

.uma-course-template.uma-course-template .course-label {
  color: rgba(255, 255, 255, 0.72);
}

.uma-course-template.uma-course-template .course-meta li {
  color: #ffffff;
}

.uma-course-template.uma-course-template .section-header h2 {
  margin-bottom: 0;
  margin-block-end: 0;
}

.uma-course-template.uma-course-template .inpage-nav a,
.uma-course-template.uma-course-template .sidebar-nav a,
.uma-course-template.uma-course-template .resource-list a,
.uma-course-template.uma-course-template .btn,
.uma-course-template.uma-course-template .footer-nav a,
.uma-course-template.uma-course-template .media-transcript a {
  border-block-end: 0;
  text-decoration: none;
}

.uma-course-template.uma-course-template .inpage-nav a,
.uma-course-template.uma-course-template .resource-list a,
.uma-course-template.uma-course-template .btn,
.uma-course-template.uma-course-template .media-transcript a {
  font-weight: 700;
}

.uma-course-template.uma-course-template .btn,
.uma-course-template.uma-course-template .btn:hover,
.uma-course-template.uma-course-template .btn:focus,
.uma-course-template.uma-course-template .btn:active {
  border-block-end: 2px solid transparent;
}

.uma-course-template.uma-course-template .btn-outline,
.uma-course-template.uma-course-template .btn-outline:hover,
.uma-course-template.uma-course-template .btn-outline:focus,
.uma-course-template.uma-course-template .btn-outline:active {
  border-block-end: 2px solid var(--color-blue);
}

.uma-course-template.uma-course-template .btn-primary,
.uma-course-template.uma-course-template .btn-primary:hover,
.uma-course-template.uma-course-template .btn-primary:focus,
.uma-course-template.uma-course-template .btn-primary:active {
  color: var(--color-navy);
}

.uma-course-template.uma-course-component {
  display: block;
}

/* ============================================
   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;
  }

  .uma-course-template.uma-course-template h2 {
    font-size: 1.4rem;
  }

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

  .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;
  }

  .uma-course-template.uma-course-template 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;
  }
}
