/* ================================================================
   GABAY EduTech - Stylesheet
   Sections (Ctrl+F to jump):
     1. Design Tokens      colors, fonts, sizing
     2. Reset              box-model and base defaults
     3. Accessibility      skip link, focus ring
     4. Login              the entry screen
     5. Layout Shell       sidebar + content panel
     6. Sidebar            nav, accordion, footer
     7. Mobile Bar         hamburger header on small screens
     8. Course Header      progress bar inside modules
     9. Typography         headings, body, utility classes
    10. Buttons            primary, ghost, block, small
    11. Form Fields        inputs, textareas, labels
    12. Dashboard          home after login
    13. Step Screens       one topic at a time
    14. Workspace          the lesson plan form
    15. Self-Assessment    rating rows in the journal
    16. Complete Screen    end-of-module moment
    17. Science Lab        subject tabs and sim cards
    18. About              research info page
    19. Export / Print     print-safe PDF layout
    20. Quit Modal         confirmation dialog
    21. Scroll FAB         floating scroll button
    22. Responsive         tablet and mobile
   ================================================================ */


/* ================================================================
   1. DESIGN TOKENS
   Change a value here and it updates everywhere on the site.
   ================================================================ */
:root {
  /* --- Backgrounds --- */
  --bg:         #221F1B;  /* Main page background */
  --bg-sidebar: #1A1917;  /* Sidebar (slightly darker for depth) */
  --bg-surface: #2B2720;  /* Cards, elevated surfaces */
  --bg-hover:   #332E27;  /* Hover state on interactive items */
  --bg-input:   #1E1B18;  /* Input backgrounds */

  /* --- Accents --- */
  --accent:      #78CFC5; /* Primary teal: buttons, active states */
  --accent-dim:  #5BADA3; /* Teal on hover */
  --accent-glow: rgba(120,207,197,0.12); /* Focus glow */
  --accent2:     #D79A6B; /* Warm amber: tags, highlights */
  --accent2-dim: #B8805A; /* Amber on hover */

  /* --- Text (all pass WCAG AA on --bg) --- */
  --text:       #F5F2EC;  /* Primary: 14.8:1 contrast */
  --text-soft:  #C6B8A8;  /* Secondary: 8.4:1 contrast */
  --text-dim:   #7A6E62;  /* Placeholders, subtle labels */
  --text-on-accent: #1A1917; /* Dark text on teal buttons */

  /* --- Borders --- */
  --border:      #3A352F;
  --border-soft: #2D2924;

  /* --- Typography --- */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-ui:      system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* --- Layout --- */
  --sidebar-w:  252px;
  --content-max: 660px;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-pill: 999px;
}


/* ================================================================
   2. RESET
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--bg);
}

/* Respect users who prefer less motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

/* UI chrome uses the system sans for crispness */
button, input, textarea, select, label { font-family: var(--font-ui); }

a { color: var(--accent); text-underline-offset: 3px; }
img, svg { display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; color: inherit; }


/* ================================================================
   3. ACCESSIBILITY
   ================================================================ */

/* Skip link: off-screen until keyboard-focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-ui);
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Visible focus ring for keyboard navigation (WCAG 2.4.7) */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ================================================================
   4. LOGIN
   ================================================================ */
#login-screen {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.login-compass      { font-size: 1.6rem; line-height: 1; }
.login-brand-name   { font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; }
.login-heading      { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.login-sub          { font-size: 0.95rem; color: var(--text-soft); line-height: 1.55; margin-bottom: 1.8rem; }
.login-note         { font-size: 0.82rem; color: var(--text-dim); margin: 0.5rem 0 1.2rem; }
.login-note strong  { color: var(--text-soft); }
.login-error {
  font-size: 0.88rem;
  color: var(--accent2);
  margin-bottom: 0.9rem;
  padding: 0.6rem 0.8rem;
  background: rgba(215,154,107,0.1);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(215,154,107,0.2);
}


/* ================================================================
   5. LAYOUT SHELL
   ================================================================ */
#app-wrapper      { display: flex; min-height: 100vh; }
.content-panel    { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main#main-content { flex: 1; outline: none; }


/* ================================================================
   6. SIDEBAR
   ================================================================ */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.sidebar-logo-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.4rem;
}
.sidebar-logo-btn:hover { color: var(--accent); }
.sidebar-brand-text { white-space: nowrap; }

.sidebar-close-btn {
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  display: none; /* Shown only on mobile */
  place-items: center;
}
.sidebar-close-btn:hover { background: var(--bg-hover); color: var(--text); }

.sidebar-nav { flex: 1; padding: 0.8rem 0; overflow-y: auto; }

/* Section label (e.g., "LEARNING JOURNEY") */
.sb-section-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.8rem 1.1rem 0.3rem;
}

