/* ==========================================================================
   AI for Business Workshop — Master Stylesheet
   Dark-theme, mobile-first responsive design
   ========================================================================== */

/* ---------- Custom Properties ---------- */
:root {
  /* ===== AAS canonical palette (Advanced Ai Solutions Style Bible v1.0) =====
     Defined here because style.css loads FIRST (header.php); course-tokens.css
     re-declares the identical set so var() resolution works on every page.
     THE only palette — everything below aliases into it. */
  /* LIGHT app chrome (founder directive 2026-08-06 — entire site uses the
     light homepage look: mist pages, white cards, ink text). */
  --aas-bg:             #F4F6F9;
  --aas-card:           #FFFFFF;
  --aas-card-2:         #EDF1F7;
  --aas-text:           #111827;
  --aas-muted:          #42526B;
  --aas-border:         #D9DFE8;
  --aas-navy:           #0A2240;
  --aas-navy-2:         #0E2C52;
  --aas-ink:            #111827;
  --aas-slate:          #42526B;
  --aas-mist:           #F4F6F9;
  --aas-paper:          #FFFFFF;
  --aas-accent:         #2E6FD8;
  --aas-accent-hover:   #1F56AE;
  --aas-gold:           #C9A227;
  --aas-line:           #D9DFE8;
  --aas-success:        #1F9D66;
  --aas-warn:           #C9852B;
  --aas-error:          #C0392B;
  --aas-font-heading:   'Inter', 'Montserrat', sans-serif;
  --aas-font-body:      'Inter', 'Open Sans', system-ui, sans-serif;
  --aas-font-mono:      'JetBrains Mono', 'Courier New', monospace;

  /* ===== Legacy names — re-pointed at --aas-* (names kept working) ===== */
  --bg-primary: var(--aas-bg);
  --bg-card: var(--aas-card);
  --bg-input: var(--aas-card-2);
  --bg-activity: var(--aas-card-2);
  --coral: var(--aas-accent);
  --coral-dark: var(--aas-accent-hover);
  --teal: var(--aas-accent);
  --teal-dark: var(--aas-accent-hover);
  --gold: var(--aas-gold);
  --blue: var(--aas-accent);
  --text-primary: var(--aas-text);
  --text-secondary: var(--aas-muted);
  --text-muted: var(--aas-muted);
  --divider: var(--aas-border);
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-badge: 20px;
  --nav-height: 64px;
  --font-heading: var(--aas-font-heading);
  --font-body: var(--aas-font-body);

  /* ===== Legacy --ind-* chrome accents — re-pointed at --aas-* =====
     Names kept so existing chrome selectors keep resolving. */
  --ind-orange:    var(--aas-accent);       /* primary / CTA */
  --ind-orange-hi: var(--aas-accent);
  --ind-orange-dk: var(--aas-accent-hover);
  --ind-amber:     var(--aas-gold);         /* numbers / currency / accent */
  --ind-amber-hi:  var(--aas-gold);
  --ind-steel:     var(--aas-accent);       /* secondary / links */
  --ind-steel-dk:  var(--aas-accent-hover);
  --ind-steel-hi:  var(--aas-accent);
  --ind-gun:       var(--aas-bg);           /* page */
  --ind-panel:     var(--aas-card);         /* panel */
  --ind-panel-2:   var(--aas-card-2);
  --ind-raised:    var(--aas-card-2);       /* raised surface / track (light) */
  --ind-border:    var(--aas-border);
  --ind-brushed:   rgba(255,255,255,.6);    /* brushed top highlight (soft on light) */
  --ind-ink:       var(--aas-text);
  --ind-ink-2:     var(--aas-text);
  --ind-ink-muted: var(--aas-muted);
  --ind-grad-cta:   linear-gradient(135deg, var(--aas-accent), var(--aas-accent-hover));
  --ind-grad-amber: linear-gradient(135deg, var(--aas-gold), var(--aas-warn));
  --ind-grad-steel: linear-gradient(135deg, var(--aas-accent), var(--aas-accent-hover));
  --ind-glow-cta:   0 8px 30px rgba(46,111,216,.42);
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--teal); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

/* ---------- Focus & Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(46,111,216,0.18);
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46,111,216,0.15);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,34,64,.10); }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }

/* ==========================================================================
   AUTH PAGES (index.php)
   ========================================================================== */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 20px;
  background: var(--bg-primary);
  background-image: radial-gradient(circle at 20% 50%, rgba(46,111,216,.05) 0%, transparent 50%),
                    radial-gradient(circle at 80% 50%, rgba(201,162,39,.05) 0%, transparent 50%);
}
.auth-container {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(10,34,64,.12);
}
.auth-header { text-align: center; margin-bottom: 32px; }
.auth-logo { font-size: 2.4rem; font-weight: 800; letter-spacing: 2px; }
.auth-subtitle { font-size: 1.1rem; color: var(--text-secondary); margin-top: 4px; font-style: italic; }
.auth-tagline { font-size: .85rem; color: var(--text-muted); margin-top: 12px; letter-spacing: .5px; }
.auth-form { display: none; }
.auth-form.active { display: block; }
.auth-footer { text-align: center; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--divider); font-size: .85rem; color: var(--text-secondary); }
.auth-footer p:last-child { margin-top: 4px; }

.auth-tabs { display: flex; border-bottom: 2px solid var(--divider); margin-bottom: 24px; }
.auth-tab {
  flex: 1; text-align: center; padding: 12px 0;
  font-family: var(--font-heading); font-weight: 600; color: var(--text-secondary);
  cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
  background: none; border-top: none; border-left: none; border-right: none;
  font-size: 1rem; transition: color .2s, border-color .2s;
}
.auth-tab.active, .auth-tab:hover { color: var(--text-primary); border-bottom-color: var(--coral); }

/* ---------- Forms (shared) ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: .9rem; font-weight: 600; }
.form-control {
  width: 100%; padding: 12px 14px;
  background: var(--bg-input); border: 1px solid var(--divider); border-radius: var(--radius-input);
  color: var(--text-primary); font-family: var(--font-body); font-size: .95rem;
  transition: border-color .2s, box-shadow .2s;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46,111,216,.15); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23A0A0B8' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border: none; border-radius: var(--radius-input);
  font-family: var(--font-heading); font-weight: 600; font-size: .95rem;
  cursor: pointer; transition: background .2s, transform .1s, opacity .2s;
  text-decoration: none; line-height: 1.4;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-coral { background: var(--ind-orange); color: #fff; }
.btn-coral:hover { background: var(--aas-accent-hover, #1F56AE); color: #fff; }
.btn-teal { background: var(--teal); color: var(--bg-primary); }
.btn-teal:hover { background: var(--teal-dark); color: var(--bg-primary); }
.btn-outline { background: transparent; border: 2px solid var(--coral); color: var(--coral); }
.btn-outline:hover { background: var(--coral); color: #fff; }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-xs { padding: 5px 10px; font-size: .8rem; }

/* Alert boxes */
.alert { padding: 14px 20px; border-radius: var(--radius-input); margin-bottom: 20px; font-size: .9rem; }
.alert-error { background: rgba(233,69,96,.15); border: 1px solid var(--coral); color: var(--coral); }
.alert-success { background: rgba(46,111,216,.15); border: 1px solid var(--teal); color: var(--teal); }

/* ==========================================================================
   PRESENTER DASHBOARD (dashboard.php)
   ========================================================================== */
.presenter-dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Hero */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  gap: 1.5rem;
}
.dash-hero-text h1 { font-size: 1.8rem; font-weight: 700; }
.dash-subtitle { color: var(--text-secondary); font-size: .95rem; margin-top: 6px; }

/* Progress Ring */
.dash-progress-ring { flex-shrink: 0; position: relative; width: 90px; height: 90px; }
.ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--ind-raised); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--ind-amber); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 327; transition: stroke-dashoffset .6s ease; filter: drop-shadow(0 0 6px rgba(46,111,216,0.45)); }
.ring-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem; color: var(--ind-amber);
  text-shadow: 0 0 15px rgba(255,176,32,0.45);
}

/* Module Selector Grid */
.module-selector {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.mod-card {
  position: relative;
  background: var(--ind-panel);
  border: 1px solid var(--ind-border);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}
/* Brushed-steel 1px top highlight */
.mod-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ind-brushed) 18%, var(--ind-brushed) 82%, transparent);
  z-index: 3; pointer-events: none;
}
.mod-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(10,34,64,.16), 0 0 22px rgba(46,111,216,.16);
  border-color: var(--accent, var(--ind-orange));
}

.mod-card-img {
  position: relative;
  aspect-ratio: 16 / 7;
  overflow: hidden;
}
.mod-card-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.98) saturate(1.06); transition: filter .3s; }
.mod-card:hover .mod-card-img img { filter: brightness(1.08) saturate(1.12); }
.mod-card-overlay {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: flex-start; padding: 16px;
  /* Subtle scrim only at the very bottom so the image reads clearly behind the number. */
  background: linear-gradient(to top, rgba(13,13,26,.78) 0%, rgba(13,13,26,.22) 36%, transparent 68%);
}
.mod-number {
  font-family: var(--font-heading); font-weight: 800; font-size: 2.5rem;
  color: var(--accent, var(--coral)); opacity: 1; line-height: 1;
  text-shadow: 0 2px 14px rgba(0,0,0,.9), 0 1px 3px rgba(0,0,0,.95);
}

.mod-lock {
  position: absolute; inset: 0; background: rgba(13,13,26,.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--text-muted);
}

.mod-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.mod-meta { display: flex; gap: 12px; font-size: .8rem; color: var(--text-muted); margin-bottom: 10px; }
.mod-title { font-size: 1.1rem; margin-bottom: 14px; flex: 1; }

.mod-progress-bar { width: 100%; height: 5px; background: var(--bg-input); border-radius: 3px; overflow: hidden; margin-bottom: 10px; }
.mod-progress-fill { height: 100%; border-radius: 3px; transition: width .5s ease; }

.mod-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mod-pct { font-size: .85rem; color: var(--text-muted); font-weight: 600; }
.mod-badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 3px 10px; border-radius: var(--radius-badge); }
.mod-badge-done { background: rgba(79,166,214,.16); color: var(--ind-steel-hi); border: 1px solid rgba(79,166,214,.32); }
.mod-badge-active { background: rgba(46,111,216,.16); color: var(--ind-orange-hi); border: 1px solid rgba(46,111,216,.34); }
.mod-badge-ready { background: rgba(255,176,32,.16); color: var(--ind-amber-hi); border: 1px solid rgba(255,176,32,.34); }
.mod-badge-locked { background: rgba(154,166,182,.12); color: var(--ind-ink-muted); border: 1px solid rgba(154,166,182,.22); }

