/* ============================================================
   MASTER STYLESHEET – LAZILY EFFICIENT IB ENGLISH
   CONSOLIDATED FROM ALL 26 HTML FILES – 100% COMPLETE
   ============================================================ */

/* ----- Google Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Montserrat:wght@400;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #1E2E3E;
  --bg-light: #F4F2EE;
  --text-primary: #FDFCF9;
  --text-dark: #1A1A1A;
  --text-secondary: #B6BCC4;
  --text-muted: #999999;
  --accent: #CC0000;
  --accent-hover: #A00000;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;
  --max-width: 1200px;
  --thumb-height: 260px;
  --small-thumb-height: 150px;
  --cream: #F8F6F0;
  --cream-dark: #F0EDE5;
}

/* ----- Body (Dark Theme – default) ----- */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
}
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}
h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent);
  margin: 0.5rem 0 0;
  border-radius: 2px;
}
h2 {
  font-size: 1.8rem;
  margin-bottom: var(--spacing-sm);
  color: var(--accent);
}
h3 {
  font-size: 1.3rem;
}
h4 {
  font-size: 1rem;
  color: var(--accent);
}
p {
  margin-bottom: var(--spacing-sm);
  position: relative;
  z-index: 1;
}
a {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
a:hover {
  border-bottom-color: var(--accent);
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.text-secondary {
  color: var(--text-secondary);
}
.text-accent {
  color: var(--accent);
}
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.btn-primary {
  background: linear-gradient(135deg, #CC0000 0%, #A00000 100%);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: #A00000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.btn-download {
  background: linear-gradient(135deg, #CC0000 0%, #A00000 100%);
  color: #FFFFFF;
}
.btn-download:hover {
  background: #A00000;
  transform: translateY(-2px);
}
.btn-watch {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.btn-watch:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(253,252,249,0.2);
}
.btn-secondary:hover {
  background: rgba(253,252,249,0.05);
  border-color: rgba(253,252,249,0.3);
  transform: translateY(-2px);
}
.btn-success {
  background: #2E7D32;
  color: #FFFFFF;
}
.btn-success:hover {
  background: #1B5E20;
  transform: translateY(-2px);
}
.btn-warning {
  background: #F57F17;
  color: #FFFFFF;
}
.btn-warning:hover {
  background: #E65100;
  transform: translateY(-2px);
}
.btn-link {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  display: inline-block;
}
.btn-large {
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
}
.btn-youtube {
  background: transparent;
  border: 2px solid #FF0000;
  color: #FF0000;
  box-shadow: none;
}
.btn-youtube:hover {
  background: #FF0000;
  color: #FFFFFF;
  transform: translateY(-2px);
}
.btn-group {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* ============================================================
   CONTAINER & SECTIONS
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
  position: relative;
  z-index: 1;
}
.content-section {
  margin-bottom: var(--spacing-xl);
}
.section-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 800px;
  margin-bottom: var(--spacing-lg);
}
.section-title {
  margin-bottom: var(--spacing-lg);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  background-color: var(--bg-primary);
  border-bottom: 1px solid rgba(253,252,249,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-sm) var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.nav-logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  border-bottom: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo:hover {
  border-bottom: none;
  color: var(--accent);
}
.nav-logo-img {
  height: 32px;
  width: auto;
}
.nav-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
  flex-wrap: wrap;
}
.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.nav-links a.active {
  border-bottom: 2px solid var(--accent);
}

/* ============================================================
   SCROLLABLE ACTIVITY ROW
   ============================================================ */
.activity-scroll-section {
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(253,252,249,0.05);
  padding: var(--spacing-sm) 0;
  position: relative;
  z-index: 5;
}
.activity-scroll-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.activity-scroll-header h2 {
  font-size: 1.2rem;
  margin: 0;
  color: var(--text-primary);
  text-align: left;
  font-weight: 700;
}
.activity-scroll-header a {
  font-size: 0.8rem;
  color: var(--accent);
  border-bottom: none;
  font-weight: 600;
}
.scroll-container {
  overflow-x: auto;
  display: flex;
  gap: 1rem;
  padding: 0.5rem var(--spacing-md);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(255,255,255,0.05);
}
.scroll-container::-webkit-scrollbar { height: 6px; }
.scroll-container::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.scroll-container::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.activity-card-scroll {
  flex: 0 0 auto;
  width: 200px;
  scroll-snap-align: start;
  background: linear-gradient(135deg, rgba(253,252,249,0.04) 0%, rgba(253,252,249,0.01) 100%);
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
}
.activity-card-scroll:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  border-color: var(--accent);
}
.card-image-scroll {
  width: 100%;
  height: 130px;
  overflow: hidden;
  position: relative;
}
.card-image-scroll img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.session-badge-scroll {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.card-content-scroll {
  padding: 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.card-content-scroll h3 {
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
}
.card-content-scroll .activity-desc {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  flex-grow: 1;
}
.card-content-scroll .btn {
  padding: 0.3rem 0.7rem;
  font-size: 0.7rem;
}

/* ============================================================
   CORE PILLARS & ASSESSMENT CARDS (index.html)
   ============================================================ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}
.pillar-card {
  background: linear-gradient(135deg, rgba(253,252,249,0.04) 0%, rgba(253,252,249,0.01) 100%);
  border: 1px solid rgba(253,252,249,0.1);
  border-radius: 12px;
  padding: var(--spacing-lg);
  text-align: center;
  transition: all 0.2s;
}
.pillar-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.pillar-icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}
.pillar-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}
.pillar-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.assessment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
}
.assessment-card {
  background: linear-gradient(135deg, rgba(253,252,249,0.04) 0%, rgba(253,252,249,0.01) 100%);
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 8px;
  padding: var(--spacing-lg);
  text-align: center;
  transition: all 0.2s;
}
.assessment-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.assessment-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}
.assessment-card h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}
.assessment-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

/* ============================================================
   YOUTUBE VIDEO CARD (index.html)
   ============================================================ */
.yt-video-card {
  display: inline-flex;
  flex-direction: column;
  background: linear-gradient(135deg, rgba(253,252,249,0.04), rgba(253,252,249,0.01));
  border: 1px solid rgba(253,252,249,0.1);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  max-width: 360px;
  margin: 0 auto;
  transition: transform 0.2s, border-color 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.yt-video-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.yt-video-card .thumb-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: #000;
}
.yt-video-card .thumb-wrap img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.yt-video-card .play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  border: 2px solid #fff;
  transition: background 0.2s;
}
.yt-video-card:hover .play-overlay {
  background: var(--accent);
}
.yt-video-card .card-text {
  padding: 1rem;
  text-align: center;
}
.yt-video-card .card-text h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}
.yt-video-card .card-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* ============================================================
   SIDE NAVIGATION
   ============================================================ */
.side-nav {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30,46,62,0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(253,252,249,0.15);
  border-radius: 8px;
  padding: 0.8rem 0.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 110px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.side-nav a {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border-bottom: none;
  transition: all 0.2s ease;
}
.side-nav a:hover {
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
}
.side-nav a.active-section {
  background: var(--accent);
  color: #FFFFFF;
}
.side-nav-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.6rem;
  font-weight: 700;
  color: #B6BCC4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.3rem;
}
.side-nav .sub-link {
  padding-left: 0.8rem;
  font-size: 0.5rem;
  opacity: 0.9;
}
/* Poster page side nav variants */
.side-nav-process-btn {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: #FFFFFF;
  background: #A00000;
  padding: 0.35rem 0.4rem;
  border-radius: 4px;
  border-bottom: none;
  transition: all 0.2s ease;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}
.side-nav-process-btn:hover {
  background: #800000;
  color: #FFFFFF;
}
.side-nav-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.55rem;
  font-weight: 700;
  color: #B6BCC4;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.1rem;
}
.jump-link {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: #FDFCF9;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border-bottom: none;
  transition: all 0.2s ease;
  text-decoration: none;
  background: rgba(255,255,255,0.05);
}
.jump-link:hover {
  background: #A00000;
  color: #FFFFFF;
}
.jump-link.active-section {
  background: #A00000;
  color: #FFFFFF;
}

/* ============================================================
   CRITERION / RESOURCE CARDS
   ============================================================ */
.criterion-group {
  margin-bottom: var(--spacing-md);
  padding-left: var(--spacing-sm);
  border-left: 3px solid var(--accent);
  scroll-margin-top: 80px;
}
.resource-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-md);
}
.small-card {
  background: linear-gradient(135deg, rgba(253,252,249,0.04) 0%, rgba(253,252,249,0.01) 100%);
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 4px;
  padding: var(--spacing-sm);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.small-card:hover {
  border-color: rgba(253,252,249,0.2);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.small-thumb {
  width: 100%;
  height: var(--small-thumb-height);
  overflow: hidden;
  cursor: pointer;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  margin-bottom: var(--spacing-sm);
}
.small-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  transition: transform 0.1s ease;
}
.small-thumb:hover img {
  transform: scale(2.2);
}
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.card-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: auto;
  flex-grow: 1;
}

/* ============================================================
   TEEAL CARDS
   ============================================================ */