.sb-divider { height: 1px; background: var(--border-soft); margin: 0.7rem 1rem; }

/* Generic nav link (Lab, About) */
.sb-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin: 0 0.5rem;
  width: calc(100% - 1rem);
  transition: background 0.12s, color 0.12s;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
}
.sb-link:hover    { background: var(--bg-hover); color: var(--text); }
.sb-link.is-active {
  background: rgba(120,207,197,0.1);
  color: var(--accent);
}
.sb-link svg { flex-shrink: 0; }

/* Module entry */
.sb-module { margin: 0 0.5rem 0.1rem; }
.sb-module-hdr {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  width: 100%;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.sb-module-hdr:hover       { background: var(--bg-hover); color: var(--text); }
.sb-module-hdr.is-active   { color: var(--text); }
.sb-module-hdr.is-done     { color: var(--accent); }
.sb-module-hdr:disabled    { opacity: 0.45; cursor: default; }

.sb-module-status {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.sb-status-active { background: rgba(215,154,107,0.15); color: var(--accent2); }
.sb-module-status svg { flex-shrink: 0; }

/* Icon-only status: done (checkmark circle) and locked (padlock) */
.sb-status-icon {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
}
.sb-status-icon-done   { color: var(--accent); }
.sb-status-icon-locked { color: var(--text-dim); }

/* Accordion step links inside a module */
.sb-accordion { padding-bottom: 0.4rem; }
.sb-step-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.38rem 0.5rem 0.38rem 2rem;
  font-family: var(--font-ui);
  font-size: 0.83rem;
  color: var(--text-dim);
  border-radius: var(--radius-sm);
  transition: background 0.12s, color 0.12s;
}
button.sb-step-item {
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
button.sb-step-item:hover { background: var(--bg-hover); color: var(--text-soft); }
.sb-step-item.is-current  { color: var(--accent); background: rgba(120,207,197,0.08); }
.sb-step-item.is-done     { color: var(--text-soft); }

.sb-step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}
.sb-step-item.is-done    .sb-step-dot { background: var(--accent); border-color: var(--accent); }
.sb-step-item.is-current .sb-step-dot { background: var(--accent2); border-color: var(--accent2); }
.sb-step-item.is-current svg { flex-shrink: 0; color: var(--accent2); }

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--border-soft);
  padding: 1rem;
  flex-shrink: 0;
}
.sidebar-user-info { margin-bottom: 0.8rem; }
.sb-user-name  { font-family: var(--font-ui); font-size: 0.88rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user-email { font-family: var(--font-ui); font-size: 0.78rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0.15rem; }

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.sidebar-logout-btn:hover { background: var(--bg-hover); color: var(--text-soft); }

.sidebar-backdrop {
  position: fixed; inset: 0; z-index: 39;
  background: rgba(0,0,0,0.6);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
@media (min-width: 900px) { .sidebar-backdrop { display: none; } }
.sidebar-backdrop.is-open { opacity: 1; pointer-events: auto; }


/* ================================================================
   7. MOBILE BAR
   ================================================================ */
.mobile-bar {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-sidebar);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}
.mobile-menu-btn {
  color: var(--text-soft);
  border-radius: var(--radius-sm);
  padding: 0.35rem;
  display: grid;
  place-items: center;
}
.mobile-menu-btn:hover { background: var(--bg-hover); color: var(--text); }
.mobile-brand { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; color: var(--text); }


/* ================================================================
   8. COURSE HEADER
   ================================================================ */
.course-hdr {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-sidebar);
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}
.course-hdr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
}
.quit-btn {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.quit-btn:hover {
  border-color: var(--accent2-dim);
  color: var(--accent2);
  background: rgba(215,154,107,0.08);
}
.course-hdr-title {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
  flex: 1;
}
.course-hdr-step {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
}
.course-progress      { height: 3px; background: var(--border-soft); }
.course-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 0.4s ease;
}


/* ================================================================
   9. TYPOGRAPHY
   ================================================================ */
h1 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(1.85rem,5vw,2.8rem); line-height: 1.1; color: var(--text); }
h2 { font-family: var(--font-heading); font-weight: 600; font-size: 1.3rem; line-height: 1.25; color: var(--text); margin-bottom: 0.5rem; }
h3 { font-family: var(--font-heading); font-weight: 600; font-size: 1.08rem; color: var(--text); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.5rem;
}
.lede  { font-size: 1.05rem; color: var(--text-soft); line-height: 1.65; max-width: var(--content-max); }
.muted { font-family: var(--font-ui); font-size: 0.88rem; color: var(--text-soft); }