.mod-enter {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: var(--radius-input);
  background: var(--ind-grad-cta); color: #fff;
  border: 1px solid rgba(255,138,43,.55);
  font-family: var(--font-heading); font-weight: 700; font-size: .9rem;
  box-shadow: 0 6px 20px rgba(46,111,216,.34);
  transition: filter .2s, transform .1s, box-shadow .2s; text-decoration: none;
}
.mod-enter:hover { filter: brightness(1.06); color: #fff; box-shadow: var(--ind-glow-cta); transform: translateY(-1px); }
.mod-enter:active { transform: scale(.97); }

/* Quick Links */
.dash-links {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.dash-link {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; background: var(--ind-panel); border: 1px solid var(--ind-border);
  border-radius: 12px; color: var(--ind-ink-2);
  font-size: .85rem; font-weight: 600; transition: border-color .2s, color .2s, box-shadow .2s, transform .12s;
  text-decoration: none;
}
.dash-link:hover { border-color: var(--ind-steel); color: var(--ind-ink); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(79,166,214,.18); }
.dash-link i { font-size: 1rem; color: var(--ind-steel); }

/* ==========================================================================
   FULL-SCREEN PRESENTATION VIEWER (module.php)
   ========================================================================== */
.pres {
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  z-index: 500;
}

/* Top Bar */
.pres-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; height: 48px; min-height: 48px;
  background: var(--ind-panel); border-bottom: 1px solid var(--ind-border);
  box-shadow: inset 0 1px 0 var(--ind-brushed);
  font-size: .85rem;
}
.pres-back {
  color: var(--text-muted); font-size: 1.1rem; transition: color .2s;
  display: flex; align-items: center; text-decoration: none;
}
.pres-back:hover { color: var(--text-primary); }
.pres-title-bar { display: flex; align-items: center; gap: 8px; }
/* "Module 01" — mono, uppercase, wide-tracked industrial eyebrow (color set inline to the module accent) */
.pres-module-label { font-family: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
.pres-divider { color: var(--ind-ink-muted); }
.pres-module-name { color: var(--ind-ink-2); font-size: .85rem; }
/* "1 / 16" counter — molten amber current, steel total */
.pres-counter { font-family: 'JetBrains Mono', ui-monospace, 'Fira Code', monospace; font-weight: 600; color: var(--ind-steel); letter-spacing: .04em; }
.pres-counter span:first-child { color: var(--ind-amber); font-size: 1rem; }

/* Slide Drawer */
.pres-drawer {
  position: fixed; top: calc(var(--nav-height) + 48px); left: 0; bottom: 48px;
  width: 300px; background: var(--ind-panel); border-right: 1px solid var(--ind-border);
  transform: translateX(-100%); transition: transform .3s ease; z-index: 600;
  display: flex; flex-direction: column;
  box-shadow: 4px 0 24px rgba(10,34,64,.14), inset 0 1px 0 var(--ind-brushed);
}
.pres-drawer.open { transform: translateX(0); }
.pres-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--divider);
}
.pres-drawer-header h3 { font-size: 1rem; }
.pres-drawer-close {
  background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.pres-drawer-close:hover { color: var(--text-primary); }
.pres-drawer-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.pres-drawer-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  color: var(--text-secondary); font-size: .85rem; text-decoration: none;
  border-left: 3px solid transparent; transition: background .2s, border-color .2s;
}
.pres-drawer-item:hover { background: var(--bg-input); color: var(--text-primary); }
.pres-drawer-item.active { border-left-color: var(--ind-orange); background: var(--ind-raised); color: var(--ind-ink); font-weight: 600; }
.pres-drawer-item.done .pres-drawer-num { color: var(--ind-steel-hi); }
.pres-drawer-num { font-weight: 700; min-width: 24px; font-size: .8rem; }
.pres-drawer-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-drawer-check { color: var(--ind-steel-hi); font-size: .75rem; }

/* Stage (slide area) */
.pres-stage {
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
  position: relative; overflow-y: auto; padding: 2rem 4rem;
}

/* Navigation Arrows */
.pres-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--ind-raised); border: 1px solid var(--ind-border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ind-ink-2); font-size: 1.1rem; text-decoration: none;
  box-shadow: inset 0 1px 0 var(--ind-brushed);
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  z-index: 10;
}
.pres-arrow:hover { background: var(--ind-grad-cta); border-color: var(--ind-orange-hi); color: #fff; box-shadow: var(--ind-glow-cta); }
.pres-arrow-left { left: 1rem; }
.pres-arrow-right { right: 1rem; }

/* Slide Content */
.pres-slide {
  width: 100%; max-width: 900px;
  background: var(--ind-panel);
  border: 1px solid var(--ind-border);
  border-radius: 14px;
  padding: 3rem 3.5rem;
  box-shadow: 0 8px 40px rgba(10,34,64,.10), inset 0 1px 0 var(--ind-brushed);
  position: relative;
  animation: slideIn .35s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.pres-slide-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: var(--radius-badge);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  margin-bottom: 20px;
}

.pres-slide-title {
  font-size: 1.8rem; font-weight: 800; line-height: 1.25;
  margin-bottom: 24px; color: var(--ind-ink);
  /* Amber weld-seam underline */
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--aas-accent), var(--aas-accent-hover) 60%, transparent) 1;
  box-shadow: 0 3px 0 -1px rgba(255,176,32,.18);
  padding-bottom: 16px;
}

/* Slide inner content styling */
.pres-slide-content { color: var(--text-secondary); font-size: 1rem; line-height: 1.75; }
.pres-slide-content h2 { color: var(--text-primary); margin: 28px 0 12px; font-size: 1.4rem; }
.pres-slide-content h3 { color: var(--text-primary); margin: 24px 0 10px; font-size: 1.2rem; }
.pres-slide-content h4 { color: var(--text-primary); margin: 20px 0 8px; }
.pres-slide-content p { margin-bottom: 14px; }
.pres-slide-content ul, .pres-slide-content ol { margin: 0 0 16px 24px; }
.pres-slide-content li { margin-bottom: 8px; }
.pres-slide-content li::marker { color: var(--slide-accent, var(--ind-orange)); }
.pres-slide-content strong { color: var(--text-primary); }
/* AAS contrast fix 2026-08-06: scoped tz slides own their text colors.
   Unrewritten slide interiors are still DARK — the global light-theme
   heading colors above must not paint navy/ink onto them. */
.pres-slide-content [class*="tz-slide-"] h1,
.pres-slide-content [class*="tz-slide-"] h2,
.pres-slide-content [class*="tz-slide-"] h3,
.pres-slide-content [class*="tz-slide-"] h4,
.pres-slide-content [class*="tz-slide-"] strong { color: inherit; }
/* Gradient headline safety: if a scoped slide title gradient ever fails to paint,
   the fallback color is readable (scoped rules with background-clip:text override this). */

.pres-slide-content em { color: var(--teal); font-style: italic; }
.pres-slide-content blockquote {
  border-left: 4px solid var(--slide-accent, var(--ind-orange)); padding: 12px 20px;
  background: var(--bg-input); border-radius: 0 var(--radius-input) var(--radius-input) 0;
  margin: 16px 0; font-style: italic; color: var(--text-secondary);
}
.pres-slide-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.pres-slide-content th {
  background: var(--bg-input); font-family: var(--font-heading); font-weight: 600;
  color: var(--text-primary); padding: 10px 14px; text-align: left;
  border-bottom: 2px solid var(--divider);
}
.pres-slide-content td { padding: 10px 14px; border-bottom: 1px solid var(--divider); color: var(--text-secondary); }
.pres-slide-content tr:nth-child(even) { background: rgba(30,30,58,.3); }

.pres-slide-content code {
  background: var(--bg-input); padding: 2px 6px; border-radius: 4px;
  font-size: .9em; color: var(--ind-amber); font-family: 'Fira Code', 'Consolas', monospace;
}
.pres-slide-content pre {
  background: var(--bg-input); padding: 16px 20px; border-radius: var(--radius-input);
  border-left: 4px solid var(--ind-orange); overflow-x: auto; margin: 16px 0;
}
.pres-slide-content pre code { background: none; padding: 0; color: var(--text-primary); font-size: .9rem; line-height: 1.5; }

/* Mobile leak guard: keep un-audited injected slide roots from spilling
   absolute/decorative elements horizontally on phones (2026-07). */
.pres-slide-content > [class*="tz-slide-"] { overflow-x: hidden; }

/* Slide media — video embeds and images */
.slide-media-video {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  border-radius: 12px; margin: 16px 0 20px; background: #000;
  box-shadow: 0 4px 20px rgba(10,34,64,0.12);
}
.slide-media-video iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.slide-media-image {
  margin: 16px 0 20px; text-align: center;
}
.slide-media-image img {
  max-width: 100%; max-height: 420px; border-radius: 12px; object-fit: contain;
  box-shadow: 0 4px 20px rgba(10,34,64,0.10);
}
/* Also support inline images/iframes in HTML content */
.pres-slide-content img {
  max-width: 100%; border-radius: 8px; margin: 12px 0;
}
.pres-slide-content iframe {
  max-width: 100%; border-radius: 8px; margin: 12px 0; border: 0;
}

.pres-breakout-link { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--divider); }
.pres-tier-gate {
  margin-top: 24px; padding: 14px 20px; border-radius: var(--radius-input);
  background: rgba(108,117,125,.1); border: 1px dashed var(--text-muted);
  color: var(--text-muted); font-size: .9rem;
}

/* Bottom Bar */
.pres-bottombar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.25rem; height: 48px; min-height: 48px;
  background: var(--ind-panel); border-top: 1px solid var(--ind-border);
  box-shadow: inset 0 1px 0 var(--ind-brushed);
}
.pres-btn-slides {
  background: var(--ind-raised); border: 1px solid var(--ind-border); border-radius: var(--radius-input);
  color: var(--ind-ink-2); padding: 6px 12px; cursor: pointer;
  font-size: .9rem; transition: border-color .2s, color .2s;
}
.pres-btn-slides:hover { border-color: var(--ind-steel); color: var(--ind-ink); }

.pres-progress { flex: 1; padding: 0 1.5rem; max-width: 600px; }
.pres-progress-track { width: 100%; height: 4px; background: var(--ind-raised); border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
.pres-progress-fill { height: 100%; border-radius: 2px; transition: width .4s ease; }
.pres-dots { display: flex; gap: 3px; justify-content: center; flex-wrap: wrap; }
.pres-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ind-raised); transition: background .2s, transform .2s;
  text-decoration: none; display: block;
}
.pres-dot.done { background: var(--ind-steel); opacity: .7; }
.pres-dot.active { transform: scale(1.4); }
.pres-dot:hover { background: var(--text-secondary); }