.teeal-card {
  background: linear-gradient(135deg, rgba(253,252,249,0.06) 0%, rgba(253,252,249,0.02) 100%);
  border: 1px solid rgba(253,252,249,0.1);
  border-radius: 6px;
  padding: var(--spacing-md);
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  align-items: center;
  transition: all 0.2s ease;
}
.teeal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.teeal-thumb {
  width: 300px;
  height: var(--thumb-height);
  overflow: hidden;
  cursor: pointer;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  flex-shrink: 0;
}
.teeal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  transition: transform 0.1s ease;
}
.teeal-thumb:hover img {
  transform: scale(2.2);
}
.teeal-info {
  flex: 1;
  min-width: 200px;
}

.video-thumb {
  width: 300px;
  height: var(--thumb-height);
  overflow: hidden;
  cursor: pointer;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
  flex-shrink: 0;
  position: relative;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-thumb .play-overlay-large {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px;
  border: 3px solid white;
  pointer-events: none;
}
.video-thumb:hover .play-overlay-large {
  background: var(--accent);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.show {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}
#lightbox-download {
  margin-top: 1.5rem;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  display: none;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
}
#back-to-top.show {
  opacity: 1;
  visibility: visible;
}
#back-to-top:hover {
  background: #A00000;
  transform: translateY(-2px);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(253,252,249,0.1);
  padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md) var(--spacing-md);
  margin-top: var(--spacing-xl);
  position: relative;
  z-index: 1;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}
.footer-col h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  color: var(--accent);
}
.footer-col a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  border-bottom: none;
}
.footer-col a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(253,252,249,0.08);
}

.signup-box {
  background: rgba(253,252,249,0.03);
  border: 1px solid rgba(253,252,249,0.08);
  padding: var(--spacing-md);
  border-radius: 4px;
  text-align: center;
  max-width: 400px;
  margin: var(--spacing-lg) auto;
}
.signup-box input {
  width: 100%;
  padding: 0.6rem;
  background: rgba(253,252,249,0.05);
  border: 1px solid rgba(253,252,249,0.15);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  margin-bottom: var(--spacing-sm);
}
.signup-box input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============================================================
   LIGHT MODE – for activity pages (body.light-mode)
   ============================================================ */
body.light-mode {
  background-color: var(--bg-light);
  color: var(--text-dark);
}
body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode p,
body.light-mode .article-text,
body.light-mode .article-col,
body.light-mode .editable-cell,
body.light-mode .standfirst,
body.light-mode .byline,
body.light-mode .exercise-table,
body.light-mode .band-table,
body.light-mode .tree-box,
body.light-mode .annotation-box,
body.light-mode .feedback-box,
body.light-mode .resource-label,
body.light-mode .resource-hover-card,
body.light-mode .resource-link,
body.light-mode .mini-accordion-header,
body.light-mode .section-heading,
body.light-mode .article-col h1,
body.light-mode .resource-pills-row .pills-label,
body.light-mode .usage-guide,
body.light-mode .main-tabs,
body.light-mode .main-tab-btn {
  color: var(--text-dark);
}
body.light-mode .main-container {
  background: #FFFFFF;
}
body.light-mode .usage-guide {
  background: #F0EBE0;
}
body.light-mode .main-tabs {
  background: #F0EBE0;
}
body.light-mode .main-tab-btn {
  background: #F0EBE0;
}
body.light-mode .main-tab-btn.active {
  background: var(--accent-hover);
  color: #FFF;
}
body.light-mode .exercise-section {
  background: #F9F7F3;
}
body.light-mode .mini-accordion-header {
  background: #F2EFE9;
}
body.light-mode .feedback-box {
  background: #FDF9F0;
}
body.light-mode .resource-pills-row .pills-label {
  color: #1E2E3E;
}
body.light-mode .section-heading {
  color: var(--accent-hover);
}
body.light-mode .article-col h1 {
  color: #1E2E3E;
}
body.light-mode .editable-cell {
  background: #FEFDF9;
  border: 1px solid #DDD;
  color: #1A1A1A;
}
body.light-mode .editable-cell:focus {
  background: #FFF;
  box-shadow: 0 0 0 2px var(--accent-hover);
}
body.light-mode .band-table th {
  background: #1E2E3E;
  color: #FDFCF9;
}
body.light-mode .band-table td:first-child {
  background: #F5F2EB;
}
body.light-mode .tree-box {
  background: #FFF;
}
body.light-mode .tree-pact-box {
  background: #FFF3CD;
}
body.light-mode .annotation-box {
  background: #FFF3CD;
  color: #1A1A1A;
}
body.light-mode .annotation-popup {
  background: #FFFFFF;
  color: #1A1A1A;
}
body.light-mode .resource-label {
  color: var(--accent-hover);
}
body.light-mode .resource-hover-card {
  background: rgba(160,0,0,0.08);
  border: 1px solid rgba(160,0,0,0.3);
  color: var(--accent-hover);
}
body.light-mode .resource-link {
  background: #F5F2EB;
  border: 1px solid var(--accent-hover);
  color: var(--accent-hover);
}
body.light-mode .resource-link:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
}
body.light-mode .exercise-table {
  background: #FFFFFF;
  border: 1px solid #DDD;
}
body.light-mode .exercise-table thead {
  background: #1E2E3E;
  color: #FDFCF9;
}
body.light-mode .exercise-table td {
  border-bottom: 1px solid #E8E5DF;
}
body.light-mode .label-cell {
  background: #F5F2EB;
}
body.light-mode .article-col {
  background: #FEFEFE;
}
body.light-mode .standfirst {
  color: #555;
}
body.light-mode .byline {
  color: #777;
}
body.light-mode .news-image figcaption {
  color: #777;
}
body.light-mode .footnote {
  background: #FDF9F0;
  color: #1E2E3E;
}
body.light-mode .reference {
  color: #666;
}
body.light-mode .ib-header {
  background: #F5F2EB;
  color: #1E2E3E;
}
body.light-mode .guiding-question {
  background: #F5F2EB;
  color: #1E2E3E;
}
body.light-mode .annotation-sidebar {
  background: #FDF9F0;
  border: 1px solid #D9D2C3;
}
body.light-mode .annotation-sidebar h4 {
  background: #FDF9F0;
}
body.light-mode .anno-number {
  color: #8B0000;
}
body.light-mode .anno-label {
  color: #006D77;
}
body.light-mode .input-group label {
  color: var(--accent-hover);
}
body.light-mode .input-group input {
  border: 1px solid #CCCCCC;
  background: #FFFFFF;
  color: #1E2E3E;
}
body.light-mode .model-answer {
  background: #E8F5E9;
  color: #1E2E3E;
}
body.light-mode .cloze-input {
  border: 2px solid var(--accent-hover);
  background: #FFFFFF;
  color: #1E2E3E;
}
body.light-mode .cloze-input:focus {
  border-color: #2C3A2F;
  background: #FFF9F0;
}
body.light-mode .cloze-input.revealed {
  background: #FFD966;
}
body.light-mode .cloze-input.correct {
  background: #A5D6A7;
}
body.light-mode .cloze-input.incorrect {
  background: #EF9A9A;
}
body.light-mode .dice-input {
  border: 2px dashed var(--accent-hover);
  background: #FFF9F0;
  color: #1E2E3E;
}
body.light-mode .dice-input:focus {
  border-color: var(--accent-hover);
  background: #FFFFFF;
}
body.light-mode .dice-input.revealed {
  background: #FFD966;
}
body.light-mode .resource-preview {
  background: #1E2E3E;
}
body.light-mode .resource-preview small {
  color: #B6BCC4;
}
body.light-mode .tree-connector::before {
  background: var(--accent-hover);
}
body.light-mode .tree-connector span {
  color: var(--accent-hover);
}
body.light-mode .cycle-btn {
  background: #1E2E3E;
  color: #FFF;
}
body.light-mode .cycle-btn:hover {
  background: var(--accent-hover);
}
body.light-mode .ai-overlay p {
  color: #FFF;
}
body.light-mode .ai-spinner {
  border-top: 6px solid var(--accent-hover);
}
body.light-mode .score-button {
  animation: pulse 2s infinite;
}
body.light-mode .band-table tr.highlight {
  background: #FFD966;
}
body.light-mode .band-table td:first-child {
  background: #F5F2EB;
}
body.light-mode .annotation-popup .reveal-btn-small {
  background: #1E2E3E;
  color: #FDFCF9;
}
body.light-mode .annotation-popup .reveal-btn-small:hover {
  background: var(--accent-hover);
}
/* ----- PROGRESS TRACKER (Light Mode) ----- */
body.light-mode .progress-tracker {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .progress-tracker .label {
  color: #1E2E3E;
}
body.light-mode .progress-tracker .bar-wrap {
  background: rgba(0,0,0,0.1);
}
body.light-mode .progress-tracker .bar-fill {
  background: #CC0000;
}
body.light-mode .progress-tracker .count {
  color: #1E2E3E;
}
body.light-mode .progress-tracker .count strong {
  color: #1E2E3E;
}
body.light-mode .progress-tracker .reset-btn {
  border: 1px solid rgba(0,0,0,0.15);
  color: #1E2E3E;
}
body.light-mode .progress-tracker .reset-btn:hover {
  background: rgba(204,0,0,0.1);
  border-color: #CC0000;
}

/* ----- TEXT CARDS (Light Mode) ----- */
body.light-mode .text-card {
  background: #FFFFFF;
  border: 1px solid #D9D2C3;
}
body.light-mode .text-card .card-title {
  color: #1E2E3E;
}
body.light-mode .text-card .card-desc {
  color: #555;
}
body.light-mode .text-card .btn {
  background: linear-gradient(135deg, #CC0000 0%, #A00000 100%);
  color: #FFFFFF;
}
body.light-mode .text-card .btn:hover {
  background: #A00000;
}
body.light-mode .text-card .checkbox-wrap {
  border-top: 1px solid #E6E2D9;
}
body.light-mode .text-card .checkbox-wrap label {
  color: #1E2E3E;
}
body.light-mode .text-card .checkbox-wrap label:hover {
  color: #1E2E3E;
}

/* ----- GRID CONTAINER (Light Mode) ----- */
body.light-mode .grid-container {
  background: #F4F2EE;
}

/* ----- RELATED RESOURCES (Light Mode) ----- */
body.light-mode .related-resources {
  background: #F4F2EE;
}
body.light-mode .related-resources h2 {
  color: #1E2E3E;
}
body.light-mode .related-resources .links a {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.08);
  color: #1E2E3E;
}
body.light-mode .related-resources .links a:hover {
  background: #CC0000;
  color: #FFFFFF;
  border-color: #CC0000;
}

/* ----- FAQ SECTION (Light Mode) ----- */
body.light-mode .faq-section {
  border-top: 1px solid #D9D2C3;
}
body.light-mode .faq-section h2 {
  color: #1E2E3E;
}
body.light-mode .faq-section .faq-item {
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
}
body.light-mode .faq-section .faq-item h3 {
  color: #1E2E3E;
}
body.light-mode .faq-section .faq-item p {
  color: #555;
}
/* Override light-mode to match original (dark containers on light body) */
body.light-mode .main-container {
    background: #1A2A3A !important;
}

body.light-mode .text-card {
    background: #1E2E3E !important;
    border-color: rgba(255,255,255,0.08) !important;
}

body.light-mode .text-card .card-title {
    color: #FDFCF9 !important;
}

body.light-mode .text-card .card-desc {
    color: #B6BCC4 !important;
}

body.light-mode .text-card .checkbox-wrap label {
    color: #B6BCC4 !important;
}

body.light-mode .text-card .checkbox-wrap label:hover {
    color: #FDFCF9 !important;
}

body.light-mode .progress-tracker .label,
body.light-mode .progress-tracker .count,
body.light-mode .progress-tracker .reset-btn {
    color: #B6BCC4 !important;
}

body.light-mode .progress-tracker .label strong,
body.light-mode .progress-tracker .count strong {
    color: #FDFCF9 !important;
}

body.light-mode .related-resources h2 {
    color: #FDFCF9 !important;
}

body.light-mode .related-resources .links a {
    color: #B6BCC4 !important;
}

body.light-mode .related-resources .links a:hover {
    background: #CC0000 !important;
    color: #FDFCF9 !important;
    border-color: #CC0000 !important;
}

body.light-mode .process-bar {
    color: #B6BCC4 !important;
    border-bottom: 1px solid rgba(253,252,249,0.04) !important;
}

body.light-mode .process-bar span {
    color: #FDFCF9 !important;
}

body.light-mode .process-bar .free-tag {
    color: #CC0000 !important;
}
/* ============================================================
   ACTIVITY PAGE – SPECIFIC COMPONENTS
   (used in M21, M22, M23, M24, N21, N22 activities)
   ============================================================ */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  background: #FFFFFF;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  position: relative;
}
.page-header {
  background: linear-gradient(135deg, #1E2E3E 0%, #253544 100%);
  color: #FDFCF9;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
}
.page-header .header-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  margin-bottom: 0.8rem;
}
.page-header .header-logo-img {
  height: 2.4rem;
  width: auto;
}
.page-header .site-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #FDFCF9;
}
.page-header .paper-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #FDFCF9;
}
.page-header .lab-subtitle {
  font-size: 1rem;
  color: #B6BCC4;
  margin-top: 0.2rem;
}
.usage-guide {
  background: #F0EBE0;
  padding: 1rem 2rem;
  border-bottom: 1px solid #D9D2C3;
  font-size: 0.9rem;
  color: #1E2E3E;
  text-align: center;
}