.kicker {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.4rem;
}
.motto {
  font-style: italic;
  color: var(--text-soft);
  border-left: 3px solid var(--accent2);
  padding-left: 1rem;
  margin-top: 1.2rem;
  font-size: 1rem;
  line-height: 1.6;
  max-width: var(--content-max);
}


/* ================================================================
   10. BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.3rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; }

.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-dim); }

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); border-color: var(--text-dim); }

.btn-block { width: 100%; }
.btn-sm    { font-size: 0.85rem; padding: 0.5rem 0.9rem; }


/* ================================================================
   11. FORM FIELDS
   ================================================================ */
.field-group { margin-bottom: 1.1rem; }
.field-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
}
.field-group input,
.field-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.9rem;
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--text-dim); }
.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-group textarea {
  min-height: 3rem;
  resize: none;
  overflow: hidden;
  line-height: 1.6;
}


/* ================================================================
   12. DASHBOARD
   ================================================================ */
.dashboard { max-width: 680px; margin: 0 auto; padding: 3rem 1.6rem 5rem; }
.dash-greeting { margin-bottom: 2.4rem; }
.dash-greeting h1 { margin-bottom: 0.4rem; }

.dash-continue-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.3rem;
}
.dash-continue-card h2 { font-size: 1rem; color: var(--text-soft); font-weight: 500; margin-bottom: 0.3rem; }
.dash-module-title     { font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 1.2rem; }
.dash-progress-row     { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.dash-progress-label   { font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-dim); }

.dash-locked-hint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-soft);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.dash-locked-hint svg { flex-shrink: 0; }

.dash-prog-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin-bottom: 1.3rem;
}
.dash-prog-fraction { font-family: var(--font-heading); font-size: 2.4rem; font-weight: 700; color: var(--accent); line-height: 1; margin-bottom: 0.2rem; }
.dash-prog-of       { font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-soft); margin-bottom: 1rem; }
.dash-segs          { display: flex; gap: 0.5rem; }
.dash-seg           { flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--border); transition: background 0.4s; }
.dash-seg.is-done   { background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.dash-seg-labels    { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.dash-seg-labels span { flex: 1; font-family: var(--font-ui); font-size: 0.72rem; color: var(--text-dim); text-align: center; }

.dash-resource-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dash-resource-card h3  { font-size: 0.97rem; margin-bottom: 0.2rem; }
.dash-resource-card p   { font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-soft); }
.dash-complete-banner   {
  background: rgba(120,207,197,0.07);
  border: 1px solid rgba(120,207,197,0.18);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.3rem;
}
.dash-complete-banner p { font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-soft); margin-top: 0.4rem; }


/* ================================================================
   13. STEP SCREENS (lesson elements, guidelines, journal questions)
   ================================================================ */
.step-screen {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.6rem 7rem;
  animation: step-in 0.28s ease both;
}
@keyframes step-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.step-count {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.6rem;
}
.step-screen h1    { margin-bottom: 1rem; }
.step-def          { font-size: 1.05rem; color: var(--text-soft); line-height: 1.7; margin-bottom: 1.4rem; max-width: var(--content-max); }

.step-example {
  background: rgba(120,207,197,0.07);
  border: 1px solid rgba(120,207,197,0.18);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  margin-top: 0.8rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.6;
}

/* Guidelines */
.guidelines-rules { margin: 1rem 0 1.6rem; }
.guidelines-rules li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.97rem;
  color: var(--text-soft);
}
.guidelines-rules li:last-child { border-bottom: none; }
.rule-num { font-family: var(--font-ui); font-weight: 700; color: var(--accent2); font-size: 0.85rem; flex-shrink: 0; margin-top: 0.1rem; }

.guidelines-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.guidelines-panel { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.guidelines-panel.ok { border-left: 4px solid var(--accent); }
.guidelines-panel.no { border-left: 4px solid var(--accent2); }
.guidelines-panel h3 { font-family: var(--font-ui); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 0.7rem; }
.guidelines-panel li { font-family: var(--font-ui); font-size: 0.9rem; color: var(--text-soft); padding: 0.25rem 0 0.25rem 1rem; position: relative; }
.guidelines-panel li::before { content: '\00b7'; position: absolute; left: 0; color: var(--text-dim); }

/* Journal question */
.question-section { display: block; font-family: var(--font-ui); font-size: 0.73rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent2); margin-bottom: 0.6rem; }
.question-text    { font-family: var(--font-heading); font-size: clamp(1.25rem,4vw,1.7rem); font-weight: 600; line-height: 1.25; color: var(--text); margin-bottom: 1.3rem; }