.pres-mark-done {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: .85rem; color: var(--text-secondary); user-select: none;
}
.pres-mark-done input { display: none; }
.pres-check-icon {
  width: 22px; height: 22px; border: 2px solid var(--divider); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
  position: relative;
}
.pres-check-icon::after { content: '\2713'; color: var(--bg-primary); font-size: .7rem; font-weight: 700; opacity: 0; transition: opacity .2s; }
.pres-mark-done input:checked ~ .pres-check-icon { background: var(--ind-grad-amber); border-color: var(--ind-amber-hi); }
.pres-mark-done input:checked ~ .pres-check-icon::after { opacity: 1; color: #fff; }
.pres-mark-done input:checked ~ .pres-check-text { color: var(--ind-amber-hi); }

/* ---- Industrial chrome: scoped focus-visible outlines (WCAG) ---- */
.pres-arrow:focus-visible,
.pres-btn-slides:focus-visible,
.pres-back:focus-visible,
.pres-drawer-item:focus-visible,
.pres-dot:focus-visible,
.pres-mob-prev:focus-visible,
.pres-mob-next:focus-visible,
.pres-mark-done input:focus-visible ~ .pres-check-icon,
.mod-enter:focus-visible,
.dash-link:focus-visible {
  outline: 2px solid var(--ind-amber);
  outline-offset: 2px;
}
/* Ask Max bubble — FRAME ONLY (keyboard focus ring; widget internals untouched) */
#cyb-bubble:focus-visible { outline: 2px solid var(--ind-amber) !important; outline-offset: 3px; }

/* ==========================================================================
   BREAKOUT / HANDOUT VIEWER
   ========================================================================== */
.handout-wrapper { max-width: 800px; margin: 0 auto; padding: 32px 24px; }
.handout-wrapper h1 { margin-bottom: 8px; }
.handout-wrapper h2 { margin: 28px 0 12px; color: var(--text-primary); }
.handout-wrapper p { margin-bottom: 14px; color: var(--text-secondary); line-height: 1.7; }
.tier-lock-overlay { position: relative; }
.tier-lock-overlay .locked-content { filter: blur(6px); user-select: none; pointer-events: none; }
.tier-lock-overlay .upgrade-cta {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 32px; text-align: center; z-index: 10; max-width: 400px; width: 90%;
}

/* ==========================================================================
   TOOLS PAGE
   ========================================================================== */
.tool-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 8px 16px; border-radius: var(--radius-badge); border: 1px solid var(--divider);
  background: transparent; color: var(--text-secondary); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.filter-btn.active, .filter-btn:hover { background: var(--coral); border-color: var(--coral); color: #fff; }

.tool-cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 32px; }
.tool-card {
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 24px; transition: transform .2s, box-shadow .2s;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(10,34,64,.10); }
.tool-card.hidden { display: none; }
.tool-header { padding-bottom: 12px; margin-bottom: 12px; }
.tool-header h2 { font-size: 1.3rem; display: inline; margin-right: 8px; }
.tool-maker { color: var(--text-muted); font-size: .85rem; }
.tool-pricing { display: flex; gap: 12px; margin-bottom: 16px; font-size: .85rem; }
.tool-free { color: var(--teal); }
.tool-paid { color: var(--text-muted); }
.tool-ratings { margin-bottom: 16px; }
.tool-rating { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: .85rem; }
.rating-dots { display: flex; gap: 4px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--divider); }
.dot.filled { background: var(--coral); }
.tool-best h4 { margin-bottom: 8px; font-size: .9rem; color: var(--text-primary); }
.tool-best ul { margin: 0 0 16px 20px; color: var(--text-secondary); font-size: .85rem; }
.tool-best li { margin-bottom: 4px; }

.recommendation-section h2 { margin-bottom: 16px; }
.comparison-table { width: 100%; border-collapse: collapse; }
.comparison-table th {
  background: var(--bg-input); padding: 10px 14px; text-align: left;
  font-family: var(--font-heading); font-weight: 600; border-bottom: 2px solid var(--divider); font-size: .85rem;
}
.comparison-table td { padding: 10px 14px; border-bottom: 1px solid var(--divider); color: var(--text-secondary); font-size: .85rem; }
.comparison-table tr:nth-child(odd) { background: var(--bg-card); }
.comparison-table tr:nth-child(even) { background: var(--bg-primary); }

.tool-tip-box {
  background: var(--bg-card); border: 1px solid var(--gold); border-radius: var(--radius-card);
  padding: 24px;
}
.tool-tip-box h3 { margin-bottom: 8px; }
.tool-tip-box p { color: var(--text-secondary); margin: 0; }

/* Page header */
.page-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.page-header h1 { margin-bottom: 4px; }
.page-header p { color: var(--text-secondary); }
.text-secondary { color: var(--text-secondary); }
.section-title { margin-bottom: 16px; }

/* Resource grid */
.resource-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.resource-card {
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 20px; display: flex; flex-direction: column; gap: 8px; transition: transform .2s;
}
.resource-card:hover { transform: translateY(-2px); }
.resource-card.locked { opacity: .5; }
.resource-icon { font-size: 1.8rem; }

/* ==========================================================================
   QUIZ PAGE
   ========================================================================== */
.quiz-card {
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 24px; margin-bottom: 24px;
}
.question-number {
  display: inline-block; background: var(--coral); color: #fff;
  width: 28px; height: 28px; border-radius: 50%; text-align: center; line-height: 28px;
  font-size: .85rem; font-weight: 700; margin-right: 10px;
}
.question-text { font-family: var(--font-heading); font-weight: 600; margin-bottom: 16px; display: block; }
.choice-list { list-style: none; margin-top: 12px; }
.choice-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border-radius: var(--radius-input); cursor: pointer; transition: background .2s; margin-bottom: 6px;
}
.choice-item:hover { background: var(--bg-input); }
.choice-radio {
  appearance: none; width: 20px; height: 20px; border: 2px solid var(--divider);
  border-radius: 50%; flex-shrink: 0; cursor: pointer; transition: border-color .2s; position: relative;
}
.choice-radio:checked { border-color: var(--coral); }
.choice-radio:checked::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 10px; height: 10px; background: var(--coral); border-radius: 50%;
}
.choice-label { color: var(--text-secondary); cursor: pointer; }
.confidence-group { margin-top: 16px; }
.confidence-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-secondary); margin-bottom: 6px; }
.confidence-value { font-weight: 700; color: var(--teal); }
/* .confidence-slider is now a container div — range input styles are in the quiz section below */
.result-correct { color: var(--teal); }
.result-incorrect { color: var(--coral); }
.score-summary {
  background: var(--bg-card); border: 2px solid var(--teal); border-radius: var(--radius-card);
  padding: 32px; text-align: center;
}
.score-summary .score-number { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; color: var(--teal); }

/* ==========================================================================
   SURVEY PAGE
   ========================================================================== */
.star-rating { display: flex; gap: 4px; }
.star {
  font-size: 1.6rem; cursor: pointer; color: var(--text-muted); transition: color .15s;
  background: none; border: none; padding: 0; line-height: 1;
}
.star.filled, .star.hovered { color: var(--gold); }
.survey-thankyou { text-align: center; padding: 48px 24px; }
.survey-thankyou h2 { color: var(--teal); margin-bottom: 12px; }

/* ==========================================================================
   CERTIFICATE PAGE
   ========================================================================== */