.main-tabs {
  display: flex;
  gap: 0;
  margin: 0;
  background: #F0EBE0;
  position: sticky;
  top: 64px;
  z-index: 50;
  border-bottom: 1px solid #D9D2C3;
}
.main-tab-btn {
  flex: 1;
  padding: 1.2rem 1.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1E2E3E;
  background: #F0EBE0;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
}
.main-tab-btn.active {
  background: #A00000;
  color: #FFF;
}
.main-tab-btn:hover:not(.active) {
  background: #E6DFD0;
}
.main-tab-panel {
  display: none;
  padding: 2rem;
}
.main-tab-panel.active {
  display: block;
}

.section-heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #A00000;
  margin: 1.8rem 0 1rem 0;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid #A00000;
}

.exercise-section {
  margin-bottom: 0.8rem;
  border: none;
  border-radius: 8px;
  background: #F9F7F3;
  overflow: visible;
  transition: box-shadow 0.2s;
}
.exercise-section:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.mini-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 0.7rem 1.2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1E2E3E;
  background: #F2EFE9;
  margin: 0;
  line-height: 1.4;
  border: none;
  transition: background 0.15s;
}
.mini-accordion-header:hover {
  background: #E8E5DD;
}
.mini-accordion-header h3,
.mini-accordion-header h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
  padding: 0;
  color: #1E2E3E;
}
.accordion-arrow {
  font-size: 1rem;
  color: #A00000;
  transition: transform 0.2s;
}
.exercise-section.collapsed .mini-accordion-header {
  border-radius: 8px;
}
.exercise-section.collapsed .accordion-arrow {
  transform: rotate(-90deg);
}
.mini-accordion-body {
  display: block;
  padding: 0.8rem 1.2rem 1rem 1.2rem;
}
.exercise-section.collapsed .mini-accordion-body {
  display: none;
}

.exercise-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem 0;
  font-size: 0.9rem;
  background: #FFFFFF;
  border: 1px solid #DDD;
  border-radius: 4px;
  overflow: hidden;
}
.exercise-table thead {
  background: #1E2E3E;
  color: #FDFCF9;
}
.exercise-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 1px solid #DDD;
}
.exercise-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E8E5DF;
  vertical-align: top;
}
.exercise-table tr:last-child td {
  border-bottom: none;
}
.exercise-table .label-cell {
  font-weight: 600;
  background: #F5F2EB;
  width: 20%;
}

.article-col {
  width: 100%;
  background: #FEFEFE;
  padding: 0 0 1rem 0;
}
.article-col h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1E2E3E;
}
.standfirst {
  font-size: 1.1rem;
  font-style: italic;
  color: #555;
  border-left: 4px solid #A00000;
  padding-left: 1rem;
  margin: 0.5rem 0 1rem 0;
}
.news-image {
  width: 100%;
  margin: 1.5rem 0;
  text-align: center;
}
.news-image img {
  max-width: 700px;
  width: 100%;
  height: auto;
  border-radius: 4px;
}
.byline {
  font-size: 0.9rem;
  color: #777;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #DDD;
  padding-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.article-text p {
  margin-bottom: 1.25rem;
  line-height: 1.55;
  font-size: 1rem;
}

.editable-cell {
  background: #FEFDF9;
  border: 1px solid #DDD;
  color: #1A1A1A;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  cursor: text;
  outline: none;
}
.editable-cell:focus {
  background: #FFF;
  box-shadow: 0 0 0 2px #A00000;
}
.editable-cell:empty:before {
  content: attr(data-placeholder);
  color: #999;
  font-style: italic;
}

.feedback-box {
  padding: 0.8rem 1.2rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  border-top: 3px solid #A00000;
  display: none;
  background: #FDF9F0;
  color: #1E2E3E;
  font-size: 0.9rem;
}

.resource-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
.resource-pills-row .pills-label {
  font-weight: 700;
  font-size: 0.8rem;
  color: #1E2E3E;
  margin-right: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}

.resource-hover-card {
  display: inline-block;
  position: relative;
  background: rgba(160,0,0,0.08);
  border: 1px solid rgba(160,0,0,0.3);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  color: #A00000;
}
.resource-hover-card:hover {
  background: rgba(160,0,0,0.18);
  border-color: #A00000;
  transform: translateY(-1px);
}
.resource-label {
  color: #A00000;
  font-size: 0.8rem;
  white-space: nowrap;
}
.resource-preview {
  position: absolute;
  top: 110%;
  left: 50%;
  transform: translateX(-50%);
  background: #1E2E3E;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 0.6rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 999;
  white-space: nowrap;
}
.resource-hover-card:hover .resource-preview,
.resource-hover-card:focus-within .resource-preview {
  opacity: 1;
  visibility: visible;
}
.preview-item {
  text-align: center;
  max-width: 160px;
}
.preview-item img {
  width: 140px;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
  margin: 0 auto;
}
.preview-item small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: #B6BCC4;
  line-height: 1.2;
  word-wrap: break-word;
  white-space: normal;
}