/* Sticky Continue bar at the bottom of step screens */
.step-actions {
  position: fixed;
  bottom: 0;
  right: 0;
  left: var(--sidebar-w);
  background: var(--bg);
  border-top: 1px solid var(--border-soft);
  padding: 0.9rem 1.6rem max(0.9rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  z-index: 10;
}
.step-back-btn { font-size: 0.88rem; color: var(--text-dim); border-radius: var(--radius-sm); padding: 0.5rem 0.7rem; transition: color 0.15s, background 0.15s; }
.step-back-btn:hover { color: var(--text-soft); background: var(--bg-hover); }


/* ================================================================
   14. WORKSPACE
   ================================================================ */
.workspace { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.6rem 10rem; }
.workspace h2 { font-size: 1.05rem; margin-top: 2rem; margin-bottom: 0.8rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border-soft); }

.ws-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

.strategy-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 0.5rem; }
.strategy-toggle button { font-size: 0.9rem; font-weight: 600; padding: 0.5rem 1.1rem; color: var(--text-soft); background: transparent; transition: background 0.15s, color 0.15s; }
.strategy-toggle button[aria-pressed="true"] { background: var(--accent); color: var(--text-on-accent); }

.phase-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 0.7rem; }
.phase-card-hdr { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.phase-card-hdr h3 { font-size: 0.97rem; }
.phase-tag { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.15rem 0.5rem; border-radius: var(--radius-pill); background: rgba(215,154,107,0.15); color: var(--accent2); }
.phase-hint { font-family: var(--font-ui); font-size: 0.83rem; color: var(--text-dim); margin-bottom: 0.6rem; }


/* ================================================================
   15. SELF-ASSESSMENT
   ================================================================ */
.self-assess { max-width: var(--content-max); margin: 0 auto; padding: 3rem 1.6rem 7rem; animation: step-in 0.28s ease both; }

.rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.rating-row:last-child { border-bottom: none; }
.rating-label { font-family: var(--font-body); font-size: 0.97rem; color: var(--text-soft); flex: 1; max-width: 38ch; }

.rating-scale { display: flex; gap: 0.4rem; flex-shrink: 0; }
.rating-scale label { cursor: pointer; }
.rating-scale input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-dot {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.rating-scale input:checked + .rating-dot { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.rating-scale input:focus-visible + .rating-dot { outline: 2px solid var(--accent); outline-offset: 2px; }
.rating-scale label:hover .rating-dot { border-color: var(--accent); color: var(--accent); }


/* ================================================================
   16. COMPLETE SCREEN
   ================================================================ */
.complete-screen { max-width: var(--content-max); margin: 0 auto; padding: 4rem 1.6rem 5rem; text-align: center; animation: step-in 0.35s ease both; }
.complete-check {
  width: 4rem; height: 4rem; border-radius: 50%;
  background: rgba(120,207,197,0.1);
  border: 2px solid var(--accent);
  display: grid; place-items: center;
  margin: 0 auto 1.5rem;
  color: var(--accent);
}
.complete-screen h1 { margin-bottom: 0.6rem; }
.complete-screen .lede { margin: 0 auto 2rem; }
.complete-actions { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; max-width: 300px; margin: 0 auto; }
.complete-actions .btn { width: 100%; }


/* ================================================================
   17. SCIENCE LAB
   ================================================================ */
.lab-screen { max-width: 720px; margin: 0 auto; padding: 2.5rem 1.6rem 5rem; }
.lab-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0; }
.lab-tab {
  font-family: var(--font-ui); font-size: 0.87rem; font-weight: 600;
  padding: 0.45rem 1rem; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-soft);
  transition: background 0.15s, color 0.15s, border-color 0.15s; cursor: pointer;
}
.lab-tab.is-active, .lab-tab:hover { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }

.sim-list { display: grid; gap: 0.7rem; margin-top: 1rem; }
.sim-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; transition: border-color 0.15s; }
.sim-card:hover { border-color: var(--accent); }
.sim-card h3 { font-size: 0.98rem; margin-bottom: 0.3rem; }
.sim-card p  { font-family: var(--font-ui); font-size: 0.85rem; color: var(--text-soft); margin-bottom: 0.55rem; }
.sim-card a  { font-family: var(--font-ui); font-size: 0.84rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.sim-card a:hover { text-decoration: underline; }


/* ================================================================
   18. ABOUT
   ================================================================ */
.about-screen { max-width: var(--content-max); margin: 0 auto; padding: 3rem 1.6rem 5rem; }
.about-screen h1 { margin-bottom: 0.6rem; }
.about-screen h2 { margin-top: 2.4rem; }
.about-screen p:not(.eyebrow) { color: var(--text-soft); margin-top: 0.5rem; line-height: 1.7; }
.about-screen ul { padding-left: 1.2rem; margin-top: 0.5rem; }
.about-screen li { color: var(--text-soft); margin-bottom: 0.5rem; list-style: disc; }

.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; margin-top: 0.9rem; }
.team-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.tc-uni  { font-family: var(--font-ui); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent2); margin-bottom: 0.35rem; }
.tc-name { font-family: var(--font-ui); font-size: 0.92rem; font-weight: 600; color: var(--text); }
.tc-role { font-family: var(--font-ui); font-size: 0.82rem; color: var(--text-soft); margin-top: 0.15rem; }