.certificate-preview {
  background: #FFFFFF; color: #1a1a2e; border-radius: var(--radius-card);
  padding: 48px; max-width: 800px; margin: 0 auto; text-align: center;
  position: relative; border: 4px solid var(--coral);
  box-shadow: inset 0 0 0 2px var(--bg-primary), inset 0 0 0 6px var(--coral);
}
.certificate-preview h1 { font-family: var(--font-heading); color: #1a1a2e; font-size: 2rem; margin-bottom: 8px; }
.certificate-preview .cert-line { width: 60%; height: 3px; background: var(--coral); margin: 16px auto; }
.certificate-preview .cert-name { font-family: var(--font-heading); font-size: 1.8rem; color: var(--coral); margin: 20px 0; }
.certificate-preview .cert-details { color: var(--text-muted); font-size: .95rem; margin: 8px 0; }
.cert-actions { text-align: center; margin-top: 24px; }
@media print {
  body { background: #fff !important; color: #000 !important; }
  .site-nav, .cert-actions, footer, .nav-toggle,
  .pres-bottombar, .pres-topbar, .pres-drawer, .bo-complete-wrap,
  .flash, .modal-overlay, .skip-link, #confettiCanvas { display: none !important; }
  .no-print { display: none !important; }
  .certificate-preview { box-shadow: none; border: 4px solid var(--coral); width: 100%; max-width: none; page-break-inside: avoid; }
  a { color: #000 !important; text-decoration: none; }
  .handout-wrapper, .quiz-card, .score-summary, .pres-slide {
    box-shadow: none !important; border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  .handout-wrapper { max-width: none; padding: 0; }
  h1, h2, h3 { color: #000 !important; page-break-after: avoid; }
  .pres-slide-content, .bo-el-text, p { color: #333 !important; }
  .score-summary .score-number { color: #000 !important; }

  /* Breakout/Handout print styles */
  .bo-page { padding: 0 !important; }
  .bo-topbar {
    background: #fff !important; color: #000 !important;
    border-bottom: 2px solid #000 !important; padding: 8px 0 !important;
    position: static !important;
  }
  .bo-topbar .bo-back { display: none !important; }
  .bo-topbar-score .btn { display: none !important; }
  .bo-topbar-title { color: #000 !important; }
  .bo-module-label {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    color: #fff !important;
  }
  .bo-hero {
    background: #fff !important; border-color: #333 !important;
    color: #000 !important; padding: 16px 0 !important;
    page-break-after: avoid;
  }
  .bo-hero h1 { color: #000 !important; font-size: 1.5rem; }
  .bo-subtitle { color: #555 !important; }
  .bo-dots { display: none !important; }

  .bo-section, .glass-card {
    background: #fff !important; border: 1px solid #ccc !important;
    box-shadow: none !important; backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    page-break-inside: avoid; margin-bottom: 16px !important;
    padding: 16px !important; border-radius: 8px !important;
  }
  .bo-section-header { border-color: #ccc !important; }
  .bo-section-num {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    color: #fff !important;
  }
  .bo-section-header h2 { color: #000 !important; }
  .bo-el-heading { color: #333 !important; }
  .bo-el-text { color: #333 !important; }
  .bo-el-text strong { color: #000 !important; }
  .bo-el-text table { border-collapse: collapse; width: 100%; }
  .bo-el-text th {
    background: #eee !important; color: #000 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    border: 1px solid #999; padding: 6px 8px; text-align: left; font-size: 9pt;
  }
  .bo-el-text td {
    border: 1px solid #ccc; padding: 4px 8px; color: #333 !important;
    font-size: 9pt;
  }
  .bo-el-text tr:nth-child(even) td { background: #f8f8f8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .bo-label { color: #000 !important; font-weight: 600; }
  .bo-input, .bo-textarea {
    background: #fff !important; color: #000 !important;
    border: 1px solid #999 !important; border-radius: 4px !important;
    padding: 6px 8px !important;
  }
  .bo-save-indicator { display: none !important; }

  .bo-prompt-block {
    background: #f5f5f5 !important; border: 1px solid #ccc !important;
    border-left: 4px solid #E94560 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    page-break-inside: avoid; padding: 12px 16px !important;
  }
  .bo-prompt-text {
    color: #000 !important; font-size: 9pt;
    white-space: pre-wrap !important; word-wrap: break-word !important;
    overflow: visible !important; background: transparent !important;
    border: none !important; padding: 0 !important; margin: 0 !important;
  }
  .bo-copy-btn { display: none !important; }

  .bo-checklist { page-break-inside: avoid; }
  .bo-check-item { color: #000 !important; background: #fff !important; border-color: #ccc !important; }
  .bo-check-box {
    border: 2px solid #333 !important; background: #fff !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .bo-check-item input:checked ~ .bo-check-box {
    background: #333 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .bo-check-label { color: #000 !important; }

  .bo-radio-group { gap: 4px !important; }
  .bo-radio-item { color: #000 !important; }
  .bo-radio-dot { border-color: #333 !important; }

  .bo-table-wrap { page-break-inside: avoid; }
  .bo-table thead th {
    background: #eee !important; color: #000 !important;
    border: 1px solid #999 !important; padding: 6px 8px !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    font-size: 8pt;
  }
  .bo-table tbody td { border: 1px solid #ccc !important; padding: 4px 6px !important; }
  .bo-table-prefill { color: #000 !important; font-weight: 600; }
  .bo-table-input {
    background: #fff !important; color: #000 !important;
    border: 1px solid #bbb !important; padding: 4px 6px !important;
    font-size: 9pt;
  }
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */
.admin-layout { display: flex; min-height: calc(100vh - var(--nav-height)); }
.admin-sidebar {
  width: 220px; min-width: 220px; background: var(--bg-card);
  border-right: 1px solid var(--divider); padding: 20px 0;
  position: sticky; top: var(--nav-height); height: calc(100vh - var(--nav-height));
  overflow-y: auto; display: flex; flex-direction: column;
}
.admin-sidebar nav { flex: 1; }
.admin-sidebar h3 { padding: 0 20px 12px; font-size: 1rem; border-bottom: 1px solid var(--divider); margin-bottom: 8px; }
.admin-sidebar nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; color: var(--text-secondary); font-size: .9rem;
  transition: background .2s, color .2s; text-decoration: none;
}
.admin-sidebar nav a:hover { background: var(--bg-input); color: var(--text-primary); }
.admin-sidebar nav a.active { background: var(--coral); color: #fff; font-weight: 600; }
.admin-back { display: block; margin-top: 20px; padding: 10px 20px; color: var(--text-muted) !important; font-size: .85rem; }
.admin-main { flex: 1; padding: 32px 24px; overflow-x: auto; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 20px; text-align: center; border-top: 4px solid var(--coral);
}
.stat-coral { border-top-color: var(--coral); }
.stat-teal { border-top-color: var(--teal); }
.stat-gold { border-top-color: var(--gold); }
.stat-blue { border-top-color: var(--blue); }
.stat-num { font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700; }
.stat-label { color: var(--text-secondary); font-size: .85rem; margin-top: 4px; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--bg-input); padding: 12px 14px; text-align: left;
  font-family: var(--font-heading); font-weight: 600; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .5px; border-bottom: 2px solid var(--divider);
}
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--divider); font-size: .9rem; color: var(--text-secondary); }
.admin-table tbody tr:nth-child(odd) { background: var(--bg-card); }
.admin-table tbody tr:nth-child(even) { background: var(--bg-primary); }
.admin-table tbody tr:hover { background: var(--bg-activity); }
.admin-table a { color: var(--blue); }

.admin-table-wrap { overflow-x: auto; }
.sortable-table th.sortable { cursor: pointer; }
.sortable-table th.sortable::after { content: ' \25B4\25BE'; font-size: .7em; color: var(--text-muted); margin-left: 4px; }

.tier-select, .tier-select-lg { background: var(--bg-input); border: 1px solid var(--divider); color: var(--text-primary); padding: 4px 8px; border-radius: 4px; font-size: .85rem; }
.mini-progress { width: 60px; height: 6px; background: var(--bg-input); border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 6px; }
.mini-fill { height: 100%; background: var(--teal); border-radius: 3px; }
.progress-bar { width: 100%; height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--teal); border-radius: 4px; transition: width .4s ease; }

.tier-breakdown { margin-bottom: 24px; }
.tier-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tier-bar-label { min-width: 100px; font-weight: 600; font-size: .9rem; }
.tier-bar-fill { background: var(--coral); padding: 4px 12px; border-radius: var(--radius-badge); color: #fff; font-size: .8rem; font-weight: 600; min-width: 30px; text-align: center; }
.override-form { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.override-form label { color: var(--text-secondary); font-size: .9rem; }
.override-form input[type="number"] { background: var(--bg-input); border: 1px solid var(--divider); color: var(--text-primary); padding: 6px 10px; border-radius: 4px; width: 80px; }
.tier-form { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.export-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 32px 24px; transition: border-color .2s; text-decoration: none; color: var(--text-primary);
}
.export-card:hover { border-color: var(--teal); color: var(--text-primary); }
.export-card p { color: var(--text-secondary); }

.survey-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 24px; }
.survey-result-card { background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: 20px; }
.survey-result-card h3 { font-size: .95rem; margin-bottom: 8px; }
.survey-stars-display { display: flex; align-items: center; gap: 4px; }
.survey-avg { margin-left: 8px; font-weight: 600; font-size: .9rem; }
.feedback-card { background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: 16px 20px; margin-bottom: 12px; }
.feedback-text { font-style: italic; color: var(--text-secondary); }

/* ==========================================================================
   FLASH MESSAGES
   ========================================================================== */
.flash {
  padding: 14px 20px; border-radius: var(--radius-input); margin-bottom: 20px; font-size: .9rem;
  display: flex; align-items: center; justify-content: space-between; animation: flashIn .3s ease;
}
.flash-success { background: rgba(46,111,216,.15); border: 1px solid var(--teal); color: var(--teal); }
.flash-error { background: rgba(233,69,96,.15); border: 1px solid var(--coral); color: var(--coral); }
.flash-warning { background: rgba(255,193,7,.15); border: 1px solid var(--gold); color: var(--gold); }
.flash-info { background: rgba(74,158,255,.15); border: 1px solid var(--blue); color: var(--blue); }
.flash-dismiss { background: none; border: none; color: inherit; cursor: pointer; font-size: 1.2rem; padding: 0 0 0 12px; opacity: .7; }
.flash-dismiss:hover { opacity: 1; }
.flash.fade-out { animation: flashOut .4s ease forwards; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flashOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-8px); } }

/* ==========================================================================
   MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(13,13,26,.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card); border: 1px solid var(--divider); border-radius: var(--radius-card);
  padding: 32px; max-width: 500px; width: 90%; position: relative;
  transform: scale(.9); transition: transform .25s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text-primary); }

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.text-coral { color: var(--ind-orange) !important; }
.text-teal { color: var(--teal) !important; }
.text-gold { color: var(--ind-amber) !important; }
.text-blue { color: var(--ind-steel) !important; }
.text-muted { color: var(--text-muted) !important; }
.bg-coral { background: var(--coral) !important; }
.bg-teal { background: var(--teal) !important; }
.bg-gold { background: var(--gold) !important; }
.badge { display: inline-block; padding: 4px 12px; border-radius: var(--radius-badge); font-size: .75rem; font-weight: 700; }
.badge-coral { background: var(--coral); color: #fff; }
.badge-essentials { background: var(--blue); color: #fff; }
.badge-professional { background: var(--gold); color: var(--bg-primary); }
.badge-workshop { background: var(--coral); color: #fff; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
.text-center { text-align: center; }
.btn-full { width: 100%; }

/* Loading spinner */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
}
.spinner-sm { width: 14px; height: 14px; border-width: 1.5px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Save indicator pulse */
.save-pulse {
  animation: savePulse 1s ease;
}
@keyframes savePulse {
  0% { color: var(--teal); opacity: 1; }
  100% { opacity: 0; }
}

/* Skip to content link */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--teal); color: var(--bg-primary);
  padding: 8px 16px; border-radius: 0 0 8px 8px;
  font-weight: 700; z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   INTERACTIVE BREAKOUTS — Glassmorphism Design
   ========================================================================== */
.bo-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 80px;
}
.bo-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--divider); margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.bo-back {
  display: flex; align-items: center; gap: 6px;
  color: var(--text-secondary); font-size: .9rem; text-decoration: none;
  transition: color .2s;
}
.bo-back:hover { color: var(--text-primary); }
.bo-topbar-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
}
.bo-module-label {
  display: inline-block; padding: 2px 10px; border-radius: var(--radius-badge);
  font-size: .7rem; font-weight: 700; color: var(--bg-primary); text-transform: uppercase;
}
.bo-topbar-score { font-size: .9rem; }
.bo-completed-badge {
  display: inline-block; padding: 4px 14px; border-radius: var(--radius-badge);
  background: var(--teal); color: var(--bg-primary); font-weight: 700; font-size: .8rem;
}

/* Hero */
.bo-hero {
  text-align: center; padding: 32px 24px 24px; margin-bottom: 32px;
  border-bottom: 3px solid var(--bo-accent, var(--coral));
}
.bo-hero h1 {
  font-size: 2rem; margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary), var(--bo-accent, var(--coral)));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.bo-subtitle { color: var(--text-secondary); font-size: .9rem; }
.bo-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.bo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--divider); transition: background .3s, transform .3s;
}
.bo-dot.active { background: var(--bo-accent, var(--coral)); transform: scale(1.3); }

/* Glass Card Sections */
.glass-card {
  background: rgba(10,34,64,0.04);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 28px;
  transition: border-color .3s, box-shadow .3s;
}
.glass-card:hover {
  border-color: rgba(10,34,64,0.15);
  box-shadow: 0 8px 32px rgba(10,34,64,0.10);
}
.bo-section-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.bo-section-num {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  font-family: var(--font-heading); font-weight: 700; font-size: .85rem;
  color: var(--bg-primary); flex-shrink: 0;
}
.bo-section-header h2 { font-size: 1.3rem; margin: 0; }
.bo-section-body { display: flex; flex-direction: column; gap: 20px; }

/* Element: Heading */
.bo-el-heading { font-size: 1.1rem; color: var(--bo-accent, var(--coral)); margin-top: 8px; }

/* Element: Text */
.bo-el-text { color: var(--text-secondary); line-height: 1.7; font-size: .95rem; }
.bo-el-text strong { color: var(--text-primary); }
.bo-el-text code {
  background: var(--bg-input); padding: 2px 6px; border-radius: 4px;
  font-size: .85rem; color: var(--coral);
}

/* Element: Text Tables (reference tables inside handouts/breakouts) */
.bo-el-text table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 0.5rem 0; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(10,34,64,0.08);
}
.bo-el-text th {
  background: rgba(10,34,64,0.06); color: var(--text-primary);
  padding: 12px 16px; text-align: left; font-weight: 700;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .03em;
  border-bottom: 2px solid rgba(10,34,64,0.1);
}
.bo-el-text td {
  padding: 10px 16px; border-bottom: 1px solid rgba(10,34,64,0.05);
  font-size: .9rem; line-height: 1.6; color: var(--text-secondary);
  vertical-align: top;
}
.bo-el-text tr:last-child td { border-bottom: none; }
.bo-el-text tr:hover td { background: rgba(10,34,64,0.03); }
.bo-el-text tbody tr:nth-child(even) td { background: rgba(10,34,64,0.02); }
.bo-el-text td strong { color: var(--text-primary); }

/* Responsive: stack table on small screens */
@media (max-width: 640px) {
  .bo-el-text table, .bo-el-text thead, .bo-el-text tbody,
  .bo-el-text th, .bo-el-text td, .bo-el-text tr {
    display: block;
  }
  .bo-el-text thead tr {
    position: absolute; top: -9999px; left: -9999px;
  }
  .bo-el-text td {
    position: relative; padding: 10px 16px 10px 40%;
    border-bottom: 1px solid rgba(10,34,64,0.05);
    min-height: 40px;
  }
  .bo-el-text td::before {
    content: attr(data-label);
    position: absolute; left: 16px; top: 10px;
    font-weight: 700; font-size: .8rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .03em;
  }
  .bo-el-text tr { margin-bottom: 8px; border-radius: 8px; overflow: hidden; border: 1px solid rgba(10,34,64,0.06); }
}

/* Element: Inputs */
.bo-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.bo-label { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.bo-input, .bo-textarea {
  background: var(--bg-input);
  border: 1px solid var(--divider);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-input);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color .3s, box-shadow .3s;
  resize: vertical;
}
.bo-input:focus, .bo-textarea:focus {
  outline: none;
  border-color: var(--bo-accent, var(--coral));
  box-shadow: 0 0 0 3px rgba(233,69,96,0.15);
}
.bo-input::placeholder, .bo-textarea::placeholder { color: var(--text-muted); }
.bo-save-indicator {
  position: absolute; right: 12px; top: 36px;
  font-size: .75rem; color: var(--teal); opacity: 0;
  transition: opacity .3s;
}
.bo-save-indicator.show { opacity: 1; }

/* Element: Prompt Block */
.bo-prompt-block {
  background: #0B1526;
  border: 1px solid var(--divider);
  border-left: 4px solid var(--bo-accent, var(--coral));
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .3s;
}
.bo-prompt-block.glow {
  box-shadow: 0 0 20px rgba(46,111,216,0.3);
}
.bo-prompt-text {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: .85rem;
  line-height: 1.7;
  color: #E8EDF4;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  background: none;
  border: none;
}
.bo-copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-end;
  background: var(--bg-card); border: 1px solid var(--divider);
  color: var(--text-secondary); padding: 8px 14px; border-radius: 6px;
  cursor: pointer; font-size: .8rem; transition: all .2s;
  flex-shrink: 0;
}
.bo-copy-btn:hover { border-color: var(--teal); color: var(--teal); }
.bo-copy-btn.copied { background: var(--teal); color: var(--bg-primary); border-color: var(--teal); }

/* Element: Checklist */
.bo-checklist { display: flex; flex-direction: column; gap: 8px; }
.bo-check-item {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 8px 12px; border-radius: 8px;
  background: var(--bg-input); transition: background .2s;
}
.bo-check-item:hover { background: var(--bg-activity); }
.bo-check-item input[type="checkbox"] { display: none; }
.bo-check-box {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--divider); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.bo-check-item input:checked ~ .bo-check-box {
  background: var(--bo-accent, var(--coral)); border-color: var(--bo-accent, var(--coral));
}
.bo-check-item input:checked ~ .bo-check-box::after {
  content: '';
  width: 6px; height: 10px;
  border: solid var(--bg-primary); border-width: 0 2px 2px 0;
  transform: rotate(45deg); margin-top: -2px;
}
.bo-check-label { font-size: .95rem; }

/* Element: Radio Group */
.bo-radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.bo-radio-item {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 8px 16px; border-radius: 8px;
  background: var(--bg-input); border: 1px solid var(--divider);
  transition: all .2s; font-size: .9rem;
}
.bo-radio-item:hover { border-color: var(--bo-accent, var(--coral)); }
.bo-radio-item input[type="radio"] { display: none; }
.bo-radio-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--divider); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.bo-radio-item input:checked ~ .bo-radio-dot {
  border-color: var(--bo-accent, var(--coral));
}
.bo-radio-item input:checked ~ .bo-radio-dot::after {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--bo-accent, var(--coral));
}
.bo-radio-item input:checked + .bo-radio-dot + span { color: var(--text-primary); font-weight: 600; }

/* Element: Rating (Stars) */
.bo-rating { display: flex; gap: 6px; }
.bo-star {
  font-size: 1.6rem; cursor: pointer; color: var(--text-muted);
  transition: color .15s, transform .15s; user-select: none;
}
.bo-star:hover { transform: scale(1.2); }
.bo-star.filled { color: var(--gold); }

/* Element: Table Fill */
.bo-table-wrap { overflow-x: auto; margin: 4px 0; }
.bo-table {
  width: 100%; border-collapse: collapse; font-size: .9rem;
}
.bo-table thead th {
  background: rgba(10,34,64,0.06); padding: 10px 12px;
  text-align: left; font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-secondary); border-bottom: 2px solid var(--divider);
  white-space: nowrap;
}
.bo-table tbody td {
  padding: 4px 6px; border-bottom: 1px solid rgba(10,34,64,0.04);
  vertical-align: middle;
}
.bo-table tbody tr:hover { background: rgba(10,34,64,0.02); }
.bo-table-prefill {
  font-weight: 600; color: var(--text-secondary); padding: 10px 12px !important;
  white-space: nowrap; font-size: .85rem;
}
.bo-table-input {
  width: 100%; background: rgba(10,34,64,0.04);
  border: 1px solid rgba(10,34,64,0.08); border-radius: 6px;
  color: var(--text-primary); padding: 8px 10px; font-size: .85rem;
  font-family: inherit; transition: border-color .2s;
}
.bo-table-input:focus {
  outline: none; border-color: var(--bo-accent, var(--coral));
  background: rgba(10,34,64,0.06);
}

/* Complete Button */
.bo-complete-wrap { text-align: center; padding: 24px 0; }
.btn-complete-breakout {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 36px; border: 2px solid var(--bo-accent, var(--coral));
  background: rgba(10,34,64,0.04);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary); font-family: var(--font-heading);
  font-weight: 700; font-size: 1.1rem; cursor: pointer;
  border-radius: 16px; transition: all .3s;
}
.btn-complete-breakout:hover {
  background: var(--bo-accent, var(--coral)); color: var(--bg-primary);
  box-shadow: 0 0 30px rgba(233,69,96,0.4);
  transform: translateY(-2px);
}
.bo-already-done {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px; text-align: center;
}
.bo-already-done h3 { color: var(--teal); }

/* Confetti Canvas */
#confettiCanvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999;
}

/* Score Ring (Dashboard) */
.score-ring-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.score-ring-wrap .ring-label { font-size: .8rem; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }
.score-ring-wrap .ring-value { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; }
.level-badge-lg {
  display: inline-block; padding: 6px 20px; border-radius: var(--radius-badge);
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  color: #fff; letter-spacing: 1px;
  box-shadow: 0 2px 12px rgba(10,34,64,0.10);
}

/* Score breakdown on dashboard */
.score-breakdown {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-top: 12px;
}
.score-break-item {
  text-align: center; padding: 8px;
  background: var(--bg-input); border-radius: 8px;
}
.score-break-item .sb-val { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; }
.score-break-item .sb-label { font-size: .7rem; color: var(--text-secondary); text-transform: uppercase; }

/* Dashboard dual rings */
.dash-rings {
  display: flex; align-items: center; justify-content: center; gap: 32px;
}
.dash-progress-ring { position: relative; width: 110px; height: 110px; text-align: center; }
.ring-sublabel {
  display: block; font-size: .75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; text-align: center;
  margin-top: 4px;
}
.score-ring-wrap { position: relative; text-align: center; }
.score-ring-wrap .ring-svg { width: 140px; height: 140px; }
.score-ring-wrap .ring-label {
  position: absolute; inset: 0; width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 2rem; font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(255,193,7,0.4);
  pointer-events: none;
}
.score-ring-wrap .ring-sublabel {
  color: var(--gold); font-weight: 600;
}

/* Module breakout links */
.mod-breakouts {
  display: flex; flex-direction: column; gap: 4px; margin-top: 8px;
  padding-top: 8px; border-top: 1px solid var(--divider);
}
.mod-breakout-link {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--text-secondary);
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  transition: background .2s, color .2s;
}
.mod-breakout-link:hover { background: var(--bg-activity); color: var(--text-primary); }
.mod-breakout-link.done { color: var(--teal); }
.mod-breakout-link.done i { color: var(--teal); }

/* Glow animation */
@keyframes glowPulse {
  0% { box-shadow: 0 0 5px rgba(46,111,216,0.3); }
  50% { box-shadow: 0 0 25px rgba(46,111,216,0.5); }
  100% { box-shadow: 0 0 5px rgba(46,111,216,0.3); }
}

/* Celebration animation */
@keyframes celebratePop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
.celebrate { animation: celebratePop .5s ease forwards; }

/* ==========================================================================
   RESPONSIVE — Tablet (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .module-selector { grid-template-columns: repeat(2, 1fr); }
  .tool-cards { grid-template-columns: repeat(2, 1fr); }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .pres-stage { padding: 2rem 5rem; }
}

/* ==========================================================================
   RESPONSIVE — Desktop (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  .pres-slide-title { font-size: 2.2rem; }
  .pres-slide-content { font-size: 1.05rem; }
  .pres-stage { padding: 2rem 6rem; }
  .tool-cards { grid-template-columns: repeat(4, 1fr); }
  .resource-grid { grid-template-columns: repeat(3, 1fr); }
  .container { padding: 0 32px; }
}

/* ==========================================================================
   RESPONSIVE -- Tablets & Small Laptops (768px)
   ========================================================================== */
@media (max-width: 768px) {
  .pres-stage { padding: 1.5rem 1rem; }
  .pres-slide { padding: 2rem 1.5rem; }
  .pres-slide-title { font-size: 1.4rem; }
  .pres-arrow { width: 36px; height: 36px; font-size: 0.9rem; }
  .pres-arrow-left { left: 0.25rem; }
  .pres-arrow-right { right: 0.25rem; }
  .pres-drawer { width: 280px; }
  .pres-slide-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pres-slide-content th, .pres-slide-content td { white-space: nowrap; }
  .module-selector { grid-template-columns: 1fr 1fr; }
  .dash-hero { flex-direction: column; text-align: center; gap: 20px; }
  .dash-rings { justify-content: center; }
  .score-breakdown { flex-wrap: wrap; }
}

/* ==========================================================================
   RESPONSIVE -- Small Phones (480px)
   ========================================================================== */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  .dash-hero { flex-direction: column; text-align: center; gap: 20px; }
  .dash-rings { justify-content: center; }
  .ring-svg { width: 90px; height: 90px; }
  .score-breakdown { grid-template-columns: 1fr; }
  .bo-topbar { flex-direction: column; align-items: flex-start; }
  .bo-radio-group { flex-direction: column; }
  .pres-slide-title { font-size: 1.3rem; }
  .module-selector { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .pres-drawer { width: 100%; }
  .pres-stage { padding: 1rem 0.5rem; }
  .pres-slide { padding: 1.5rem 1rem; }
  .pres-slide-content table { font-size: 0.85rem; }
  .pres-slide-content th, .pres-slide-content td { padding: 6px 8px; }
}

/* ==========================================================================
   RESPONSIVE -- Large Desktop (1440px+)
   ========================================================================== */
@media (min-width: 1440px) {
  .container { max-width: 1200px; margin: 0 auto; }
  .module-selector { grid-template-columns: repeat(4, 1fr); }
  .pres-stage { padding: 2rem 8rem; }
}

/* ==========================================================================
   PROFILE PAGE
   ========================================================================== */
.profile-container {
  max-width: 700px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
.profile-card {
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: var(--radius-card);
  padding: 2rem;
  margin-bottom: 2rem;
}
.profile-card h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.profile-card h2 i {
  color: var(--coral);
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--coral), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-heading);
  flex-shrink: 0;
}
.profile-meta {
  flex: 1;
}
.profile-meta h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.profile-meta p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.profile-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}
.profile-stat {
  background: rgba(10,34,64,0.04);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
}
.profile-stat .stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--aas-navy, #0A2240);
}
.profile-stat .stat-lbl {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}
.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* ==========================================================================
   AI TOOL LAUNCHER BUTTONS
   ========================================================================== */