.resource-link {
  display: inline-block;
  background: #F5F2EB;
  border: 1px solid #A00000;
  color: #A00000;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}
.resource-link:hover {
  background: #A00000;
  color: #FFFFFF;
}
.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* ----- Annotation Boxes (activity pages) ----- */
.annotation-box {
  display: inline;
  position: relative;
  cursor: pointer;
  color: #1A1A1A;
  background: #FFF3CD;
  border-bottom: 2px dotted #A00000;
  padding: 0 2px;
}
.annotation-box:hover {
  background: #FFD966;
}
.annotation-popup {
  display: none;
  position: absolute;
  z-index: 200;
  background: #FFFFFF;
  border: 1px solid #A00000;
  border-radius: 8px;
  padding: 1rem;
  min-width: 320px;
  max-width: 500px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 5px;
}
.annotation-box.active .annotation-popup {
  display: block;
}
.annotation-popup .input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.annotation-popup .input-group label {
  font-weight: 600;
  font-size: 0.8rem;
  color: #A00000;
  min-width: 45px;
}
.annotation-popup .input-group input {
  flex: 1;
  border: 1px solid #CCC;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  background: #FFF;
  color: #1A1A1A;
}
.annotation-popup .input-group .model-answer {
  display: none;
  background: #E8F5E9;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border-left: 4px solid #2E7D32;
  font-size: 0.8rem;
  margin-left: 0.5rem;
  color: #1A1A1A;
}
.annotation-popup .input-group .model-answer.revealed {
  display: inline-block;
}
.annotation-popup .reveal-btn-small {
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: #1E2E3E;
  color: #FDFCF9;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.annotation-popup .reveal-btn-small:hover {
  background: #A00000;
}

/* ----- IDEA Tree ----- */
.idea-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
}
.tree-level {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
}
.tree-box {
  background: #FFF;
  border: 2px solid #A00000;
  border-radius: 8px;
  padding: 1rem;
  min-width: 200px;
  max-width: 350px;
  flex: 1 1 200px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  color: #1E2E3E;
}
.tree-box h5 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #A00000;
  margin-bottom: 0.5rem;
}
.tree-connector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
  position: relative;
}
.tree-connector::before {
  content: '';
  position: absolute;
  top: -1rem;
  left: 50%;
  width: 2px;
  height: 1rem;
  background: #A00000;
}
.tree-connector span {
  display: inline-block;
  font-size: 1.5rem;
  color: #A00000;
}
.tree-node-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 200px;
  min-width: 150px;
  max-width: 350px;
}
.tree-pact-box {
  background: #FFF3CD;
  border: 2px solid #A00000;
  border-radius: 8px;
  padding: 0.8rem;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.tree-pact-box h6 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #A00000;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}
.tree-pact-box .editable-cell {
  min-height: 1.5rem;
  padding: 0.3rem;
  font-size: 0.8rem;
}

/* ----- Band Tables ----- */
.band-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.85rem;
  background: #FFFFFF;
  border: 1px solid #DDD;
}
.band-table th,
.band-table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #DDD;
  vertical-align: top;
}
.band-table th {
  background: #1E2E3E;
  color: #FDFCF9;
  font-weight: 600;
}
.band-table tr.highlight {
  background: #FFD966;
}
.band-table td:first-child {
  font-weight: 700;
  background: #F5F2EB;
}

.cycle-buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.cycle-btn {
  background: #1E2E3E;
  color: #FFF;
  border: none;
  padding: 0.3rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.cycle-btn:hover {
  background: #A00000;
}

/* ----- AI Overlay (activity pages) ----- */
.ai-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.ai-overlay.open {
  display: flex;
}
.ai-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid rgba(255,255,255,0.3);
  border-top: 6px solid #A00000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1.5rem;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.ai-overlay p {
  color: #FFF;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.score-button {
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(160,0,0,0.5); }
  70% { box-shadow: 0 0 0 12px rgba(160,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(160,0,0,0); }
}

/* ----- Cloze & DICE Inputs (activity pages) ----- */
.cloze-input {
  border: 2px solid #A00000;
  background: #FFFFFF;
  padding: 0.1rem 0.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #1E2E3E;
  border-radius: 4px;
  min-width: 80px;
  max-width: 120px;
  margin: 0 2px;
}
.cloze-input:focus {
  outline: none;
  border-color: #2C3A2F;
  background: #FFF9F0;
}
.cloze-input.revealed {
  background: #FFD966;
  font-weight: 600;
  border-color: #A00000;
}
.cloze-input.correct {
  background: #A5D6A7;
  border-color: #2E7D32;
}
.cloze-input.incorrect {
  background: #EF9A9A;
  border-color: #C62828;
}
.cloze-hint-container {
  position: relative;
  display: inline-block;
}
.cloze-hint-container .hint-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 2px solid #A00000;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 800;
  min-width: 160px;
  text-align: center;
  font-size: 0.8rem;
  color: #1A1A1A;
  pointer-events: none;
}
.cloze-hint-container:hover .hint-popup {
  display: block;
}

.dice-input {
  border: 2px dashed #A00000;
  background: #FFF9F0;
  padding: 0.1rem 0.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: #1E2E3E;
  border-radius: 4px;
  min-width: 100px;
}
.dice-input:focus {
  outline: none;
  border-color: #A00000;
  background: #FFFFFF;
}
.dice-input.revealed {
  border-color: #A00000;
  background: #FFD966;
  font-weight: 600;
}

.sticky-reveal-btn {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #EFE8DD;
  padding: 0.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  justify-content: flex-end;
}
.reveal-btn {
  background: #1E2E3E;
  color: #FDFCF9;
  border: none;
  padding: 0.4rem 1.2rem;
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.reveal-btn:hover {
  background: #A00000;
  color: #FFFFFF;
}

.guiding-question {
  background: #F5F2EB;
  padding: 1rem 1.5rem;
  border-left: 4px solid #A00000;
  margin: 1.5rem 0;
  font-weight: 500;
  color: #1E2E3E;
}

/* ----- Infographic Annotation Sidebar (N21 Humour) ----- */
.annotation-sidebar {
  background: #FDF9F0;
  border-radius: 12px;
  border: 1px solid #D9D2C3;
  padding: 1rem;
  font-family: 'Inter', sans-serif;
  overflow-y: auto;
}
.annotation-sidebar h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #A00000;
  margin-bottom: 0.75rem;
  position: sticky;
  top: 0;
  background: #FDF9F0;
  z-index: 1;
  padding-bottom: 0.3rem;
}
.annotation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.annotation-list li {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #E8E5DF;
  padding-bottom: 0.8rem;
}
.anno-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.anno-number {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: #8B0000;
  min-width: 32px;
}
.anno-label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.85rem;
  color: #006D77;
}
.input-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.3rem;
}
.ib-header {
  background: #F5F2EB;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #A00000;
  color: #1E2E3E;
  font-size: 0.9rem;
}
.ib-header p {
  margin: 0;
}
.footnote {
  background: #FDF9F0;
  padding: 0.8rem;
  margin: 1rem 0;
  font-size: 0.85rem;
  border-left: 4px solid #A00000;
  color: #1E2E3E;
}
.reference {
  font-size: 0.8rem;
  color: #666;
  margin-top: 1rem;
}
.image-container {
  text-align: center;
  margin: 1rem 0;
}
.image-container img {
  display: inline-block;
  width: 95%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top;
}

/* ============================================================
   POSTER PAGE (paper1-teeal-poster.html)
   ============================================================ */
.poster {
  max-width: 1400px;
  margin: 2rem auto;
  background: #FFFFFF;
  box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2);
  border-radius: 4px;
  overflow: clip;
  position: relative;
  z-index: 1;
}

.teeal-banner {
  background: #1E2E3E;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  border-bottom: 3px solid #A00000;
}
.teeal-banner-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.teeal-banner-left img {
  height: 60px;
  width: auto;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s;
}
.teeal-banner-left img:hover {
  transform: scale(1.02);
}
.teeal-banner-left span {
  color: #FDFCF9;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}
.teeal-banner a {
  background: #A00000;
  color: white;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: background 0.2s;
}
.teeal-banner a:hover {
  background: #800000;
}

.toolbar {
  background: #2C3A2F;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.toolbar h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  color: #FDFCF9;
  font-size: 0.95rem;
}

.linear-steps {
  background: #F5F2EB;
  border-left: 4px solid #A00000;
  border-radius: 0 8px 8px 0;
  padding: 1.5rem 2rem;
  margin: 1.5rem 2rem 0.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: stretch;
}
.step-card {
  flex: 1 1 250px;
  background: #FFFFFF;
  border: 1px solid #D9D2C3;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.step-number {
  display: inline-block;
  background: #A00000;
  color: #FFFFFF;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}
.step-card h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #1E2E3E;
}
.step-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: #3A3A3A;
  margin-bottom: 0.75rem;
  flex-grow: 1;
}
.step-card p strong {
  color: #1E2E3E;
}
.step-card p em {
  color: #A00000;
  font-style: normal;
  font-weight: 600;
}
.step-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #A00000;
  font-weight: 700;
  flex-shrink: 0;
  align-self: center;
}

.hover-preview-box {
  display: none;
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  background: #FFFFFF;
  border: 2px solid #A00000;
  border-radius: 8px;
  padding: 0.6rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 800;
  pointer-events: auto;
  min-width: 200px;
  text-align: center;
}
.hover-preview-box img {
  max-width: 300px;
  max-height: 220px;
  display: block;
  border-radius: 4px;
  margin: 0 auto;
}
.hover-preview-box .hover-label {
  font-size: 0.7rem;
  color: #666;
  margin-top: 0.4rem;
}
.hover-preview-box .hover-click-hint {
  font-size: 0.7rem;
  color: #A00000;
  font-weight: 600;
  margin-top: 0.2rem;
}
.resource-link:hover .hover-preview-box {
  display: block;
}