/* ================================================================
   19. EXPORT / PRINT
   ================================================================ */
.export-screen { max-width: 740px; margin: 0 auto; padding: 2rem 1.6rem 5rem; }
.export-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.print-doc { background: #fff; color: #111; border-radius: var(--radius); padding: 2.2rem 2.4rem; border: 1px solid var(--border); }
.pd-head   { border-bottom: 2px solid #111; padding-bottom: 0.6rem; margin-bottom: 1.1rem; }
.pd-title  { font-size: 1.6rem; font-family: var(--font-heading); color: #111; }
.pd-meta   { font-family: var(--font-ui); color: #444; font-size: 0.9rem; margin-top: 0.3rem; }
.pd-h      { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; border-bottom: 1px solid #ddd; padding-bottom: 0.2rem; margin: 1.2rem 0 0.5rem; color: #111; }
.pd-table  { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin: 0.3rem 0; }
.pd-table th, .pd-table td { border: 1px solid #ddd; padding: 0.45rem 0.6rem; text-align: left; vertical-align: top; color: #111; }
.pd-table th { font-family: var(--font-ui); font-weight: 600; background: #f7f4f0; width: 8.5rem; }
.pd-table.proc thead th { background: #ede9e3; font-size: 0.8rem; }
.no-print { /* screen only, hidden in print */ }

@media print {
  @page { margin: 15mm; }
  .sidebar, .sidebar-backdrop, .mobile-bar, .course-hdr,
  .step-actions, .modal-overlay, .scroll-fab,
  .export-actions, .no-print { display: none !important; }
  #app-wrapper, .content-panel { display: block !important; }
  body    { background: #fff; font-size: 12pt; color: #111; }
  .export-screen { padding: 0; max-width: none; }
  .print-doc { border: none; padding: 0; border-radius: 0; }
}


/* ================================================================
   20. QUIT MODAL
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem 1.8rem;
  max-width: 380px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.modal-title   { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 0.6rem; }
.modal-body    { font-family: var(--font-ui); font-size: 0.95rem; color: var(--text-soft); margin-bottom: 1.5rem; line-height: 1.55; }
.modal-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.modal-actions .btn { flex: 1; }


/* ================================================================
   21. SCROLL FAB
   ================================================================ */
.scroll-fab { position: fixed; z-index: 25; right: max(1.2rem, env(safe-area-inset-right)); bottom: max(1.2rem, env(safe-area-inset-bottom)); }
#scroll-fab {
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--accent); display: grid; place-items: center;
  font-size: 1.1rem; box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  transition: background 0.15s, border-color 0.15s;
}
#scroll-fab:hover { background: var(--bg-hover); border-color: var(--accent); }


/* ================================================================
   22. RESPONSIVE
   ================================================================ */

/* Tablet and mobile: sidebar becomes a slide-in drawer */
@media (max-width: 899px) {
  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    z-index: 40; width: min(280px, 82vw);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .sidebar.is-open    { transform: translateX(0); }
  .sidebar-close-btn  { display: grid; }
  .mobile-bar         { display: flex; }
  /* Step actions span full width (no sidebar offset) */
  .step-actions       { left: 0; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  .dashboard, .step-screen, .self-assess, .complete-screen,
  .lab-screen, .about-screen, .workspace { padding-left: 1.1rem; padding-right: 1.1rem; }
  .step-actions       { padding-left: 1.1rem; padding-right: 1.1rem; }
  .course-hdr-bar     { padding: 0.7rem 1rem; }
  .modal-actions      { flex-direction: column; }
  .guidelines-grid    { grid-template-columns: 1fr; }
  .ws-two-col         { grid-template-columns: 1fr; }
  .team-grid          { grid-template-columns: 1fr; }
  .rating-row         { flex-direction: column; align-items: flex-start; }
  h1                  { font-size: 1.8rem; }
}