.ai-launcher {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(10,34,64,0.08);
}
.ai-launcher-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.ai-launcher-label i {
  margin-right: 0.4rem;
  color: var(--teal);
}
.ai-launcher-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.ai-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: rgba(10,34,64,0.04);
  border: 1px solid rgba(10,34,64,0.1);
  border-radius: 10px;
  color: var(--aas-text, #111827);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}
.ai-launch-btn i {
  font-size: 1.1rem;
  color: var(--tool-color, var(--teal));
}
.ai-launch-btn:hover {
  background: var(--tool-color, var(--teal));
  color: #fff;
  border-color: var(--tool-color, var(--teal));
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(10,34,64,0.10), 0 0 20px color-mix(in srgb, var(--tool-color, var(--teal)) 30%, transparent);
}
.ai-launch-btn:hover i {
  color: #fff;
}

@media (max-width: 480px) {
  .ai-launcher-btns { flex-direction: column; }
  .ai-launch-btn { justify-content: center; }
}

/* ==========================================================================
   QUIZ PAGE — Premium Styles
   ========================================================================== */
.quiz-form {
  max-width: 800px;
  margin: 0 auto;
}

.question-card {
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.question-card:hover {
  border-color: rgba(10,34,64,0.14);
  box-shadow: 0 4px 24px rgba(10,34,64,.08);
}
.question-card.correct {
  border-left: 4px solid var(--teal);
}
.question-card.incorrect {
  border-left: 4px solid var(--coral);
}
.question-card.neutral {
  border-left: 4px solid rgba(10,34,64,0.15);
}

.question-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  display: block;
}

.question-num {
  background: var(--ind-orange);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.question-module {
  display: inline-block;
  background: rgba(46,111,216,0.12);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-badge);
  margin-left: 0.5rem;
  vertical-align: middle;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-label {
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: all 0.2s ease;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.option-label:hover {
  border-color: rgba(10,34,64,0.28);
  background: rgba(10,34,64,0.05);
}
.option-label input[type="radio"] {
  display: none;
}
.option-label input:checked + .option-radio {
  border-color: var(--ind-orange);
  background: transparent;
}
.option-label input:checked + .option-radio::after {
  transform: scale(1);
  opacity: 1;
}
.option-label input:checked ~ * {
  color: var(--text-primary);
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(10,34,64,0.30);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s ease;
}
.option-radio::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  background: var(--ind-orange);
  border-radius: 50%;
  transform: scale(0);
  opacity: 0;
  transition: all 0.2s ease;
}

.option-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(10,34,64,0.06);
  border: 1px solid rgba(10,34,64,0.1);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.option-label:hover .option-key {
  border-color: rgba(10,34,64,0.30);
  color: var(--text-secondary);
}

/* Review mode options */
.options-review {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.options-review .option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  background: rgba(10,34,64,0.02);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}
.options-review .option .option-key {
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
}
.options-review .option i {
  margin-left: auto;
  font-size: 0.85rem;
}
.option-correct {
  background: rgba(46,111,216,0.08) !important;
  border-color: rgba(46,111,216,0.25) !important;
  color: var(--teal) !important;
}
.option-correct .option-key {
  background: rgba(46,111,216,0.15);
  border-color: rgba(46,111,216,0.3);
  color: var(--teal);
}
.option-correct i { color: var(--teal); }

.option-wrong {
  background: rgba(233,69,96,0.08) !important;
  border-color: rgba(233,69,96,0.25) !important;
  color: var(--coral) !important;
}
.option-wrong .option-key {
  background: rgba(233,69,96,0.15);
  border-color: rgba(233,69,96,0.3);
  color: var(--coral);
}
.option-wrong i { color: var(--coral); }

/* Confidence slider — premium */
.confidence-slider {
  margin-top: 0.75rem;
}
.confidence-slider input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px; /* ≥44px touch target — visual track drawn via background */
  background: linear-gradient(90deg, rgba(201,162,39,0.35), rgba(201,162,39,0.6)) center/100% 6px no-repeat;
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}
.confidence-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 44px;  /* 44px hit area; visible circle = 28px via transparent border */
  height: 44px;
  background: var(--ind-amber);
  background-clip: padding-box;
  border: 8px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255,176,32,0.4);
  transition: box-shadow 0.2s ease;
}
.confidence-slider input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 14px rgba(255,176,32,0.6);
}
.confidence-slider input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: var(--ind-amber);
  border-radius: 50%;
  cursor: pointer;
  border: 8px solid transparent;
  background-clip: padding-box;
  box-shadow: 0 0 8px rgba(255,176,32,0.4);
}
.slider-value {
  display: inline-block;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ind-amber);
  margin-left: 0.75rem;
  min-width: 1.5em;
  text-align: center;
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Confidence bar (review mode) */
.confidence-result {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.confidence-value {
  font-weight: 700;
  color: var(--teal);
  font-size: 1.1rem;
}
.confidence-bar {
  width: 100%;
  height: 8px;
  background: rgba(10,34,64,0.06);
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: 4px;
  transition: width 0.6s ease;
}

/* ==========================================================================
   QUIZ RESULTS — Premium Styles
   ========================================================================== */
.quiz-results-card {
  max-width: 480px;
  margin: 0 auto 2.5rem;
  text-align: center;
  padding: 2.5rem;
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.quiz-results-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: 1rem;
}

.quiz-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 5px solid rgba(10,34,64,0.1);
  position: relative;
  background: rgba(10,34,64,0.02);
}
.score-circle .score-num {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.score-pass {
  border-color: var(--teal);
  box-shadow: 0 0 30px rgba(46,111,216,0.2), inset 0 0 20px rgba(46,111,216,0.05);
}
.score-pass .score-num {
  color: var(--teal);
}
.score-review {
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(255,193,7,0.2), inset 0 0 20px rgba(255,193,7,0.05);
}
.score-review .score-num {
  color: var(--gold);
}

.quiz-review {
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* ==========================================================================
   CERTIFICATE PAGE — Premium Styles
   ========================================================================== */
.certificate {
  max-width: 900px;
  margin: 0 auto 2rem;
  background: rgba(10,34,64,0.02);
  border-radius: 16px;
  overflow: hidden;
}

.cert-border {
  border: 3px solid transparent;
  /* Even gold frame (certs-brand 2026-08-06): the old navy->gold->navy ramp read
     lopsided because a 135deg gradient hits each edge at a different point. */
  border-image: linear-gradient(135deg, #C9A227, #E8CE7A 25%, #C9A227 50%, #E8CE7A 75%, #C9A227) 1;
  padding: 4px;
  position: relative;
}
.cert-border::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(201,162,39,0.35);
  pointer-events: none;
}

.cert-inner {
  padding: 3.5rem 3rem;
  text-align: center;
  background: #FFFFFF;
}

.cert-header-decoration {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #C9A227, #E8CE7A, #C9A227);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.cert-pretitle {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cert-title {
  font-family: var(--font-heading);
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #0A2240, #1B4C9E, #0A2240);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.cert-divider {
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201,162,39,0.55), transparent);
  margin: 1.5rem auto;
}

