:root {
  --ocean-deep: #042C53;
  --ocean-mid: #185FA5;
  --ocean-bright: #378ADD;
  --ocean-light: #E6F1FB;
  --teal-dark: #085041;
  --teal-mid: #1D9E75;
  --teal-light: #E1F5EE;
  --amber-dark: #633806;
  --amber-mid: #BA7517;
  --amber-light: #FAEEDA;
  --purple-dark: #26215C;
  --purple-mid: #534AB7;
  --purple-light: #EEEDFE;
  --coral-dark: #4A1B0C;
  --coral-mid: #993C1D;
  --coral-light: #FAECE7;
  --text: #1a1a2e;
  --text-muted: #5a5a6e;
  --border: rgba(24,95,165,0.13);
  --bg: #f7f9fc;
  --card: #ffffff;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-thumb { background: rgba(24,95,165,.15); border-radius: 10px; }
nav { background: var(--ocean-deep); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(4,44,83,0.3); }
.nav-brand { color: white; font-size: 14px; font-weight: 600; letter-spacing: .02em; }
.nav-brand span { color: var(--ocean-bright); }
.nav-links { display: flex; gap: 4px; }
.nav-link { color: rgba(255,255,255,.7); background: none; border: none; padding: 6px 14px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all .2s; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.12); }
.nav-link.active { color: var(--ocean-bright); }
.page { display: none; }
.page.active { display: block; }
.hero {
  padding: 5rem 2rem 4rem;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  inset: -30% 0;
  background: url('../cover-image.png') center center / cover no-repeat;
  will-change: transform;
  z-index: -2;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4,44,83,.62) 0%, rgba(4,44,83,.48) 60%, rgba(6,60,70,.55) 100%);
  z-index: -1;
}
.hero-tag { display: inline-block; background: rgba(55,138,221,.25); border: 1px solid rgba(55,138,221,.4); color: #85B7EB; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 20px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(1.6rem,3vw,2.4rem); font-weight: 700; margin-bottom: .5rem; line-height: 1.2; }
.hero p { color: rgba(255,255,255,.7); font-size: 15px; max-width: 560px; margin: 0 auto 1.5rem; }
.hero-meta { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.hero-meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.6); }
.hero-meta-item strong { color: rgba(255,255,255,.9); }
.container { max-width: 900px; margin: 0 auto; padding: 2rem; }
.section-heading { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ocean-mid); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--ocean-light); }
.week-list { display: flex; flex-direction: column; gap: 6px; }
.week-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; transition: box-shadow .2s; }
.week-card:hover { box-shadow: 0 2px 12px rgba(24,95,165,.1); }
.week-card.highlight { border-color: var(--ocean-mid); box-shadow: 0 0 0 2px var(--ocean-light); }
.week-header { display: flex; align-items: center; gap: 1rem; padding: 12px 16px; cursor: pointer; user-select: none; }
.week-badge { min-width: 52px; text-align: center; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: var(--ocean-light); color: var(--ocean-mid); }
.week-badge.current { background: var(--ocean-mid); color: white; }
.week-title { flex: 1; font-size: 14px; font-weight: 500; }
.week-chapter { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.week-chevron { width: 18px; height: 18px; color: var(--text-muted); transition: transform .25s; flex-shrink: 0; }
.week-card.open .week-chevron { transform: rotate(180deg); }
.week-detail { display: none; padding: 12px 16px 14px 80px; font-size: 13px; color: var(--text-muted); line-height: 1.7; border-top: 1px solid var(--border); }
.week-card.open .week-detail { display: block; }
.week-detail ul { list-style: none; }
.week-detail ul li::before { content: '›  '; color: var(--ocean-mid); font-weight: 600; }
.week-detail .lecture-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 14px; background: var(--ocean-mid); color: white; border: none; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s; }
.week-detail .lecture-link:hover { background: var(--ocean-deep); }
.lecture-hero { background: linear-gradient(135deg, #042C53 0%, #0f5a5e 50%, #085041 100%); padding: 3rem 2rem 2.5rem; color: white; }
.lecture-hero .back-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.8); padding: 5px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; margin-bottom: 1.5rem; transition: all .2s; }
.lecture-hero .back-btn:hover { background: rgba(255,255,255,.18); color: white; }
.lecture-hero .week-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-mid); margin-bottom: .5rem; }
.lecture-hero h1 { font-size: clamp(1.3rem,3vw,1.9rem); font-weight: 700; line-height: 1.2; margin-bottom: .75rem; }
.lecture-hero .subtitle { color: rgba(255,255,255,.65); font-size: 14px; max-width: 560px; margin-bottom: 1.5rem; }
.lecture-meta-row { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.lmeta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: rgba(255,255,255,.55); }
.lmeta strong { color: rgba(255,255,255,.85); }
.section-tabs { background: var(--card); border-bottom: 1px solid var(--border); padding: 0 2rem; display: flex; gap: 0; overflow-x: auto; position: sticky; top: 56px; z-index: 90; }
.stab { padding: 14px 18px; font-size: 13px; font-weight: 500; color: var(--text-muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; transition: all .2s; background: none; border-top: none; border-left: none; border-right: none; }
.stab:hover { color: var(--ocean-mid); }
.stab.active { color: var(--ocean-mid); border-bottom-color: var(--ocean-mid); }
.lecture-section { display: none; }
.lecture-section.active { display: block; }
.story-container { max-width: 860px; margin: 0 auto; padding: 2rem; }
.story-intro { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; }
.story-intro h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; color: var(--ocean-deep); }
.story-intro p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.viz-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 1.5rem; }
.viz-card-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.viz-card-header h3 { font-size: 14px; font-weight: 600; }
.viz-card-header .badge { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 5px; }
.badge-live { background: #dcfce7; color: #166534; }
.badge-tool { background: var(--ocean-light); color: var(--ocean-mid); }
.badge-activity { background: var(--purple-light); color: var(--purple-mid); }
.badge-video { background: var(--amber-light); color: var(--amber-dark); }
.badge-slides { background: #FAECE7; color: #993C1D; }
.viz-body { padding: 1.5rem; }
.resource-rail { display: flex; flex-direction: column; gap: 10px; }
.yt-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #0f0f0f; position: relative; cursor: pointer; }
.yt-thumb-wrap { position: relative; aspect-ratio: 16/9; background: #111; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.yt-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.yt-card:hover .yt-thumb-wrap img { transform: scale(1.03); }
.yt-play-btn { position: absolute; width: 56px; height: 40px; background: rgba(255,0,0,.92); border-radius: 10px; display: flex; align-items: center; justify-content: center; transition: transform .2s, background .2s; }
.yt-card:hover .yt-play-btn { background: #ff0000; transform: scale(1.08); }
.yt-play-btn svg { width: 18px; height: 18px; fill: white; margin-left: 2px; }
.yt-meta { padding: 12px 14px; background: #0f0f0f; }
.yt-meta .yt-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #EF4444; margin-bottom: 4px; }
.yt-meta .yt-title { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.92); line-height: 1.4; margin-bottom: 2px; }
.yt-meta .yt-sub { font-size: 11px; color: rgba(255,255,255,.45); }
.yt-iframe-wrap { display: none; aspect-ratio: 16/9; }
.yt-iframe-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.yt-card.playing .yt-thumb-wrap { display: none; }
.yt-card.playing .yt-iframe-wrap { display: block; }
.tool-card { border-radius: 12px; border: 1px solid var(--border); background: var(--card); overflow: hidden; transition: box-shadow .2s, transform .15s; display: flex; align-items: stretch; }
.tool-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); transform: translateY(-1px); }
.tool-card-accent { width: 6px; flex-shrink: 0; }
.tool-card-body { padding: 1rem 1.25rem; flex: 1; }
.tool-card-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; }
.tool-card-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.3; }
.tool-card-type { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; white-space: nowrap; flex-shrink: 0; margin-top: 1px; }
.tool-card-desc { font-size: 12px; color: var(--text-muted); line-height: 1.55; margin-bottom: .75rem; }
.tool-card-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; text-decoration: none; padding: 5px 12px; border-radius: 6px; transition: all .2s; }
.tool-card-link svg { width: 12px; height: 12px; flex-shrink: 0; }
.canva-card { border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: var(--card); }
.canva-card-header { padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: linear-gradient(90deg,#FAECE7,#FAEEDA); }
.canva-card-header span { font-size: 12px; font-weight: 600; color: var(--coral-dark); display: flex; align-items: center; gap: 6px; }
.canva-embed-area { aspect-ratio: 16/9; background: #f0f0f0; display: flex; align-items: center; justify-content: center; position: relative; }
.canva-embed-area iframe { width: 100%; height: 100%; border: none; display: block; }
.canva-placeholder { text-align: center; padding: 2.5rem; }
.canva-placeholder .canva-icon { font-size: 2.5rem; margin-bottom: .75rem; display: block; }
.canva-placeholder p { font-size: 13px; color: var(--text-muted); max-width: 360px; margin: .5rem auto 1.25rem; line-height: 1.6; }
.canva-open-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; background: var(--coral-mid); color: white; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: background .2s; }
.canva-open-btn:hover { background: var(--coral-dark); }
.enso-toggle { display: flex; gap: 8px; margin-bottom: 1rem; flex-wrap: wrap; }
.etbtn { padding: 5px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--bg); font-size: 12px; cursor: pointer; font-weight: 500; transition: all .2s; }
.etbtn.active-la { background: var(--ocean-mid); color: white; border-color: var(--ocean-mid); }
.etbtn.active-el { background: #E24B4A; color: white; border-color: #E24B4A; }
.etbtn.active-now { background: var(--teal-mid); color: white; border-color: var(--teal-mid); }
canvas#ensoChart, canvas#ifcbChart { width: 100%; border-radius: 8px; }
.activity-box { background: var(--purple-light); border: 1px solid rgba(83,74,183,.25); border-radius: 10px; padding: 1.25rem; margin-top: 1rem; }
.activity-box .act-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--purple-mid); margin-bottom: .5rem; }
.activity-box p { font-size: 14px; color: var(--purple-dark); line-height: 1.65; }
.activity-box .hypothesis-input { width: 100%; margin-top: .75rem; padding: 10px 12px; border: 1px solid rgba(83,74,183,.3); border-radius: 8px; background: white; font-size: 13px; font-family: inherit; resize: vertical; min-height: 72px; color: var(--text); }
.activity-box .submit-btn { margin-top: 8px; padding: 7px 18px; background: var(--purple-mid); color: white; border: none; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .2s; }
.activity-box .submit-btn:hover { background: var(--purple-dark); }
.hypothesis-feedback { display: none; margin-top: 10px; padding: 10px 14px; background: white; border-radius: 8px; border-left: 3px solid var(--purple-mid); font-size: 13px; line-height: 1.6; color: var(--text); }
.key-concept { background: var(--ocean-deep); color: rgba(255,255,255,.9); border-radius: 10px; padding: 1rem 1.5rem; font-size: 14px; margin: 1rem 0; line-height: 1.6; }
.key-concept strong { color: var(--ocean-bright); }
.wildfire-box { background: linear-gradient(135deg,#1a0a00,#2d1200); border-radius: 12px; padding: 1.5rem; color: rgba(255,255,255,.85); font-size: 14px; margin-top: 1rem; border: 1px solid rgba(239,159,39,.3); }
.wildfire-box .wf-label { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #EF9F27; margin-bottom: .5rem; }
.wildfire-box h3 { font-size: 15px; font-weight: 600; margin-bottom: .75rem; color: white; }
.wildfire-box p { line-height: 1.7; color: rgba(255,255,255,.75); }
.wf-status { display: inline-block; margin-top: .75rem; background: rgba(239,159,39,.2); border: 1px solid rgba(239,159,39,.4); color: #FAC775; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.cdr-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: .75rem; margin-top: 1rem; }
.cdr-card { border-radius: 10px; padding: 1rem; font-size: 13px; }
.cdr-card h4 { font-weight: 600; font-size: 13px; margin-bottom: .25rem; }
.cdr-card p { font-size: 12px; line-height: 1.5; opacity: .85; }
.cdr-card.iron { background: var(--amber-light); color: var(--amber-dark); }
.cdr-card.alk { background: var(--teal-light); color: var(--teal-dark); }
.cdr-card.kelp { background: #EAF3DE; color: #173404; }
.cdr-card.emit { background: #FCEBEB; color: #501313; }
.nbs-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.nbs-eco { border-radius: 10px; padding: 1rem; text-align: center; font-size: 13px; }
.nbs-eco .eco-icon { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.nbs-eco h4 { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.nbs-eco p { font-size: 11px; opacity: .8; }
.nbs-eco.coral { background: #FAECE7; color: #4A1B0C; }
.nbs-eco.mangrove { background: var(--teal-light); color: var(--teal-dark); }
.nbs-eco.marsh { background: #EAF3DE; color: #173404; }
.nbs-eco.oyster { background: var(--amber-light); color: var(--amber-dark); }
.resource-section-label { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); margin: 1.25rem 0 .6rem; display: flex; align-items: center; gap: 8px; }
.resource-section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
@media (max-width: 820px) {
  .hero { padding: 3rem 1.25rem 2rem; }
  .container, .story-container { padding: 1.5rem; }
  .lecture-hero, .section-tabs { padding-left: 1.25rem; padding-right: 1.25rem; }
  .viz-card-header, .viz-body { padding-left: 1.25rem; padding-right: 1.25rem; }
  .week-header { flex-wrap: wrap; gap: .85rem; }
}

/* Lecture 13 summary styles */
.lecture-at-a-glance {
  background:#2c4a6e;
  color:white;
  border-radius:6px;
  padding:14px 18px;
  margin-bottom:20px;
}
.lecture-at-a-glance .header {
  font-size:0.85rem;
  font-weight:700;
  letter-spacing:0.06em;
  text-transform:uppercase;
  margin-bottom:10px;
}
.lecture-at-a-glance .parts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lecture-at-a-glance .part-title {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: #378ADD;
}
.lecture-at-a-glance .part-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 24px;
  font-size: 0.75rem;
  line-height: 1.6;
}
.summary-table h2 {
  font-size: 1.1rem;
  color: #3b3b3b;
  margin-bottom: 14px;
  font-weight: normal;
  letter-spacing: 0.02em;
}
.summary-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.summary-table thead tr {
  background: #2c4a6e;
  color: white;
}
.summary-table thead th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  text-transform: uppercase;
}
.summary-table tbody tr {
  border-bottom: 1px solid #ddd;
}
.summary-table tbody tr:nth-child(odd) {
  background: #fff;
}
.summary-table tbody tr:nth-child(even) {
  background: #f0f4f8;
}
.summary-table td {
  padding: 9px 12px;
  vertical-align: top;
  line-height: 1.5;
}
.summary-table .topic {
  font-weight: 700;
  color: #2c4a6e;
}
.summary-table .part-header td {
  background: #e8edf3 !important;
  color: #2c4a6e;
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-top: 2px solid #2c4a6e;
}
.summary-table a {
  color: #1a6644;
  text-decoration: none;
}
.summary-table a:hover {
  text-decoration: underline;
}