.accordion-section {
  border-bottom: 1px solid #ddd;
}
.accordion-header {
  background: #F5F2EB;
  padding: 1.2rem 2rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #1E2E3E;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.2s;
}
.accordion-header:hover {
  background: #E8E5DF;
}
.accordion-header::after {
  content: '▸';
  font-size: 1.5rem;
  transition: transform 0.2s;
  color: #A00000;
}
.accordion-section.open .accordion-header::after {
  transform: rotate(90deg);
}
.accordion-body {
  display: none;
  background: #FFFFFF;
}
.accordion-section.open .accordion-body {
  display: block;
}

.article-section {
  padding: 2rem;
  color: #1A1A1A;
  position: relative;
}

.quote-highlight {
  background-color: #FFF3CD;
  border-bottom: 2px dotted #A00000;
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 0 2px;
  display: inline-block;
}
.quote-highlight:hover {
  background-color: #FFD966 !important;
}
body.annotations-off .quote-highlight {
  background-color: transparent !important;
  border-bottom: none !important;
  cursor: default;
  padding: 0;
  display: inline;
  pointer-events: none;
}

.article-sticky-header {
  position: sticky;
  top: 4rem;
  z-index: 20;
  background: #FFFFFF;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.toggle-annotations-btn-article {
  background: rgba(255,255,255,0.9);
  border: 1px solid #A00000;
  color: #A00000;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}
.toggle-annotations-btn-article:hover {
  background: #A00000;
  color: #FFFFFF;
}
.toggle-annotations-btn-article.off {
  background: #555;
  border-color: #777;
  color: #FFFFFF;
}

.full-teeal {
  padding: 2rem;
  background: #FDF9F0;
  color: #1E2E3E;
}
.full-teeal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #1E2E3E;
}
.teeal-structure-img {
  text-align: center;
  margin-bottom: 2rem;
}
.teeal-structure-img img {
  max-width: 500px;
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.teeal-block {
  background: white;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid #FFD966;
  border-radius: 0 8px 8px 0;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #1E2E3E;
}
.teeal-block h4 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  color: #A00000;
  margin-bottom: 0.5rem;
}
.instruction-bold {
  font-weight: 700;
  color: #1A1A1A;
}

.crit-num {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #A00000;
  background: #f9f3f3;
  border: 1px solid #A00000;
  border-radius: 50%;
  width: 1.3rem;
  height: 1.3rem;
  line-height: 1.3rem;
  text-align: center;
  cursor: help;
  position: relative;
  vertical-align: super;
  margin: 0 1px;
  font-family: 'Inter', sans-serif;
}
.crit-num:hover::after {
  content: attr(data-comment);
  position: absolute;
  bottom: 140%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: normal;
  white-space: nowrap;
  max-width: none;
  z-index: 300;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  text-align: left;
}

.quote-backlink {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #A00000;
  text-underline-offset: 3px;
  cursor: pointer;
}
.quote-backlink:hover {
  background-color: #FFD966;
}
.highlight-flash {
  background-color: #FFD966 !important;
  transition: background-color 0.2s;
}

/* ============================================================
   IO CREATOR (Individual Oral Assessment Creation Guide)
   ============================================================ */
.step-accordion {
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 12px;
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}
.step-accordion:hover {
  border-color: rgba(253,252,249,0.15);
}
.step-accordion.completed {
  border-color: rgba(76,175,80,0.3);
}

.step-accordion-header {
  background: rgba(253,252,249,0.04);
  padding: var(--spacing-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.step-accordion-header:hover {
  background: rgba(253,252,249,0.08);
}
.step-accordion-header .step-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}
.step-accordion-header .step-number {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(204,0,0,0.1);
  padding: 0.2rem 0.8rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
}
.step-accordion-header .step-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.step-accordion-header .step-complete-badge {
  font-size: 0.7rem;
  color: #4CAF50;
  opacity: 0;
  transition: opacity 0.3s;
}
.step-accordion.completed .step-complete-badge {
  opacity: 1;
}
.step-accordion-header .accordion-arrow {
  color: var(--accent);
  transition: transform 0.3s;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.step-accordion.open .step-accordion-header .accordion-arrow {
  transform: rotate(90deg);
}

.step-accordion-body {
  display: none;
  padding: var(--spacing-md);
  background: rgba(253,252,249,0.02);
  border-top: 1px solid rgba(253,252,249,0.05);
}
.step-accordion.open .step-accordion-body {
  display: block;
}
.step-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}

.resource-accordion {
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 8px;
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
}
.resource-accordion-header {
  background: rgba(253,252,249,0.04);
  padding: 0.6rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.resource-accordion-header:hover {
  background: rgba(253,252,249,0.08);
}
.resource-accordion-header .accordion-arrow {
  color: var(--accent);
  transition: transform 0.3s;
  font-size: 1.2rem;
}
.resource-accordion.open .resource-accordion-header .accordion-arrow {
  transform: rotate(90deg);
}
.resource-accordion-body {
  display: none;
  padding: var(--spacing-sm);
  background: rgba(253,252,249,0.02);
}
.resource-accordion.open .resource-accordion-body {
  display: block;
}

.mini-accordion {
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 8px;
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  background: rgba(253,252,249,0.02);
}
.mini-accordion.open {
  border-color: rgba(253,252,249,0.15);
}
.mini-accordion-header {
  background: rgba(253,252,249,0.04);
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.mini-accordion-header:hover {
  background: rgba(253,252,249,0.08);
}
.mini-accordion-header .mini-arrow {
  color: var(--accent);
  transition: transform 0.3s;
  font-size: 1rem;
}
.mini-accordion.open .mini-accordion-header .mini-arrow {
  transform: rotate(90deg);
}
.mini-accordion-body {
  display: none;
  padding: var(--spacing-sm);
  background: rgba(253,252,249,0.01);
}
.mini-accordion.open .mini-accordion-body {
  display: block;
}
.mini-accordion-body .practice-tool {
  margin: 0;
}

.editable-field {
  background: var(--cream);
  border: 1px solid #D9D2C3;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: #1A1A1A;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  width: 100%;
  min-height: 2.5rem;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
  overflow-y: auto;
}
.editable-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.15);
  background: #FFFFFF;
}
.editable-field::placeholder {
  color: #999;
  opacity: 0.7;
}
.editable-field.textarea {
  min-height: 80px;
}
.editable-field.textarea-large {
  min-height: 150px;
}
.editable-field.textarea-xl {
  min-height: 200px;
}
.editable-field.input-sm {
  min-height: 2rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.field-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}
.field-label .hint {
  font-weight: 400;
  color: var(--text-secondary);
  opacity: 0.6;
  font-size: 0.75rem;
}

.editable-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--spacing-sm) 0;
  font-size: 0.85rem;
}
.editable-table th,
.editable-table td {
  border: 1px solid rgba(253,252,249,0.1);
  padding: 0.4rem 0.6rem;
  vertical-align: top;
}
.editable-table th {
  background: rgba(253,252,249,0.05);
  font-weight: 600;
  color: var(--text-secondary);
  text-align: left;
}
.editable-table .editable-field {
  min-height: 1.8rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  background: var(--cream);
  border: 1px solid #D9D2C3;
}
.editable-table .editable-field:focus {
  background: #FFFFFF;
  border-color: var(--accent);
}

.table-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--spacing-md); }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--spacing-md); }
.three-step-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-sm);
}
.three-step-grid .step-box {
  background: var(--cream);
  border: 1px solid #D9D2C3;
  border-radius: 6px;
  padding: 0.8rem;
  text-align: center;
}
.three-step-grid .step-box .step-label {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.3rem;
}
.three-step-grid .step-box .editable-field {
  min-height: 3rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
}

.island-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-md);
}
.island-grid .island-box {
  background: var(--cream);
  border: 1px solid #D9D2C3;
  border-radius: 6px;
  padding: 0.8rem;
}
.island-grid .island-box .island-label {
  font-weight: 700;
  color: var(--accent);
  font-size: 0.7rem;
  display: block;
  margin-bottom: 0.3rem;
  text-align: center;
}
.island-grid .island-box .editable-field {
  min-height: 2rem;
  font-size: 0.75rem;
  padding: 0.3rem 0.4rem;
}

.upload-area {
  background: rgba(253,252,249,0.04);
  border: 2px dashed rgba(253,252,249,0.15);
  border-radius: 8px;
  padding: var(--spacing-md);
  text-align: center;
  margin: var(--spacing-sm) 0;
  transition: border-color 0.3s;
}
.upload-area:hover {
  border-color: var(--accent);
}
.upload-area input[type="file"] {
  display: none;
}
.upload-area .upload-label {
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.upload-area .upload-label:hover {
  color: var(--text-primary);
}
.upload-area .upload-label .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.3rem;
}
.upload-area .uploaded-file {
  margin-top: 0.5rem;
  padding: 0.3rem 0.8rem;
  background: rgba(76,175,80,0.15);
  border-radius: 20px;
  display: inline-block;
  font-size: 0.8rem;
  color: #4CAF50;
}
.upload-area .uploaded-file .remove-file {
  cursor: pointer;
  color: var(--text-secondary);
  margin-left: 0.5rem;
}
.upload-area .uploaded-file .remove-file:hover {
  color: var(--accent);
}

.teeal-builder .teeal-step {
  background: var(--cream);
  border-left: 3px solid var(--accent);
  padding: 0.8rem 1rem;
  margin-bottom: 0.5rem;
  border-radius: 0 4px 4px 0;
}
.teeal-builder .teeal-step label {
  font-weight: 600;
  font-size: 0.8rem;
  color: #1A1A1A;
  display: block;
  margin-bottom: 0.2rem;
}
.teeal-builder .teeal-step .editable-field {
  min-height: 2rem;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
}