.cert-text {
  color: var(--aas-text, #111827);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cert-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #A8871D;
  margin: 0.75rem 0;
  letter-spacing: 0.02em;
}

.cert-course {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--aas-accent, #2E6FD8);
  margin: 0.5rem 0 1.5rem;
}

.cert-details {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.cert-details span {
  padding: 0.4rem 1rem;
  background: rgba(46,111,216,0.06);
  border: 1px solid rgba(46,111,216,0.25);
  border-radius: var(--radius-badge);
  color: var(--aas-slate, #42526B);
}

.cert-instructors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 500px;
  margin: 1.5rem auto 1rem;
}
/* Single account-owner signature (2026-08-06): one centered column so the
   certificate stays balanced instead of leaning to the left half. */
.cert-instructors.cert-signatures--single {
  grid-template-columns: 1fr;
  max-width: 260px;
  margin: 1.75rem auto 1rem;
}
.cert-instructors.cert-signatures--single .cert-sig-line {
  width: 200px;
}
.cert-instructor {
  text-align: center;
}
.cert-instructor p {
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.cert-instructor .text-muted {
  font-size: 0.8rem;
}

.cert-sig-line {
  width: 120px;
  height: 2px;
  background: rgba(10,34,64,0.4);
  margin: 0 auto 0.5rem;
}

.cert-verify {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
  word-break: break-all;
}

/* AAS contrast lock 2026-08-06 (certs-brand lane): the certificate body is white
   paper, so text colors are pinned to the light palette regardless of what the
   admin-configurable inline colors happen to be. Applies to the learner-facing
   certificate (#certificate) AND the admin live preview (#certPreview). */
#certificate, #certPreview { background: #FFFFFF !important; }
#certificate .cert-inner, #certPreview .cert-inner { background: #FFFFFF !important; }
#certificate .cert-text,  #certPreview .cert-text  { color: var(--aas-ink, #111827) !important; }
#certificate .cert-title, #certPreview .cert-title { color: var(--aas-navy, #0A2240) !important; -webkit-text-fill-color: var(--aas-navy, #0A2240); }
#certificate .cert-pretitle, #certPreview .cert-pretitle { color: #A8871D !important; }
#certificate .cert-name,  #certPreview .cert-name  { color: #A8871D !important; }
#certificate .cert-course, #certPreview .cert-course { color: var(--aas-navy, #0A2240) !important; }
#certificate .cert-verify-code, #certPreview .cert-verify-code { color: #A8871D !important; }
#certificate .cert-details, #certificate .cert-details span,
#certPreview .cert-details, #certPreview .cert-details span { color: var(--aas-slate, #42526B) !important; }
#certificate .cert-score-breakdown, #certPreview .cert-score-breakdown { color: var(--aas-slate, #42526B) !important; opacity: 1 !important; }
#certificate .cert-instructor p, #certPreview .cert-instructor p { color: var(--aas-navy, #0A2240) !important; }
#certificate .cert-instructor .text-muted, #certPreview .cert-instructor .text-muted { color: var(--aas-slate, #42526B) !important; }
#certificate .cert-verify, #certPreview .cert-verify { color: var(--aas-slate, #42526B) !important; opacity: 1 !important; }

/* Certificate not ready / requirements */
.cert-not-ready {
  max-width: 560px;
  margin: 2rem auto;
  text-align: center;
  padding: 2.5rem;
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.cert-not-ready h2 {
  font-family: var(--font-heading);
  margin: 1rem 0 0.5rem;
}

.cert-checklist {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}
.cert-checklist li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  background: rgba(10,34,64,0.02);
  border: 1px solid rgba(10,34,64,0.06);
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.cert-checklist li.done {
  border-color: rgba(46,111,216,0.2);
  background: rgba(46,111,216,0.05);
  color: var(--teal);
}
.cert-checklist li i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.cert-actions {
  text-align: center;
  margin-bottom: 2rem;
}
.cert-download {
  font-size: 1.1rem;
  padding: 0.85rem 2rem;
}

/* Verification card */
.verify-card {
  max-width: 500px;
  margin: 3rem auto;
  text-align: center;
  padding: 2.5rem;
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.verify-card h2 {
  font-family: var(--font-heading);
  margin: 1rem 0 0.5rem;
}
.verify-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   SURVEY PAGE — Premium Styles
   ========================================================================== */
.survey-form {
  max-width: 700px;
  margin: 0 auto;
}

.survey-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.survey-row:hover {
  border-color: rgba(10,34,64,0.14);
  box-shadow: 0 2px 16px rgba(10,34,64,.06);
}

.survey-label h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.survey-label p {
  font-size: 0.85rem;
  line-height: 1.4;
}

.star-rating {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.star {
  font-size: 1.6rem;
  cursor: pointer;
  color: rgba(10,34,64,0.12);
  transition: color 0.15s ease, transform 0.15s ease;
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}
.star:hover {
  transform: scale(1.15);
}
.star.active,
.star.filled,
.star.hovered {
  color: var(--gold);
}

.survey-feedback {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 12px;
}
.survey-feedback h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.survey-feedback textarea {
  width: 100%;
  background: rgba(10,34,64,0.04);
  border: 1px solid rgba(10,34,64,0.1);
  border-radius: 10px;
  padding: 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease;
  outline: none;
}
.survey-feedback textarea:focus {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(233,69,96,0.1);
}

.survey-thanks {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(10,34,64,0.03);
  border: 1px solid rgba(10,34,64,0.08);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.survey-thanks h1 {
  font-family: var(--font-heading);
  margin: 1rem 0 0.5rem;
  background: linear-gradient(135deg, var(--coral), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.survey-thanks p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   PRINT STYLES — Certificate
   ========================================================================== */
@media print {
  .certificate {
    background: #fff !important;
    max-width: none;
    width: 100%;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }
  .cert-border {
    border: 3px solid #C9A227 !important; /* AAS gold frame on paper */
    border-image: none !important;
  }
  .cert-border::before {
    border-color: #E3D6A8;
  }
  .cert-inner {
    background: #fff !important;
    padding: 2.5rem 2rem;
  }
  .cert-header-decoration {
    background: #C9A227;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cert-pretitle {
    color: #A8871D;
  }
  .cert-title {
    background: none;
    -webkit-text-fill-color: #0A2240;
    color: #0A2240;
    font-size: 2rem;
  }
  .cert-divider {
    background: #D9DFE8;
  }
  .cert-text {
    color: #111827;
  }
  .cert-name {
    color: #A8871D;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cert-course {
    color: #0A2240;
  }
  .cert-details {
    color: #42526B;
  }
  .cert-details span {
    background: #F4F6F9;
    border-color: #D9DFE8;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cert-sig-line {
    background: #B9C3D1;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .cert-instructor p,
  .cert-instructor .text-muted {
    color: #0A2240;
  }
  .cert-verify {
    color: #42526B;
  }
  .cert-actions,
  .no-print {
    display: none !important;
  }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   MOBILE RESPONSIVENESS SWEEP — Launch Hardening
   Added 2026-05-06 for May 15 launch.
   - Eliminates horizontal scroll caused by .nav-user crowding on logged-in pages
   - Enforces 44x44 minimum tap targets on small screens
   - Reflows onboarding tour, modals, dashboard rings, breakout links cleanly
   - Keeps Vimeo iframes 16:9
   ========================================================================== */

/* --- Global guardrails: stop horizontal scroll on every page --- */
@media (max-width: 1024px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  /* Safety: long URLs / no-break tokens shouldn't blow out cards */
  .pres-slide-content, .question-card, .resource-card, .module-card,
  .price-card, .profile-card, .tt-card, .score-card, .dash-card,
  .breakout-card, .arcade-card, .menu-mgr-card, .roadmap-card {
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  /* Images and iframes never blow out their container */
  img, iframe, video, embed, object {
    max-width: 100%;
    height: auto;
  }
}

/* --- Top nav: collapse the right-hand cluster cleanly under 1024px.
   On mobile the drawer (mobile-fixes.css) keeps .site-nav a single 64px row and
   moves the secondary links into a slide-in panel, so the nav no longer wraps to
   two rows. --- */
/* 2026-07-11 (#8): ONE authoritative mobile --nav-height. This used to be 112px here
   and 64px in mobile-fixes.css — they only reconciled by load order. Both are now 64px
   (the real single-row nav height forced by mobile-fixes.css `.site-nav{height:64px}`).
   NAV MATH: mobile nav = 64px visible => --nav-height:64px, so dashboard content and the
   sticky offsets align. In the presenter the nav is hidden (module.php #7) and .pres uses
   top:0, so --nav-height is not consumed there. */
@media (max-width: 1024px) {
  :root {
    --nav-height: 64px; /* matches the single-row mobile nav (mobile-fixes.css) */
  }
  .site-nav {
    flex-wrap: wrap !important;
    row-gap: 0.5rem !important;
    padding-right: 1rem !important;
    padding-left: 1rem !important;
    height: auto !important;
    min-height: 64px !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
  .nav-user {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    max-width: 100%;
  }
  /* Hide secondary identity chips on small screens to give room for actions */
  .nav-user .nav-user-name {
    display: none !important;
  }
  .nav-user .tier-badge {
    display: none !important;
  }
  /* Kiosk/fullscreen toggle is a desktop convenience — hide on mobile */
  .nav-fs-btn {
    display: none !important;
  }
}

/* --- Below 768px: tighten further and ensure tap-target minimums.
   header.php inline <style> loads AFTER style.css, so nav-cluster
   rules need !important to win. --- */
@media (max-width: 768px) {
  .site-nav {
    padding: 0.5rem 0.75rem !important;
    gap: 0.4rem !important;
  }
  .nav-user {
    gap: 0.4rem !important;
  }
  /* Bigger tap targets in nav (WCAG 2.5.5: 44x44 ideal) */
  .nav-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
  }
  .notif-bell {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem !important;
  }
  /* nav-fs-btn is hidden on mobile via the 1024px block above; if it's
     ever shown (e.g. body.kiosk-mode override), keep it tap-friendly. */
  .nav-fs-btn:not([hidden]) {
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
  }
  .tt-help-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem !important;
    font-size: 1rem !important;
  }
  .nav-credit-pill {
    min-height: 44px !important;
    padding: 0.55rem 0.85rem !important;
    font-size: 0.8rem !important;
  }
  .nav-logout {
    min-height: 44px !important;
    padding: 0.6rem 0.9rem !important;
    font-size: 0.85rem !important;
  }
  /* Generic CTA min-height for any button or .btn on mobile */
  button, .btn, input[type="button"], input[type="submit"] {
    min-height: 44px;
  }
  /* Nav links list (when expanded via hamburger) — bigger touch rows */
  .nav-links a, .nav-group-toggle, .nav-group-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* --- Below 480px: small phones; hide credit pill text but keep icon
   NOTE: header.php loads its <style> block AFTER style.css, so we use
   !important to override inline rules for the nav cluster. --- */
@media (max-width: 480px) {
  /* Drop credit pill amount below 480 to free horizontal space; keep clickable icon */
  .nav-credit-pill {
    font-size: 0 !important; /* hide text */
    padding: 0.5rem 0.65rem !important;
    min-width: 44px !important;
    min-height: 44px !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  .nav-credit-pill i {
    font-size: 1rem !important;
  }
  /* But "empty" state should still attract attention with a "+" hint */
  .nav-credit-pill.empty::after {
    content: "+";
    font-size: 0.85rem;
    font-weight: 800;
    margin-left: 0.15rem;
  }
  /* Site nav padding */
  .site-nav {
    padding: 0.5rem 0.6rem !important;
  }
  /* Nav brand a touch smaller */
  .nav-brand img {
    height: 28px !important;
  }
  /* Logout becomes icon-style at 480- */
  .nav-logout {
    padding: 0.5rem 0.7rem !important;
    font-size: 0.8rem !important;
  }
}

/* --- Onboarding tour (.tt-card / .tt-overlay / .tt-confirm): keep on screen
   The tour JS injects styles with .tt-card.tt-center using
   transform: translate(-50%,-50%) which, combined with the JS-injected
   media query at 640px that resets width to calc(100vw - 24px),
   drags the card off the left edge. We override the transform on small
   screens so left:12px positions the card correctly. --- */
@media (max-width: 640px) {
  .tt-card.tt-center,
  .tt-card.tt-center.tt-show {
    left: 12px !important;
    right: 12px !important;
    top: 50% !important;
    width: auto !important;
    max-width: calc(100vw - 24px) !important;
    /* Remove horizontal translate; keep only vertical centering */
    transform: translateY(-50%) !important;
  }
  .tt-card {
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box;
  }
}
@media (max-width: 480px) {
  .tt-card.tt-center,
  .tt-card.tt-center.tt-show {
    left: 8px !important;
    right: 8px !important;
    max-width: calc(100vw - 16px) !important;
  }
  .tt-card h3 {
    font-size: 1.1rem !important;
    line-height: 1.3;
  }
  .tt-card p {
    font-size: 0.9rem;
  }
}
/* Generic fallback for other tour-like overlays */
@media (max-width: 768px) {
  [class*="aas-tour"],
  [class*="tour-overlay"],
  .tour-card {
    left: 1rem !important;
    right: 1rem !important;
    max-width: calc(100vw - 2rem) !important;
    box-sizing: border-box;
  }
}

/* --- Dashboard rings + score widgets: stack & resize for narrow screens --- */
@media (max-width: 768px) {
  .dash-rings {
    flex-wrap: wrap;
    gap: 1rem;
  }
  .ring-svg {
    max-width: 100%;
    height: auto;
  }
  .score-whats-left-btn {
    min-height: 44px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
  .mod-breakout-link {
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
  }
}

/* --- Slide presenter (.pres-*) reflow on small screens --- */
@media (max-width: 768px) {
  .pres-topbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
  }
  .pres-counter {
    font-size: 0.85rem;
  }
  /* Vimeo iframes: enforce 16:9 with padding-bottom pattern as backup */
  .pres-slide-content iframe[src*="vimeo"],
  .pres-video iframe,
  iframe[src*="player.vimeo.com"],
  iframe[src*="youtube.com/embed"] {
    width: 100% !important;
    aspect-ratio: 16 / 9;
    height: auto;
  }
  /* Legacy fallback wrapper if no aspect-ratio support */
  .video-embed, .vimeo-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
  }
  .video-embed iframe, .vimeo-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

/* --- Forms: full-width inputs on small phones, comfortable height --- */
@media (max-width: 768px) {
  input[type="text"], input[type="email"], input[type="password"],
  input[type="tel"], input[type="number"], input[type="search"],
  input[type="url"], textarea, select {
    width: 100%;
    min-height: 44px;
    font-size: 16px; /* prevent iOS zoom on focus */
    box-sizing: border-box;
  }
  textarea {
    min-height: 96px;
  }
  label {
    font-size: 0.95rem;
  }
}

/* --- Tables that don't already scroll: enable horizontal scroll on mobile --- */
@media (max-width: 768px) {
  .admin-table-wrap, .data-table-wrap, .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table:not(.no-mobile-scroll) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}

/* --- Pricing cards / module cards / tool cards: 1-up below 768 --- */
@media (max-width: 768px) {
  .pricing-grid, .price-cards, .price-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .module-selector, .tool-cards, .resource-grid, .card-grid {
    gap: 0.85rem;
  }
}

/* --- Admin Menu Manager 2-col grid collapses to 1-col --- */
@media (max-width: 768px) {
  .menu-manager-grid, .menu-mgr-grid, .admin-grid-2col {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
}

/* --- Modals & dropdowns stay on-screen (notif dropdown is already done in header inline) --- */
@media (max-width: 768px) {
  .modal, .modal-dialog, .dialog, [role="dialog"] {
    max-width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }
  .modal-body, .dialog-body {
    padding: 1rem;
  }
}

/* --- Footer: stack columns and pad properly on phones --- */
@media (max-width: 768px) {
  footer.footer, .site-footer {
    padding: 1.5rem 1rem;
  }
  .footer-grid, .footer-cols {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
    text-align: center;
  }
}

/* --- Container side padding tightens on tiny screens --- */
@media (max-width: 480px) {
  .container {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }
  h1 { font-size: 1.5rem; line-height: 1.2; }
  h2 { font-size: 1.25rem; line-height: 1.25; }
  h3 { font-size: 1.1rem; }
  p, li { font-size: 0.95rem; }
  .small, small { font-size: 0.85rem; }
}

/* --- Notification dropdown: fix off-screen at narrow widths (notif-dropdown rule lives in header.php inline; we provide a safety net here) --- */
@media (max-width: 480px) {
  .notif-dropdown {
    position: fixed !important;
    top: 64px !important;
    left: 0.5rem !important;
    right: 0.5rem !important;
    width: auto !important;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
}

/* --- Profile page: shrink avatar & form padding --- */
@media (max-width: 480px) {
  .profile-container {
    padding: 0 0.85rem;
    margin-top: 1rem;
  }
  .profile-card {
    padding: 1.25rem 1rem;
  }
}

/* --- Quiz / certificate / roadmap: comfortable padding --- */
@media (max-width: 768px) {
  .quiz-form, .roadmap-grid, .cert-grid {
    padding: 0 0.5rem;
  }
  .question-card {
    padding: 1.25rem 1rem;
  }
  .question-num {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
}

/* --- Buttons get visible focus ring on mobile keyboard nav --- */
@media (max-width: 768px) {
  button:focus-visible,
  a:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 2px solid var(--gold, #FFC107);
    outline-offset: 2px;
  }
}

/* --- Long words / URLs in user-generated content (chat, profile, certificates) --- */
.user-text, .chat-message, .breakout-result, .ai-response {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

/* === MOBILE RESPONSIVENESS — production polish (2026-05-13) ===
   Cross-cutting mobile guards for features shipped this session.
   Per-feature @media rules colocated with the feature; this block catches
   global concerns (tap targets, iOS auto-zoom, dashboard score-breakdown). */
@media (max-width: 720px) {
  /* Score breakdown grid below course-score-panel: keep 2-up minimum so labels stay legible */
  .score-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .score-break-item { padding: 12px 10px !important; min-height: 44px; }
  .sb-val { font-size: 1.1rem !important; }
  .sb-label { font-size: .72rem !important; }
}
@media (max-width: 480px) {
  /* iOS auto-zoom guard: every text input on phones must be >=16px */
  input[type="text"], input[type="email"], input[type="tel"],
  input[type="password"], input[type="search"], input[type="number"],
  input[type="url"], textarea, select { font-size: 16px !important; }
  /* Global tap-target floor for small buttons we shipped this session */
  .btn-sm { min-height: 40px; }
}
/* Touch devices: disable hover-only tilts on cards shipped this session */
@media (hover: none) and (pointer: coarse) {
  .module-card:hover, .pricing-card:hover, .instructor-card:hover,
  .price-card:hover, .tq-breakout-card:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   2026-05-16 SLIDE POLISH PASS
   ========================================================================== */

/* (1) Brand-dark tables. Some rewritten slides ship raw <table> markup with
   hard-coded LIGHT-theme inline styles (#f4f4f4 header, #ddd borders) that
   look broken on the dark navy slide. Override to the brand palette. The
   inline styles are on the elements, so these need !important to win. */
.pres-slide-content table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 20px 0 !important;
  border: 1px solid var(--aas-line, #D9DFE8) !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  font-size: .95rem !important;
  background: #FFFFFF !important;
  box-shadow: 0 2px 12px rgba(10,34,64,.06) !important;
}
.pres-slide-content table thead th,
.pres-slide-content table th {
  background: var(--aas-card-2, #EDF1F7) !important;
  color: var(--aas-navy, #0A2240) !important;
  border: 0 !important;
  border-bottom: 2px solid rgba(46,111,216,.35) !important;
  padding: .72rem .95rem !important;
  text-align: left !important;
  font-size: .73rem !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}
.pres-slide-content table tbody td,
.pres-slide-content table td {
  background: transparent !important;
  color: var(--aas-text, #111827) !important;
  border: 0 !important;
  border-bottom: 1px solid #E4E9F1 !important;
  padding: .72rem .95rem !important;
  vertical-align: top !important;
  line-height: 1.55 !important;
}
.pres-slide-content table tbody tr:nth-child(even) td { background: rgba(10,34,64,.03) !important; }
.pres-slide-content table tbody tr:hover td { background: rgba(46,111,216,.06) !important; }
.pres-slide-content table tr:last-child td { border-bottom: 0 !important; }
.pres-slide-content table td strong { color: var(--aas-navy, #0A2240) !important; }
/* The rewritten markup puts the light theme on the <tr> itself
   (style="background:#f4f4f4 / #fafafa"). Transparent td/th let that bleed
   through, so kill the row background outright and drive zebra via td. */
.pres-slide-content table tr,
.pres-slide-content table thead tr,
.pres-slide-content table tbody tr { background: transparent !important; }
.pres-slide-content table tbody td { background: #FFFFFF !important; }
.pres-slide-content table tbody tr:nth-child(even) td { background: rgba(10,34,64,.035) !important; }
.pres-slide-content table tbody tr:hover td { background: rgba(46,111,216,.08) !important; }
.pres-slide-content table caption { color: var(--aas-slate,#42526B) !important; padding: 0 0 .5rem !important; font-size: .8rem !important; }
@media (max-width: 720px) {
  .pres-slide-content table { display: block !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch !important; }
}

/* (1b) Code/prompt blockquotes: some rewritten slides ship
   <blockquote style="background:#f4f4f4;..."> (light box, dark text) which
   looks broken on the dark navy slide. Re-skin to the brand dark code block,
   left-border tinted to the module accent. */
/* Code/prompt blockquotes stay DARK — the one sanctioned dark moment
   (style bible: code/terminal demos keep navy #0B1526). */
.pres-slide-content blockquote {
  background: #0B1526 !important;
  border: 1px solid rgba(10,34,64,.10) !important;
  border-left: 3px solid var(--slide-accent, #2E6FD8) !important;
  border-radius: 10px !important;
  padding: 1rem 1.15rem !important;
  margin: 1.25rem 0 !important;
  white-space: pre-wrap !important;
  overflow-x: auto !important;
}
.pres-slide-content blockquote,
.pres-slide-content blockquote * { color: #d6d6e2 !important; }
.pres-slide-content blockquote strong { color: #fff !important; }

/* (2) Keep the "Mark Done" control clear of the fixed Max chat bubble
   (bubble = 64px @ bottom/right 20px, z-index 9999). Reserve right-edge
   space in the bottom bar so the checkbox is never covered or unclickable. */
.pres-bottombar { padding-right: 96px !important; }
@media (max-width: 720px) { .pres-bottombar { padding-right: 78px !important; } }
/* End 2026-05-16 slide polish pass */