.toolbar {
  background: rgba(253,252,249,0.04);
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 12px;
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
}
.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  align-items: center;
}
.toolbar .save-status {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.toolbar .save-status.saved {
  color: #4CAF50;
}
.toolbar .save-status.saving {
  color: #FFD54F;
}

.version-history-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.version-history-modal.show {
  display: flex;
}
.version-history-modal .modal-content {
  background: var(--bg-primary);
  border: 1px solid rgba(253,252,249,0.15);
  border-radius: 12px;
  padding: 2rem;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.version-history-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.version-history-modal .modal-header h3 {
  color: var(--text-primary);
}
.version-list {
  background: rgba(253,252,249,0.03);
  border: 1px solid rgba(253,252,249,0.08);
  border-radius: 8px;
  padding: var(--spacing-sm);
  margin-top: var(--spacing-sm);
  max-height: 300px;
  overflow-y: auto;
}
.version-list .version-item {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid rgba(253,252,249,0.05);
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.version-list .version-item:last-child {
  border-bottom: none;
}
.version-list .version-item .time {
  color: var(--text-secondary);
  opacity: 0.6;
}
.version-list .version-item .restore-btn {
  color: var(--accent);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 0.75rem;
  font-weight: 600;
}
.version-list .version-item .restore-btn:hover {
  text-decoration: underline;
}

/* ============================================================
   FILM GUIDE (filmguide.html)
   ============================================================ */
.film-guide-content .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-md); }
.film-guide-content .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--spacing-sm); }
.film-guide-content .grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--spacing-sm); }
.film-guide-content .frame-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-sm);
}
.film-guide-content .frame-grid .frame-box {
  border: 1px solid #E6E2D9;
  border-radius: 4px;
  padding: 0.5rem;
  text-align: center;
  background: #F8F6F0;
}
.film-guide-content .frame-grid .frame-box .frame-num {
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.3rem;
}
.film-guide-content .img-placeholder {
  background: #F8F6F0;
  border: 2px dashed #D9D2C3;
  border-radius: 6px;
  padding: 0.8rem;
  text-align: center;
  margin: 0.5rem 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #999;
  font-size: 0.8rem;
}
.film-guide-content .img-placeholder img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.3rem 0;
}
/* Override dark theme for film guide inner content */
.film-guide-content * {
  color: #1A1A1A;
}
.film-guide-content h1,
.film-guide-content h2,
.film-guide-content h4,
.film-guide-content .section-title {
  color: var(--accent);
}
.film-guide-content h1::after {
  background: var(--accent);
}
.film-guide-content a {
  color: var(--accent);
}
.film-guide-content a:hover {
  border-bottom-color: var(--accent);
}
.film-guide-content .step-accordion {
  border: 1px solid #E0DCD4;
  background: #FFFFFF;
}
.film-guide-content .step-header {
  background: linear-gradient(135deg, #1E2E3E 0%, #2A3D50 100%);
}
.film-guide-content .step-header h2 {
  color: #FFFFFF;
}
.film-guide-content .step-body {
  background: #FAF8F4;
}

/* ============================================================
   PLANE METHOD DEEP DIVE (planemethoddeepdive.html)
   ============================================================ */
.plane-method-content .method-card {
  background: #FFFFFF;
  border: 1px solid #E0DCD4;
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  scroll-margin-top: 100px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.plane-method-content .method-header {
  background: linear-gradient(135deg, #1E2E3E 0%, #2A3D50 100%);
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s;
}
.plane-method-content .method-header:hover {
  background: linear-gradient(135deg, #253544 0%, #2E4255 100%);
}
.plane-method-content .method-header h2 {
  font-size: 1.1rem;
  color: #FFFFFF;
  margin: 0;
  font-weight: 600;
}
.plane-method-content .method-header .close-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #B6BCC4;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}
.plane-method-content .method-header .close-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #FFFFFF;
}
.plane-method-content .method-header .toggle-icon {
  font-size: 1.4rem;
  color: #FFFFFF;
  transition: transform 0.3s;
  opacity: 0.7;
}
.plane-method-content .method-header .toggle-icon:hover {
  opacity: 1;
}
.plane-method-content .method-header.open .toggle-icon {
  transform: rotate(45deg);
}
.plane-method-content .method-body {
  padding: var(--spacing-md);
  display: none;
  position: relative;
  background: #FAF8F4;
}
.plane-method-content .method-card.open .method-body {
  display: block;
}
.plane-method-content .floating-close-btn {
  position: absolute;
  bottom: var(--spacing-sm);
  right: var(--spacing-sm);
  background: rgba(30,46,62,0.8);
  color: #FDFCF9;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 30px;
  padding: 0.3rem 0.8rem;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.plane-method-content .floating-close-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}
.plane-method-content .mini-card {
  border: 1px solid #E6E2D9;
  border-radius: 6px;
  margin: var(--spacing-sm) 0;
  overflow: hidden;
  background: #FFFFFF;
}
.plane-method-content .mini-header {
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1A1A1A;
  background: #F8F6F0;
  transition: background 0.2s;
}
.plane-method-content .mini-header:hover {
  background: #F0EDE5;
}
.plane-method-content .mini-header .mini-icon {
  font-size: 1rem;
  color: var(--accent);
  transition: transform 0.3s;
}
.plane-method-content .mini-header.open .mini-icon {
  transform: rotate(45deg);
}
.plane-method-content .mini-body {
  padding: 0 1rem 1rem 1rem;
  display: none;
  border-top: 1px solid #E6E2D9;
}
.plane-method-content .mini-card.open .mini-body {
  display: block;
}
.plane-method-content .desc-text {
  color: #444;
  font-size: 0.9rem;
  line-height: 1.6;
}
.plane-method-content .desc-text ul,
.plane-method-content .desc-text ol {
  padding-left: var(--spacing-md);
}
.plane-method-content .desc-text ul ul,
.plane-method-content .desc-text ol ol {
  padding-left: var(--spacing-sm);
}
.plane-method-content .section-title {
  font-weight: 700;
  color: var(--accent);
  margin: var(--spacing-md) 0 var(--spacing-sm) 0;
  font-size: 1rem;
}
.plane-method-content .scaffold-box {
  background: #F8F6F0;
  border-left: 3px solid var(--accent);
  padding: var(--spacing-md);
  border-radius: 0 6px 6px 0;
  margin: var(--spacing-sm) 0;
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  color: #1A1A1A;
  line-height: 1.7;
}
.plane-method-content .scaffold-box .ck-green { color: #2E7D32; }
.plane-method-content .scaffold-box .ck-purple { color: #6C3483; }
.plane-method-content .scaffold-box .ck-yellow { color: #856404; }
.plane-method-content .scaffold-box .ck-orange { color: #A63C06; }
.plane-method-content .scaffold-box .ck-red { color: #721C24; }

.plane-method-content .colour-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: var(--spacing-sm) 0 var(--spacing-md) 0;
  font-size: 0.75rem;
}
.plane-method-content .colour-key span {
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s;
  color: #1E2E3E;
}
.plane-method-content .colour-key span:hover { transform: scale(1.05); }
.plane-method-content .ck-green { background: #D4EDDA; border: 1px solid #b8daff; }
.plane-method-content .ck-purple { background: #E8DAEF; border: 1px solid #d7bde2; }
.plane-method-content .ck-yellow { background: #FFF3CD; border: 1px solid #ffc107; }
.plane-method-content .ck-orange { background: #FFE5D9; border: 1px solid #f39c12; }
.plane-method-content .ck-red { background: #F8D7DA; border: 1px solid #f5c6cb; }

.plane-method-content .teeal-example {
  border: 1px solid #E6E2D9;
  border-radius: 6px;
  padding: var(--spacing-md);
  margin: var(--spacing-sm) 0;
  line-height: 1.7;
  background: #FFFFFF;
  color: #1A1A1A;
  font-size: 0.9rem;
}
.plane-method-content .teeal-example p { margin-bottom: 0.5rem; }
.plane-method-content .coloured {
  display: inline;
  padding: 1px 3px;
  border-radius: 2px;
  transition: background 0.3s;
}
.plane-method-content .coloured.green { background: #D4EDDA; }
.plane-method-content .coloured.purple { background: #E8DAEF; }
.plane-method-content .coloured.yellow { background: #FFF3CD; }
.plane-method-content .coloured.orange { background: #FFE5D9; }
.plane-method-content .coloured.red { background: #F8D7DA; }
.plane-method-content .coloured.none { background: transparent; }
.plane-method-content .highlight-flash { background: #FFD966 !important; transition: background 0.2s; }

.plane-method-content .scrollable-three-col {
  overflow-x: auto;
  max-width: 100%;
  margin: var(--spacing-sm) 0;
  padding-bottom: 0.5rem;
}
.plane-method-content .three-col {
  display: flex;
  gap: var(--spacing-md);
  align-items: stretch;
  min-width: 850px;
}
.plane-method-content .three-col .col-left {
  flex: 0 0 auto;
  background: #F8F6F0;
  padding: var(--spacing-sm);
  border-radius: 6px;
  border: 1px solid #E6E2D9;
  overflow-x: auto;
}
.plane-method-content .three-col .col-left svg { display: block; max-width: none; }
.plane-method-content .three-col .col-mid {
  flex: 0 0 260px;
  background: #F8F6F0;
  padding: var(--spacing-sm);
  border-radius: 6px;
  border: 1px solid #E6E2D9;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.plane-method-content .three-col .col-right {
  flex: 0 0 380px;
  background: #FFFFFF;
  padding: var(--spacing-sm);
  border-radius: 6px;
  border: 1px solid #E6E2D9;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.plane-method-content .col-header {
  font-weight: 700;
  font-size: 0.8rem;
  color: #555;
  border-bottom: 1px solid #E6E2D9;
  padding-bottom: 0.3rem;
  margin-bottom: 0.4rem;
}
.plane-method-content .mid-row,
.plane-method-content .right-row {
  background: #FFFFFF;
  border: 1px solid #E6E2D9;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.plane-method-content .mid-row:hover,
.plane-method-content .right-row:hover {
  background: #F5F2EB;
}
.plane-method-content .mid-row-header,
.plane-method-content .right-row-header {
  padding: 0.4rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #1A1A1A;
}
.plane-method-content .mid-row-header .arrow,
.plane-method-content .right-row-header .arrow {
  color: var(--accent);
  transition: transform 0.3s;
  font-size: 0.7rem;
}
.plane-method-content .mid-row.open .mid-row-header .arrow,
.plane-method-content .right-row.open .right-row-header .arrow {
  transform: rotate(90deg);
}
.plane-method-content .mid-row-content,
.plane-method-content .right-row-content {
  display: none;
  padding: 0.4rem 0.7rem;
  border-top: 1px solid #E6E2D9;
  font-size: 0.8rem;
  color: var(--accent);
}
.plane-method-content .mid-row.open .mid-row-content,
.plane-method-content .right-row.open .right-row-content {
  display: block;
}

.plane-method-content .arc-images-row {
  display: flex;
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
  flex-wrap: wrap;
  justify-content: center;
}
.plane-method-content .arc-images-row .arc-col {
  flex: 1;
  min-width: 160px;
  max-width: 230px;
  text-align: center;
}
.plane-method-content .arc-images-row img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #E6E2D9;
}
.plane-method-content .arc-images-row p {
  font-weight: 700;
  color: var(--accent);
  margin-top: 0.4rem;
  font-size: 0.85rem;
}

.plane-method-content .two-col {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin: var(--spacing-sm) 0;
}
.plane-method-content .two-col > div {
  flex: 1;
  min-width: 200px;
  background: #F8F6F0;
  padding: var(--spacing-sm);
  border-radius: 6px;
  color: #444;
}
.plane-method-content .motif-table .red-bullet { color: var(--accent); }
.plane-method-content .motif-table .cell-strikethrough { text-decoration: line-through; opacity: 0.5; }
.plane-method-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: var(--spacing-sm) 0;
  background: #FFFFFF;
  color: #1A1A1A;
  border: 1px solid #E6E2D9;
}
.plane-method-content th,
.plane-method-content td {
  border: 1px solid #E6E2D9;
  padding: 0.4rem 0.7rem;
  text-align: left;
  vertical-align: top;
}
.plane-method-content th {
  background: #F8F6F0;
  font-weight: 600;
}
.plane-method-content .strikethrough { text-decoration: line-through; opacity: 0.5; }
.plane-method-content .strikethrough td { text-decoration: line-through; opacity: 0.5; }
.plane-method-content .close-all-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(30,46,62,0.85);
  color: #FDFCF9;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 30px;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  z-index: 95;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.plane-method-content .close-all-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}

/* ============================================================
   DEPARTMENT PAGE – THUMB ZOOM & LIGHTBOX
   ============================================================ */
.thumb-zoom {
  position: relative;
  width: 100%;
  height: var(--thumb-height);
  overflow: hidden;
  cursor: pointer;
  background: rgba(0,0,0,0.15);
  border-radius: 4px;
  margin-bottom: var(--spacing-sm);
}
.thumb-zoom img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 0 0;
  transition: transform 0.1s ease;
}
.thumb-zoom:hover img {
  transform: scale(2.2);
}
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 200;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.show {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}

/* ============================================================
   RESOURCES PAGE – SEARCH & FILTER
   ============================================================ */
.search-bar {
  width: 100%;
  max-width: 500px;
  padding: 0.75rem 1rem;
  background: rgba(253,252,249,0.05);
  border: 1px solid rgba(253,252,249,0.15);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin-bottom: var(--spacing-md);
}
.search-bar:focus {
  outline: none;
  border-color: var(--accent);
}
.filter-bar {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}
.filter-btn {
  padding: 0.5rem 1.25rem;
  background: transparent;
  border: 1px solid rgba(253,252,249,0.15);
  border-radius: 4px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-lg);
}
.card {
  background: linear-gradient(135deg, rgba(253,252,249,0.04) 0%, rgba(253,252,249,0.01) 100%);
  border: 1px solid rgba(253,252,249,0.08);
  padding: var(--spacing-md);
  border-radius: 4px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.card:hover {
  border-color: rgba(253,252,249,0.25);
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}
.card-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-sm);
}
.card-category {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(204,0,0,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.no-results {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--spacing-xl);
}
/* ============================================================
   INTERACTIVE P1 LAB (interactive-p1-lab.html)
   ============================================================ */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 2rem 2rem;
}
.text-card {
    background: #1E2E3E;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.text-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    border-color: #CC0000;
}
.text-card .card-thumb {
    width: 100%;
    height: 170px;
    overflow: hidden;
    position: relative;
    background: #0F1D2A;
}
.text-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.text-card:hover .card-thumb img {
    transform: scale(1.04);
}
.text-card .session-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #CC0000;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    z-index: 2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.text-card .card-body {
    padding: 1rem 1.2rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #1E2E3E;
}
.text-card .card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #FDFCF9;
    margin-bottom: 0.3rem;
}
.text-card .card-desc {
    font-size: 0.75rem;
    color: #B6BCC4;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.5;
}
.text-card .checkbox-wrap {
    text-align: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    width: 100%;
}
.text-card .checkbox-wrap label {
    cursor: pointer;
    font-size: 0.75rem;
    color: #B6BCC4;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    transition: color 0.2s;
}
.text-card .checkbox-wrap label:hover {
    color: #FDFCF9;
}
.text-card .checkbox-wrap input[type="checkbox"] {
    accent-color: #CC0000;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.progress-tracker {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    margin: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.progress-tracker .tracker-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.progress-tracker .tracker-left .label {
    color: #B6BCC4;
    font-size: 0.8rem;
    font-weight: 500;
}
.progress-tracker .tracker-left .label strong {
    color: #FDFCF9;
}
.progress-tracker .tracker-left .bar-wrap {
    width: 150px;
    background: rgba(255,255,255,0.1);
    height: 5px;
    border-radius: 4px;
    overflow: hidden;
}
.progress-tracker .tracker-left .bar-fill {
    background: #CC0000;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.progress-tracker .tracker-left .count {
    color: #B6BCC4;
    font-size: 0.75rem;
}
.progress-tracker .tracker-left .count strong {
    color: #FDFCF9;
}
.progress-tracker .reset-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #B6BCC4;
    padding: 0.2rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.progress-tracker .reset-btn:hover {
    background: rgba(204,0,0,0.15);
    border-color: #CC0000;
    color: #FDFCF9;
}

.related-resources {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.related-resources h2 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    color: #FDFCF9;
}
.related-resources .links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-width: 1200px;
    margin: 1.2rem auto 0;
}
.related-resources .links a {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    color: #B6BCC4;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.related-resources .links a:hover {
    background: #CC0000;
    color: #FDFCF9;
    border-color: #CC0000;
}

/* ============================================================
   YOUTUBE PAGE (youtube.html)
   ============================================================ */
.featured-video {
    background: rgba(204,0,0,0.08);
    border: 1px solid rgba(204,0,0,0.3);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}
.featured-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 1rem;
    border-radius: 20px;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.featured-thumb {
    max-width: 640px;
    margin: 0 auto var(--spacing-md) auto;
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}
.featured-thumb:hover {
    transform: scale(1.02);
}
.featured-thumb img {
    width: 100%;
    display: block;
}
.play-icon-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    border: 3px solid white;
    transition: all 0.2s ease;
}
.featured-thumb:hover .play-icon-large {
    background: var(--accent);
    transform: translate(-50%, -50%) scale(1.05);
}
.featured-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}
.featured-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}
.short-card {
    background-color: rgba(253,252,249,0.03);
    border: 1px solid rgba(253,252,249,0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.short-card:hover {
    border-color: rgba(253,252,249,0.25);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.short-card .short-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
}
.short-card .short-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.short-card .short-info {
    padding: var(--spacing-sm);
}
.short-card .short-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}
/* ============================================================
   INTERACTIVE P1 LAB (interactive-p1-lab.html)
   ============================================================ */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem 2rem 2rem;
}
.text-card {
    background: #1E2E3E;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.text-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    border-color: #CC0000;
}
.text-card .card-thumb {
    width: 100%;
    height: 170px;
    overflow: hidden;
    position: relative;
    background: #0F1D2A;
}
.text-card .card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.text-card:hover .card-thumb img {
    transform: scale(1.04);
}
.text-card .session-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #CC0000;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    z-index: 2;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.text-card .card-body {
    padding: 1rem 1.2rem 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #1E2E3E;
}
.text-card .card-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #FDFCF9;
    margin-bottom: 0.3rem;
}
.text-card .card-desc {
    font-size: 0.75rem;
    color: #B6BCC4;
    margin-bottom: 1rem;
    flex-grow: 1;
    line-height: 1.5;
}
.text-card .btn {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    background: linear-gradient(135deg, #CC0000 0%, #A00000 100%);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(204,0,0,0.3);
}
.text-card .btn:hover {
    background: #A00000;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(204,0,0,0.4);
}
.text-card .checkbox-wrap {
    text-align: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    width: 100%;
}
.text-card .checkbox-wrap label {
    cursor: pointer;
    font-size: 0.75rem;
    color: #B6BCC4;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    transition: color 0.2s;
}
.text-card .checkbox-wrap label:hover {
    color: #FDFCF9;
}
.text-card .checkbox-wrap input[type="checkbox"] {
    accent-color: #CC0000;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.progress-tracker {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    margin: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.progress-tracker .tracker-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.progress-tracker .tracker-left .label {
    color: #B6BCC4;
    font-size: 0.8rem;
    font-weight: 500;
}
.progress-tracker .tracker-left .label strong {
    color: #FDFCF9;
}
.progress-tracker .tracker-left .bar-wrap {
    width: 150px;
    background: rgba(255,255,255,0.1);
    height: 5px;
    border-radius: 4px;
    overflow: hidden;
}
.progress-tracker .tracker-left .bar-fill {
    background: #CC0000;
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
.progress-tracker .tracker-left .count {
    color: #B6BCC4;
    font-size: 0.75rem;
}
.progress-tracker .tracker-left .count strong {
    color: #FDFCF9;
}
.progress-tracker .reset-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #B6BCC4;
    padding: 0.2rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}
.progress-tracker .reset-btn:hover {
    background: rgba(204,0,0,0.15);
    border-color: #CC0000;
    color: #FDFCF9;
}

.related-resources {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 2rem 0 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.related-resources h2 {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    color: #FDFCF9;
}
.related-resources .links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    max-width: 1200px;
    margin: 1.2rem auto 0;
}
.related-resources .links a {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    color: #B6BCC4;
    font-size: 0.8rem;
    transition: all 0.2s;
}
.related-resources .links a:hover {
    background: #CC0000;
    color: #FDFCF9;
    border-color: #CC0000;
}

/* ============================================================
   YOUTUBE PAGE (youtube.html)
   ============================================================ */
.featured-video {
    background: rgba(204,0,0,0.08);
    border: 1px solid rgba(204,0,0,0.3);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    text-align: center;
}
.featured-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 1rem;
    border-radius: 20px;
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.featured-thumb {
    max-width: 640px;
    margin: 0 auto var(--spacing-md) auto;
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: transform 0.2s ease;
}
.featured-thumb:hover {
    transform: scale(1.02);
}
.featured-thumb img {
    width: 100%;
    display: block;
}
.play-icon-large {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    border: 3px solid white;
    transition: all 0.2s ease;
}
.featured-thumb:hover .play-icon-large {
    background: var(--accent);
    transform: translate(-50%, -50%) scale(1.05);
}
.featured-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}
.featured-desc {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}
.short-card {
    background-color: rgba(253,252,249,0.03);
    border: 1px solid rgba(253,252,249,0.08);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.short-card:hover {
    border-color: rgba(253,252,249,0.25);
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
}
.short-card .short-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    overflow: hidden;
}
.short-card .short-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.short-card .short-info {
    padding: var(--spacing-sm);
}
.short-card .short-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

/* ============================================================
   PROMO ROW (paper1.html)
   ============================================================ */
.promo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: stretch;
}
.promo-row > * {
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.poster-promo {
    background: linear-gradient(135deg, #CC0000 0%, #A00000 100%);
}
.activities-promo {
    background: linear-gradient(135deg, #A00000 0%, #800000 100%);
    border: 2px solid rgba(255,255,255,0.2);
}
.poster-promo h3,
.activities-promo h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: white;
}
.poster-promo p,
.activities-promo p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.poster-promo .btn,
.activities-promo .btn {
    background: white;
    color: #CC0000;
    box-shadow: none;
    border: none;
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
    display: inline-block;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    margin-top: auto;
}
.poster-promo .btn:hover,
.activities-promo .btn:hover {
    background: #FFD966;
    transform: translateY(-2px);
}

/* ============================================================
   ACTIVITIES PAGE (Activities.html)
   ============================================================ */
.accordion-item {
    border: 1px solid rgba(253,252,249,0.1);
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    background: rgba(253,252,249,0.02);
}
.accordion-item .accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: var(--spacing-md);
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.accordion-item .accordion-header:hover {
    background: rgba(253,252,249,0.05);
}
.accordion-item .accordion-header::after {
    content: '▸';
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.2s;
}
.accordion-item.open .accordion-header::after {
    transform: rotate(90deg);
}
.accordion-item .accordion-body {
    display: none;
    padding: 0 var(--spacing-md) var(--spacing-md);
}
.accordion-item.open .accordion-body {
    display: block;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}
.activity-card {
    background: linear-gradient(135deg, rgba(253,252,249,0.04) 0%, rgba(253,252,249,0.01) 100%);
    border: 1px solid rgba(253,252,249,0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}
.activity-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.6);
    border-color: var(--accent);
}
.activity-card .card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0,0,0,0.3);
    position: relative;
}
.activity-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.activity-card:hover .card-image img {
    transform: scale(1.05);
}
.activity-card .card-image .session-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.activity-card .card-content {
    padding: var(--spacing-sm) var(--spacing-md) var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.activity-card .card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}
.activity-card .card-content .activity-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    flex-grow: 1;
}
/* ============================================================
   RESPONSIVE OVERRIDES
   ============================================================ */
@media (max-width: 1100px) {
  .side-nav { display: none; }
}
@media (max-width: 1024px) {
  .side-nav { display: none; }
}
@media (max-width: 800px) {
  .linear-steps { margin: 1rem 1rem 0.5rem 1rem; flex-direction: column; gap: 1rem; }
  .step-arrow { transform: rotate(90deg); }
  .accordion-header { padding: 1rem; }
  .image-container img { width: 100%; }
  .annotation-sidebar { margin-top: 1rem; }
}
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .nav-container { flex-direction: column; padding: var(--spacing-sm); }
  .nav-links { gap: var(--spacing-sm); flex-wrap: wrap; justify-content: center; }
  .container { padding: var(--spacing-md) var(--spacing-sm); }
  .teeal-card { flex-direction: column; }
  .teeal-thumb { width: 100%; }
  .side-nav { display: none; }
  .promo-row { grid-template-columns: 1fr; }
  .two-boxes { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .three-step-grid { grid-template-columns: 1fr; }
  .island-grid { grid-template-columns: 1fr; }
  .activity-card-scroll { width: 160px; }
  .cards-grid { grid-template-columns: 1fr; }
  :root { --thumb-height: 220px; }
  .film-guide-content .grid-2 { grid-template-columns: 1fr; }
  .film-guide-content .grid-3 { grid-template-columns: 1fr; }
  .film-guide-content .grid-4 { grid-template-columns: 1fr; }
  .film-guide-content .frame-grid { grid-template-columns: repeat(3, 1fr); }
  .plane-method-content .three-col { flex-direction: column; min-width: auto; align-items: stretch; }
  .plane-method-content .three-col .col-left,
  .plane-method-content .three-col .col-mid,
  .plane-method-content .three-col .col-right { flex: 1 1 auto; width: 100%; max-width: 100%; }
  .plane-method-content .scrollable-three-col { overflow-x: visible; }
  .plane-method-content .arc-images-row { flex-direction: column; align-items: center; }
  .plane-method-content .close-all-btn { bottom: 1rem; right: 1rem; padding: 0.3rem 0.7rem; font-size: 0.65rem; }
  .plane-method-content .method-header h2 { font-size: 0.95rem; }
  .plane-method-content .method-header { padding: 0.5rem 0.8rem; }
}
@media (max-width: 600px) {
  .resource-preview { left: auto; right: 0; transform: none; }
}
@media (max-width: 480px) {
  :root { --spacing-xl: 2.5rem; --spacing-lg: 2rem; }
  h1 { font-size: 1.75rem; }
  .nav-links { font-size: 0.9rem; }
  .section-description { font-size: 1rem; }
  .activity-card-scroll { width: 140px; }
  .film-guide-content .frame-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  body { background: #fff; color: #000; }
  nav, footer, .btn, #back-to-top, .signup-box { display: none; }
  .card { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; }
  .editable-field { border: 1px solid #ccc; background: #fff; color: #000; }
  .step-accordion-body { display: block !important; }
  .toolbar { display: none; }
  .resource-accordion-body { display: block !important; }
  .resource-accordion { border: 1px solid #ccc; }
  .resource-accordion-header .accordion-arrow { display: none; }
  .resource-preview { display: none !important; }
  .upload-area { border: 1px solid #ccc; }
  .interactive-card { border: 1px solid #ccc; background: #fff; }
  .interactive-card .blank-diagram { background: #f8f8f8; }
  .mini-accordion-body { display: block !important; }
  .mini-accordion-header .mini-arrow { display: none; }
  .plane-method-builder { display: block !important; }
  .plane-method-chooser { display: none; }
  .plane-method-content .mini-body { display: block !important; }
  .plane-method-content .mini-header .mini-icon { display: none; }
}