/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Light mode variables */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f4;
  --text-primary: #000000;
  --text-secondary: #424344;
  --text-tertiary: #57585a;
  --border-color: #dadce0;
  --accent-color: #202124;
  --accent-light: #5f6368;
  --progress-bg: #dadce0;
  --progress-fill: #202124;
  --active-indicator: #1a73e8;
  --score-excellent: #1a73e8;
  --score-good: #4285f4;
  --score-moderate: #fbbc04;
  --score-poor: #ea4335;
  --font-size: 1;
  
  /* Additional color palette */
  --accent: #4058D6;
  --n-50: #F9FAFB;
  --n-100: #F3F4F6;
  --n-200: #E5E7EB;
  --n-300: #D1D5DB;
  --n-400: #9CA3AF;
  --n-500: #6B7280;
  --n-600: #4B5563;
  --n-700: #374151;
  --n-800: #1F2937;
  --n-900: #111827;
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;
  --danger-light: #FEF2F2;
  --danger-text: #991B1B;
}

.dark-mode {
  --bg-primary: #202124;
  --bg-secondary: #292a2d;
  --bg-tertiary: #3c4043;
  --text-primary: #e8eaed;
  --text-secondary: #9aa0a6;
  --text-tertiary: #5f6368;
  --border-color: #5f6368;
  --accent-color: #e8eaed;
  --accent-light: #9aa0a6;
  --progress-bg: #5f6368;
  --progress-fill: #e8eaed;
  --active-indicator: #8ab4f8;
  --score-excellent: #8ab4f8;
  --score-good: #aecbfa;
  --score-moderate: #fdd663;
  --score-poor: #f28b82;
}

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

html { 
  font-size: calc(var(--font-size) * 16px);
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Adjust based on your header height */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all 0.3s;
  line-height: 1.6;
}

.serif {
  font-family: 'Source Serif 4', serif;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  font-weight: 600;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--n-900);
  outline-offset: 2px;
}

/* Focus styles */
input:focus, button:focus, a:focus, [tabindex]:focus-visible {
  outline: 3px solid var(--n-900);
  outline-offset: 2px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.top-nav {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95);
}

.dark-mode .top-nav {
  background-color: rgba(32, 33, 36, 0.95);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  position: relative;
  padding: 0.5rem;
  text-decoration: none;
}

@media (min-width: 640px) {
  .nav-link {
    font-size: 0.9rem;
    padding-bottom: 0.25rem;
  }
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.2s;
}

@media (max-width: 639px) {
  .nav-link::after {
    display: none;
  }
}

.nav-link:hover {
  color: var(--accent-color);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--accent-color);
}

.nav-link.active::after {
  width: 100%;
}

.nav-section-divider {
  width: 1px;
  height: 1rem;
  background-color: var(--border-color);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: var(--accent);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.btn-outline:hover {
  background: var(--accent);
  color: white;
}

.nav-button {
  padding: 0.75rem 1.5rem;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-button:hover:not(:disabled) {
  background-color: var(--bg-tertiary);
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.nav-button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.control-pill {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.control-pill:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-light);
}

/* ============================================
   SLIDES
   ============================================ */
.slide {
  display: none;
  min-height: calc(100vh - 180px);
}

.slide.active {
  display: block;
}

.slide-content {
  width: 100%;
  max-width: 56rem;
  margin: 0 auto;
  padding-top: 3rem;
}

.slide-content h1,
.slide-content h2 {
  margin-top: 0;
}

/* ============================================
   PROGRESS BARS
   ============================================ */
/* animate width */
.progress-bar {
  height: 8px;
  background-color: var(--progress-bg);
  position: relative;
  overflow: hidden;
  transition: width 0.6s ease;   /* NEW */
  border-radius: 4px;
}

/* state colors (red <50, amber 50–69, green 70+) */
.progress-bar.low    { background-color: var(--danger); }   /* red */
.progress-bar.medium { background-color: var(--warning); }  /* amber */
.progress-bar.good   { background-color: var(--success); }  /* green */

/* optional: color the numeric score too */
.score-value.low    { color: var(--danger); }
.score-value.medium { color: var(--warning); }
.score-value.good   { color: var(--success); }

.progress-fill {
  height: 100%;
  background-color: var(--progress-fill);
  transition: width 0.3s ease;
}

.progress-container {
  width: 100%;
  height: 8px;
  background-color: var(--progress-bg);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0 0.75rem 0;
}

.progress-bar-fill {
  height: 100%;
  transition: all 0.4s ease;
  border-radius: 4px;
}

.mini-progress {
  display: flex;
  gap: 0.375rem;
  align-items: center;
  flex-wrap: wrap;
}

.mini-progress-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--progress-bg);
  transition: all 0.2s;
}

.mini-progress-dot.active {
  background-color: var(--progress-fill);
  transform: scale(1.3);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-primary);
  border-radius: 12px;
  padding: 2rem;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Fixed width for search modal */
#searchModal .modal-content {
  width: 500px;
  max-width: 90%;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .toc-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .toc-grid {
    grid-template-columns: 1fr;
  }
}

.toc-section {
  margin-bottom: 1rem;
}

.toc-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.toc-item {
  padding: 0.5rem 1rem;
  margin: 0.25rem 0;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toc-item:hover {
  background-color: var(--bg-tertiary);
}

.toc-number {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 600;
  min-width: 2rem;
}

/* ============================================
   SEARCH
   ============================================ */
.search-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.search-result {
  padding: 1rem;
  margin: 0.5rem 0;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
}

.search-result:hover {
  background-color: var(--bg-tertiary);
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.search-result-snippet {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.search-highlight {
  background-color: rgba(26, 115, 232, 0.2);
  padding: 0.125rem 0.25rem;
  border-radius: 0.125rem;
}

.dark-mode .search-highlight {
  background-color: rgba(138, 180, 248, 0.2);
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: white;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.12); /* ← 1px subtle outline */
  padding: 35px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-0.5px);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.12);
}

.card-header {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-content {
  color: var(--text-secondary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

/* ============================================
   MARK CLASSIFICATION TOOL
   ============================================ */
.mark-tool-container {
  width: 100%;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 0 auto;     
}

.mark-tool-header {
  background-color: var(--bg-tertiary);
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.mark-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mark-display {
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  min-width: 4rem;
  text-align: center;
}

.mark-button {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}

.mark-button:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--accent-color);
}

.mark-table {
  width: 100%;
  border-collapse: collapse;
}

.mark-table th,
.mark-table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.mark-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

/* Toggle switch styles */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color: var(--n-100);
  border-radius: 9999px;
  padding: 0.25rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.toggle-switch.active {
  background-color: #e5e7eb;
}

.toggle-option {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--n-700);
  z-index: 1;
}

.toggle-option.active {
  background-color: white;
  color: var(--n-900);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.dark-mode .toggle-switch {
  background-color: var(--n-600);
}

.dark-mode .toggle-option {
  color: var(--n-300);
}

.dark-mode .toggle-option.active {
  background-color: var(--n-800);
  color: var(--n-100);
}

/* ============================================
   VISA DROPDOWN
   ============================================ */
.visa-dropdown {
  position: relative;
  display: inline-block;
}

.visa-dropdown-button {
  background: white;
  border: 1px solid var(--n-300);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--n-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.visa-dropdown-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.visa-dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  background: white;
  border: 1px solid var(--n-200);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  min-width: 280px;
  z-index: 100;
}

.visa-dropdown-content.active {
  display: block;
}

.visa-dropdown-item {
  display: block;
  padding: 12px 16px;
  color: var(--n-700);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
  border-bottom: 1px solid var(--n-100);
}

.visa-dropdown-item:first-child {
  border-radius: 12px 12px 0 0;
}

.visa-dropdown-item:last-child {
  border-bottom: none;
  border-radius: 0 0 12px 12px;
}

.visa-dropdown-item:hover {
  background: var(--n-50);
}

/* ============================================
   EMERGENCY MODAL (PERMANENT)
   ============================================ */
.emergency-modal-permanent {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 420px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  z-index: 50;
}

.emergency-modal-permanent .modal-header {
  padding: 16px 16px 0;
}

.emergency-modal-permanent .modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.emergency-modal-permanent .modal-body {
  padding: 0 16px 16px;
}

/* ============================================
   COUNTRY CARDS
   ============================================ */
.country-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.country-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s;
  cursor: pointer;
  height: 100%;
}

.country-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.country-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 0.5rem 0.5rem 0 0;
}

.country-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.country-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.country-card-badge {
  background: var(--accent);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.country-card-details {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.country-card-detail {
  margin-bottom: 0.75rem;
}

.country-card-detail-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.country-card-detail-value {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.country-card-services {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.country-card-service-tag {
  font-size: 0.8rem;
  padding: 4px 8px;
  background: var(--n-100);
  border-radius: 4px;
  color: var(--n-700);
}

/* ============================================
   DEFINITION QUALITY SCORER
   ============================================ */
.definition-scorer {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 2rem 0;
}

.definition-scorer h3 {
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.boxes-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.definition-box {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.75rem;
}

.box-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.definition-scorer textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  resize: vertical;
  transition: border-color 0.2s;
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.definition-scorer textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 1rem;
}

.metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.score-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
}

.score-value::after {
  content: '/100';
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: 4px;
}

.char-counter {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.char-counter.warning {
  color: var(--score-poor);
  font-weight: 600;
}

.progress-bar.low {
  background-color: var(--score-poor);
}

.progress-bar.medium {
  background-color: var(--score-moderate);
}

.progress-bar.good {
  background-color: var(--score-good);
}

.methodology {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.75rem;
  margin-top: 3rem;
}

.methodology h2 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.methodology table {
  width: 100%;
  border-collapse: collapse;
}

.methodology th,
.methodology td {
  padding: 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.methodology th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.methodology td {
  font-size: 0.875rem;
  color: var(--text-primary);
}

.methodology tr:last-child td {
  border-bottom: none;
}

.weight-cell {
  font-weight: 600;
  color: var(--accent-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .three-column-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-notice {
    display: block !important;
  }
  
  .slide-content {
    padding: 1.5rem 1rem;
  }
  
  h1 {
    font-size: 2.5rem !important;
  }
  
  h2 {
    font-size: 1.75rem !important;
  }
  
  .toc-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-button {
    padding: 0.5rem 1rem;
  }
  
  .mark-tool-container {
    width: 95%;
  }
  
  .project-facts {
    position: static;
    width: 100%;
    margin-top: 2rem;
    border-left: none;
    border-top: 1px solid var(--border-color);
  }
  
  .project-facts-toggle {
    display: none;
  }
  
  .boxes-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .metrics {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .score-value {
    font-size: 1.5rem;
  }
  
  .char-counter {
    font-size: 0.75rem;
  }
  
  .methodology th,
  .methodology td {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  
  .code-block {
    font-size: 0.75rem;
    padding: 1rem;
  }
  
  .full-width-browser-frame {
    padding: 0 1rem;
    margin: 1rem 0;
  }
  
  .full-width-browser-frame .browser-header {
    padding: 0.75rem 1rem;
  }
  
  .full-width-browser-frame .browser-notice {
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 640px) {
  main {
    padding-top: 6rem;
    padding-bottom: 5rem;
  }
  
  .grid.grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.section-marker {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--text-tertiary);
  transition: all 0.2s;
}

.nav-link.active .section-marker {
  background-color: var(--active-indicator);
  box-shadow: 0 0 8px var(--active-indicator);
}

.logo-mark {
  width: 10px;
  height: 24px;
  background: var(--accent);
  border-radius: 4px;
}

.chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--n-300);
  background: white;
  cursor: pointer;
  transition: all 0.2s;

  /* 🔒 Prevent breaking into two lines */
  white-space: nowrap;
}

.chip[aria-pressed="true"] {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Info Rows */
.info-row {
  display: flex;
  padding: 16px 0;
  border-bottom: 1px solid var(--n-100);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  flex: 0 0 160px;
  font-weight: 600;
  color: var(--n-600);
  font-size: 14px;
}

.info-value {
  flex: 1;
  font-size: 14px;
}

.service-tag {
  display: inline-block;
  padding: 8px 14px;
  background: var(--n-100);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  margin: 4px;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--n-100);
}

.hours-table tr:last-child td {
  border-bottom: none;
}

.day-label {
  font-weight: 600;
  color: var(--n-700);
  width: 120px;
}

.hours-value {
  color: var(--n-900);
}

.emergency {
  color: var(--danger-text);
  font-weight: 700;
}

.banner {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: start;
  gap: 12px;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--n-100);
  border-radius: 6px;
  font-size: 13px;
  color: var(--n-600);
}

/* Emergency Section */
.emergency-section {
  background: var(--danger-light);
  border: 1px solid var(--danger-light);
  border-radius: 12px;
  padding: 16px;
  max-width: 300px;
}

.emergency-toggle {
  background: white;
  border: 2px solid var(--danger-text);
  color: var(--danger-text);
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
  width: 100%;
  text-align: center;
}

.emergency-toggle:hover {
  background: var(--danger-text);
  color: white;
}

.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.status-open {
  background: var(--success);
  color: white;
}

.status-closed {
  background: var(--danger);
  color: white;
}

.holiday-highlight {
  background: #FEF3C7;
  border-left: 4px solid #F59E0B;
  padding-left: 12px;
}

.countdown-box {
  background: #DBEAFE;
  border: 1px solid #3B82F6;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.countdown-number {
  font-size: 2rem;
  font-weight: bold;
  color: #3B82F6;
}

.emergency-category {
  margin-bottom: 24px;
}

.emergency-category:last-child {
  margin-bottom: 0;
}

.category-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--n-700);
  display: flex;
  align-items: center;
  gap: 8px;
}

.emergency-numbers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.emergency-number-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--n-50);
  border-radius: 8px;
  transition: background-color 0.2s;
}

.emergency-number-item:hover {
  background-color: var(--n-100);
}

.number-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger-text);
}

.number-details {
  flex: 1;
}

.number-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.number-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--accent);
}

.number-description {
  font-size: 0.875rem;
  color: var(--n-600);
}

/* Hero Section */
.requirement-hero {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: white;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.info-block {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
}

.info-block-label {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 8px;
  font-weight: 500;
}

.info-block-value {
  font-size: 24px;
  font-weight: 700;
}

.three-column-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.requirement-detail {
  background: var(--n-50);
  border-radius: 12px;
  padding: 20px;
  height: 100%;
}

.requirement-detail h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--n-900);
}

.requirement-list {
  list-style: none;
  padding: 0;
}

.requirement-list li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--n-700);
}

.requirement-list li:before {
  content: "✓";
  position: absolute;
  left: 8px;
  color: var(--success);
  font-weight: bold;
}

.important-note {
  background: #FEF3C7;
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  padding: 16px;
  margin-top: 24px;
}

/* Filter Container */
.filter-container {
  background: var(--n-50);
  border-top: 1px solid var(--n-200);
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--n-200);
  min-height: 48px;
}

.filter-row:last-child {
  border-bottom: none;
}

.filter-label {
  font-size: 13px;
  font-weight: 600;
  color: complex--n-700);
  min-width: 80px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.selection-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--n-300);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--n-700);
  cursor: pointer;
  transition: all 0.2s;
  height: 32px;
}

.selection-display:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.selection-display svg {
  width: 14px;
  height: 14px;
  color: var(--n-500);
}

.selection-display .flag {
  font-size: 16px;
}

.menu-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--n-700);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.menu-link:hover {
  color: var(--n-900);
  border-bottom-color: var(--n-900);
}

.menu-link.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.add-passport-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--n-100);
  border: 1px solid var(--n-300);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--n-600);
  cursor: pointer;
  transition: all 0.2s;
}

.add-passport-btn:hover {
  background: var(--n-200);
  color: var(--n-700);
}

.add-passport-btn svg {
  width: 14px;
  height: 14px;
}

.divider {
  width: 1px;
  height: 16px;
  background: var(--n-300);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--n-900);
  }
  
  .emergency-section {
    border: 2px solid var(--danger-text);
  }
  
  .countdown-box {
    border: 2px solid var(--n-900);
  }
}

/* Scroll Arrow Indicator */
.scroll-indicator {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: bounce 2s infinite;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator i {
  font-size: 24px;
  color: var(--accent-color);
}

.scroll-indicator-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

.desktop-notice {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;              /* full screen height */

  display: flex;              /* enables centering */
  justify-content: center;    /* horizontal centering */
  align-items: center;        /* vertical centering */
  text-align: center;         /* center multiline text */

  background: var(--accent-color);
  color: white;
  padding: 2rem;
  font-size: 1.5rem;
  z-index: 9999;              /* on top of everything */
}

/* Button Bar */
.button-bar {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 9999;
}

/* Browser Frame */
.browser-frame {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--bg-secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 80%;
  margin: 0 auto;
  max-width: 1400px;
}

.browser-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.browser-dots {
  display: flex;
  gap: 0.375rem;
}

.browser-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.browser-dot.red {
  background-color: #ea4335;
}

.browser-dot.yellow {
  background-color: #fbbc04;
}

.browser-dot.green {
  background-color: #34a853;
}

.browser-url {
  flex: 1;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.browser-content {
  background-color: white;
  overflow-y: auto;
}

.browser-notice {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Full-width Browser Frame */
.full-width-browser-frame {
  position: relative;
  width: 100%;
  margin: 2rem 0;
  padding: 0 2rem;
  box-sizing: border-box;
}

.full-width-browser-frame .browser-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.full-width-browser-frame .browser-content {
  background-color: white;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-top: none;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
}

.full-width-browser-frame .browser-notice {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 2rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Dark mode overrides for browser frames */
.dark-mode .full-width-browser-frame .browser-content {
  background-color: var(--bg-primary);
  border-color: var(--border-color);
}

.dark-mode .full-width-browser-frame .browser-header {
  background-color: var(--bg-tertiary);
}

.dark-mode .full-width-browser-frame .browser-notice {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
}

/* Slide 1.3 make browser content a positioning context */
.slide[data-section="1"][data-slide="2"] .browser-content { 
  position: relative; 
}

/* force always-visible emergency panel */
.slide[data-section="1"][data-slide="2"] #emergencyModal.modal-overlay {
  position: absolute !important;
  top: 72px;                 /* adjust placement */
  right: 24px;
  display: block !important;
  background: transparent !important;
  padding: 0 !important;
  width: auto; height: auto;
  opacity: 1 !important; visibility: visible !important;
  pointer-events: auto;
  z-index: 100 !important;
}

/* panel styling */
.slide[data-section="1"][data-slide="2"] #emergencyModal .modal {
  position: relative !important;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: max-content;
  padding: 24px;
  box-shadow: 0 16px 48px rgba(0,0,0,.28);
}

/* don't show close button in portfolio */
.slide[data-section="1"][data-slide="2"] #emergencyModal .modal-close {
  display: none !important;
}

/* Pin emergency modal as a card on slide 1.3 (section=1, slide=2) */
.slide[data-section="1"][data-slide="2"] .browser-content {
  position: relative; /* anchor for absolute positioning */
}

/* Show overlay but make it non-interactive and transparent */
.slide[data-section="1"][data-slide="2"] .browser-content #emergencyModal {
  display: flex !important;
  position: absolute !important;
  inset: auto !important;
  top: 16px !important;
  right: 16px !important;
  bottom: auto !important;
  left: auto !important;

  /* neutralize "modal overlay" behaviour */
  background: transparent !important;
  pointer-events: none;          /* overlay doesn't capture clicks */
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 9999 !important;        /* above browser chrome */
}

/* The dialog box itself becomes a clickable card */
.slide[data-section="1"][data-slide="2"] .browser-content #emergencyModal .modal {
  position: relative !important;
  max-width: 420px !important;
  width: 420px !important;
  max-height: none !important;
  transform: none !important;

  pointer-events: auto; /* re-enable clicking inside card */
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

/* Optional: shrink typography slightly for card version */
.slide[data-section="1"][data-slide="2"] .browser-content #emergencyModal .modal-title {
  font-size: 1.125rem;
}
.slide[data-section="1"][data-slide="2"] .browser-content #emergencyModal .modal-body {
  padding-top: 12px;
}



/* Timeline */
.timeline-cards {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.timeline-card {
  flex: 1;
  min-width: 200px;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s;
}

/* Reduced hover effect for timeline cards */
.timeline-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 0.5rem 0.5rem 0 0;
}

.timeline-period {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.timeline-location {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.timeline-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.timeline-learning {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-secondary);
  padding: 0.75rem;
  background-color: var(--bg-tertiary);
  border-radius: 0.375rem;
  border-left: 3px solid var(--accent-color);
}

.timeline-singapore-row {
  width: 100%;
  margin-top: 1.5rem;
}


/* Scoring Methodology */
.scoring-methodology {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 2rem;
}

.scoring-methodology h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* ---- Clean version ---- */
.methodology-table {
  width: 100%;
  border-collapse: collapse;
}

/* Shared cell styles */
.methodology-table th,
.methodology-table td {
  padding: 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

/* Header row only */
.methodology-table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Body cells */
.methodology-table td {
  font-size: 1.02rem;
  color: var(--text-primary);
}

/* Remove bottom border from last row */
.methodology-table tr:last-child td {
  border-bottom: none;
}

/* Tooltip container */
.tooltip {
  position: relative;
  cursor: help;
  border-bottom: 1px dashed var(--text-secondary);
}

/* Tooltip bubble */
.tooltip-text {
  visibility: hidden;
  opacity: 0;

  /* spacing */
  padding: 14px 18px;
  line-height: 1.6;
  font-size: 1rem;
  font-weight: 300;

  /* layout */
  width: max-content;
  max-width: 300px;
  white-space: normal;
  text-align: center;

  /* aesthetics */
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;          /* <-- softer rounded box */
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.02em;

  /* positioning */
  position: absolute;
  left: 50%;
  bottom: 130%;
  transform: translateX(-50%);

  z-index: 9999;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Tooltip arrow */
.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px;
  border-style: solid;
  border-color: var(--bg-primary) transparent transparent transparent;
}

/* Hover state */
.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* CALLOUT — GOV/INSTITUTIONAL STYLE */
.callout {
  display: block;
  width: 100%;
  max-width: 42rem;                 /* keeps it elegant and readable */
  
  border-left: 4px solid var(--accent-color, #4C9AFF);
  background: var(--bg-secondary, #F7F9FC);
  
  padding: 1.25rem 1.5rem;
  margin: 2.5rem auto;
  
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 500;
  
  color: var(--text-primary, #111);
  
  border-radius: 0.5rem;            /* subtle, not pill */
}

/* Optional: tick styling */
.callout::before {
  content: "✓ ";
  font-weight: 600;
  color: var(--accent-color, #4C9AFF);
}

/* Feedback Sheet */
        .feedback-sheet {
            width: 210mm;
            min-height: 297mm;
            background: white;
            margin: 0 auto;
            padding: 30mm;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        
        /* Header Section */
        .header {
            background: linear-gradient(135deg, #5a6a7e 0%, #4a5568 100%);
            color: white;
            padding: 25px 30px;
            margin: -30mm -30mm 25px -30mm;
            border-radius: 0;
        }
        
        .header-grid {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 20px;
            align-items: center;
        }
        
        .student-info h1 {
            font-size: 24px;
            margin-bottom: 8px;
            font-weight: 600;
        }
        
        .student-details {
            display: flex;
            gap: 30px;
            font-size: 14px;
            opacity: 0.95;
        }
        
        .detail-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .detail-label {
            font-weight: 600;
            text-transform: uppercase;
            font-size: 11px;
            letter-spacing: 0.5px;
        }
        
        .grade-badge {
            background: white;
            color: #4a5568;
            padding: 15px 25px;
            border-radius: 8px;
            text-align: center;
            min-width: 140px;
        }
        
        .grade-badge .mark {
            font-size: 32px;
            font-weight: 700;
            line-height: 1;
        }
        
        .grade-badge .descriptor {
            font-size: 13px;
            margin-top: 5px;
            font-weight: 600;
        }
        
        /* Module Info */
        .module-info {
            background: #f8f9fa;
            padding: 15px 20px;
            margin-bottom: 25px;
            border-left: 4px solid #5a6a7e;
            font-size: 14px;
        }
        
        .module-info strong {
            color: #4a5568;
        }
        
        /* Feedback Sections */
        .feedback-section {
            margin-bottom: 25px;
        }
        
        .feedback-section h2 {
            font-size: 18px;
            color: #2d3748;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .feedback-section.strengths h2 {
            color: #059669;
            border-bottom-color: #059669;
        }
        
        .feedback-section.improvements h2 {
            color: #dc2626;
            border-bottom-color: #dc2626;
        }
        
        .feedback-section ul {
            list-style: none;
            padding-left: 0;
        }
        
        .feedback-section li {
          padding: 0px 0px 0px 30px;
          position: relative;
          line-height: 1.4;
          font-size: 15px;
          color: #4a5568;
        }
        
        .feedback-section.strengths li:before {
            content: "✓";
            position: absolute;
            left: 0;
            color: #059669;
            font-weight: bold;
            font-size: 18px;
        }
        
        .feedback-section.improvements li:before {
            content: "→";
            position: absolute;
            left: 0;
            color: #dc2626;
            font-weight: bold;
            font-size: 18px;
        }
        
        /* Learning Outcomes Summary */
        .outcomes-summary {
            margin: 30px 0;
        }
        
        .outcomes-summary h2 {
            font-size: 18px;
            color: #2d3748;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .outcome-item {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 20px;
            padding: 12px 15px;
            background: #f8f9fa;
            margin-bottom: 10px;
            border-radius: 6px;
            align-items: center;
        }
        
        .outcome-text {
            font-size: 14px;
            color: #4a5568;
        }
        
        .outcome-grade {
            background: #5a6a7e;
            color: white;
            padding: 8px 15px;
            border-radius: 5px;
            font-weight: 600;
            font-size: 14px;
            min-width: 60px;
            text-align: center;
        }
        
        /* Rubric Section */
        .rubric-section {
            margin-top: 30px;
            page-break-inside: avoid;
        }
        
        .rubric-section h2 {
            font-size: 18px;
            color: #2d3748;
            margin-bottom: 15px;
            padding-bottom: 8px;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .rubric-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 12px;
            margin-top: 15px;
        }
        
        .rubric-table th {
            background: #2d3748;
            color: white;
            padding: 12px 10px;
            text-align: left;
            font-weight: 600;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .rubric-table th:first-child {
            width: 80px;
            text-align: center;
        }
        
        .rubric-table td {
            padding: 12px 10px;
            border: 1px solid #e2e8f0;
            vertical-align: top;
            line-height: 1.5;
        }
        
        .rubric-table td:first-child {
            text-align: center;
            font-weight: 700;
            background: #f8f9fa;
            color: #2d3748;
        }
        
        .rubric-table tr.highlighted {
            background: #e2e8f0;
            border: 2px solid #5a6a7e;
        }
        
        .rubric-table tr.highlighted td {
            border-color: #5a6a7e;
            font-weight: 500;
        }
        
        .rubric-table tr.highlighted td:first-child {
            background: #5a6a7e;
            color: white;
        }
        
        /* Accessibility */
        @media print {
            body {
                padding: 0;
                background: white;
            }
            .feedback-sheet {
                box-shadow: none;
                margin: 0;
                padding: 15mm;
            }
            .header {
                margin: -15mm -15mm 20px -15mm;
            }
        }
        
        /* High contrast support */
        @media (prefers-contrast: high) {
            .header {
                background: #000;
            }
            .grade-badge {
                border: 2px solid #000;
            }
        }


        /* Bulk Marksheet Document Generator */

               .header-container {
            background-color: #fff;
            padding: 1.5rem;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .header-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #0066cc;
        }
        
        .info-box {
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 1rem;
            margin-bottom: 1.5rem;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .info-box.collapsed {
            max-height: 0;
            padding: 0;
            margin: 0;
            border: none;
            overflow: hidden;
        }
        
        .accordion-container {
            display: flex;
            flex-wrap: wrap;
            gap: 1.5rem;
            padding: 1.25rem;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            margin-bottom: 1.5rem;
        }
        
        .accordion-group {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.75rem;
        }
        
        .accordion-label {
            margin: 0;
            font-size: 0.875rem;
            font-weight: 600;
            color: #555;
            white-space: nowrap;
        }
        
        .example-btn {
            background-color: #f0f0f0;
            border: 1px solid #ddd;
            padding: 0.625rem 1.25rem;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
        }
        
        fieldset {
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            background-color: #fff;
        }
        
        legend {
            font-weight: 600;
            padding: 0 0.75rem;
        }
        
        .step-number {
            background-color: #0066cc;
            color: white;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.75rem;
            height: 1.75rem;
            margin-right: 0.75rem;
            font-weight: 600;
        }
        
        .two-column-container {
            display: flex;
            gap: 2rem;
        }
        
        .column {
            flex: 1;
        }
        
        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }
        
        input[type="text"] {
            width: 100%;
            padding: 0.625rem;
            border: 1px solid #ddd;
            border-radius: 6px;
            margin-bottom: 1rem;
        }
        
        .full-width-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: #fff;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            margin: 1rem 0;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .row-buttons-left, .row-buttons-right {
            display: flex;
            align-items: center;
            gap: 0.625rem;
        }
        
        .btn {
            padding: 0.5rem 1rem;
            border: 1px solid #ddd;
            border-radius: 6px;
            cursor: pointer;
            background-color: #f0f0f0;
        }
        
        .btn-add-rows {
            background-color: #f0f0f0;
            color: #333;
        }
        
        .btn-generate {
            background-color: #0066cc;
            color: white;
            border-color: #0066cc;
        }
        
        .btn-download {
            background-color: #28a745;
            color: white;
            border-color: #28a745;
        }
                
        .row-counter {
            background-color: #fff;
            padding: 0.75rem;
            border-radius: 6px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
            text-align: center;
            font-size: 0.875rem;
            color: #666;
            margin-top: 1rem;
        }
        
        .row-counter strong {
            color: #0066cc;
            font-weight: 600;
        }
        
        @media (max-width: 768px) {
            .two-column-container {
                flex-direction: column;
            }
            
            .full-width-bar {
                flex-direction: column;
                gap: 1rem;
            }
        }



.book {
  width: 225px;
  height: 350px;
  position:relative;
  text-align: center;
  margin:2.5%;
}

.book-cover {
  position: absolute;
  z-index:1;
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  -webkit-transform-origin: 0 50%;
  background: #111;
  background-size:cover;
  border-radius: 3px;
  box-shadow: 
    inset 4px 1px 3px #ffffff60,
    inset 0 -1px 2px #00000080;
  transition: all .5s ease-in-out;
  -webkit-transition: all .5s ease-in-out;
}

.cover {
background-image: url('images/dictionary.jpg');
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}

.book .book-cover {
  background-size: 100% 100%;
}


.effect {
  width: 20px;
  height: 100%;
  margin-left: 10px;
  border-left: 2px solid #00000010;
  background-image: linear-gradient(90deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 100%);
  transition: all .5s ease;
}

.light {
  width: 90%;
  height: 100%;
  position: absolute;
  border-radius: 3px; 
  background-image: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 100%);
  top: 0;
  right:0;
  opacity: .1;
  transition: all .5s ease;
  -webkit-transition: all .5s ease;
}

.book:hover { cursor:pointer; }

.book:hover .book-cover {
  transform: perspective(2000px) rotateY(-30deg);
  -webkit-transform: perspective(2000px) rotateY(-30deg);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  box-shadow: 
    inset 4px 1px 3px #ffffff60,
    inset 0 -1px 2px #00000080,
    10px 0px 10px -5px #00000030
}

.book:hover .effect {
  width: 40px;
 /** margin-left:13px;
  opacity: 0.5; **/
}

.book:hover .light {
  opacity: 1;
  width: 70%;
}

.book-inside{
  width: calc(100% - 2px);
  height:96%;
  position:relative;
  top: 2%;
  border: 1px solid grey;
  border-radius:3px;
  background: white;
  box-shadow: 
  10px 40px 40px -10px #00000030,
  inset -2px 0 0 grey,
  inset -3px 0 0 #dbdbdb,
  inset -4px 0 0 white,
  inset -5px 0 0 #dbdbdb,
  inset -6px 0 0 white,
  inset -7px 0 0 #dbdbdb,
  inset -8px 0 0 white,
  inset -9px 0 0 #dbdbdb;
}

.title {
  font-size:22px;
  width: 100%;
  color: #333;
  text-align: center;
  position: absolute;
  top:-30px;
  height: 1px;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  transition: all 1s ease-in-out;
  -webkit-transition: all 1s ease-in-out;
}

.title p {
  width: 100%;
  margin:0;
  line-height:1.3;
}


.btn {
  position:relative;
  background: #aaa;
  color: #fff;
  font-weight: bold;
  padding: 15px 30px;
  font-size: 16px;
  letter-spacing:1px;
  border-radius: 50px;
  bottom: -50px;
  display: inline-block;
  opacity: 0;
  transition: all 1s ease-in-out;
  -webkit-transition: all 1s ease-in-out;
}

.book:hover .btn, .book:hover .title {
  opacity: 1;
}


/* ===== Layout for cover + text ===== */
.dictionary-section {
  --book-w: 320px;           /* <— resize the book here */
  display: flex;
  align-items: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

/* Make the existing .book size responsive via a ratio */
.book.book--dictionary {
  width: var(--book-w);
  height: calc(var(--book-w) * 1.555);  /* 225×350 ratio */
  will-change: transform;
}

/* Use your cover file */
.cover-dictionary {
  background-image: url('images/dictionary.jpg');
  background-size: cover;
  background-position: center;
}

/* Right column */
.dictionary-info {
  min-width: 260px;
  max-width: 46ch;
  line-height: 1.6;
}

.dictionary-info h3 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.govtech-points {
  margin: 0.75rem 0 1rem;
  padding-left: 1.1rem;
}

.govtech-points li {
  margin: 0.25rem 0;
}

.caption {
  opacity: .7;
  font-style: italic;
}

/* Stack on small screens */
@media (max-width: 800px) {
  .dictionary-section { gap: 1.5rem; }
  .dictionary-info { max-width: 100%; }
  .book.book--dictionary { --book-w: 260px; }
}


.project-grid{
  display:grid; gap:1.25rem;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
@media (max-width:1100px){ .project-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px){ .project-grid{ grid-template-columns:1fr; } }

.project-card{
  display:flex; flex-direction:column; text-align:left;
  border:1px solid var(--border-color,#e5e7eb);
  background:var(--bg-secondary,#fafafa);
  border-radius:1rem; overflow:hidden; cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  outline:none; width:100%;
}
.project-card:focus-visible{ box-shadow:0 0 0 2px rgba(59,130,246,.35); transform:translateY(-1px); }

.project-card .thumb{
  aspect-ratio: 16/9;
  background: var(--bg-primary,#fff) center/cover no-repeat;
  background-image: var(--img);
}

.project-card .body{ padding:1rem 1.1rem 1.2rem; }
.project-card .row{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.25rem; }
.project-card h3{ font-weight:600; font-size:1.1rem; line-height:1.3; margin:0; color:var(--text-primary,#111827); }
.project-card .kicker{ font-size:.95rem; color:var(--text-secondary,#4b5563); margin:.15rem 0 .35rem; }
.project-card .impact{ font-size:1rem; color:var(--text-primary,#111827); margin:.25rem 0 .75rem; }

.chip{
  font-size:.8rem; padding:.25rem .5rem; border-radius:999px;
  background:rgba(0,0,0,.05); color:var(--text-secondary,#4b5563);
  border:1px solid var(--border-color,#e5e7eb);
}

.meta{ display:flex; gap:.4rem; flex-wrap:wrap; }
.tag{
  font-size:.8rem; padding:.25rem .5rem; border-radius:.5rem;
  background:#fff; border:1px solid var(--border-color,#e5e7eb);
  color:var(--text-secondary,#4b5563);
}


.dot-container {
    display: inline-block;
    margin: 0 2px;
    position: relative;
}

.mini-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid var(--text-tertiary);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    opacity: 0.5;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-progress-dot.active {
    background: var(--text-primary);
    opacity: 1;
    border-color: var(--text-primary);
}

.mini-progress-dot:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Special dots styling */
.mini-progress-dot.special-dot {
    background-color: var(--special-dot-bg, #888);
    opacity: 0.7;
    border-color: var(--special-dot-border, #888);
}

.mini-progress-dot.special-dot.active {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
}

/* Tooltip styling */
.dot-tooltip {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--tooltip-bg, #333);
    color: var(--tooltip-color, #fff);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

/* Dark mode support */
.dark-mode .dot-tooltip {
    background-color: var(--tooltip-bg-dark, #222);
    color: var(--tooltip-color-dark, #fff);
}

/* Target selector for slides */
.slide:target {
  display: block !important;
  z-index: 10;
  scroll-margin-top: 80px; /* Modern alternative to scroll-padding-top */
}

/* Style for project cards to make them look like buttons */
.project-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ensure project cards maintain their button appearance */
.project-card:focus {
  outline: 2px solid #4a90e2;
  outline-offset: 2px;
}


.instruction-box {
  border: 1px solid #e4e4e4;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  font-size: 1.35rem;
  line-height: 1.65;
}

.instruction-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

.instruction-box li {
  margin-bottom: 0.75rem;
}

@media (min-width: 768px){
  /* Only affect these three */
  #tocBtn .md\:inline,
  #searchBtn .md\:inline,
  #kbdInfo .md\:inline { display:none !important; }

  #tocBtn .md\:hidden,
  #searchBtn .md\:hidden,
  #kbdInfo .md\:hidden { display:inline !important; }

  #tocBtn.control-pill,
  #searchBtn.control-pill,
  #kbdInfo.control-pill{
    padding:.28rem; width:30px; height:30px; display:inline-grid; place-items:center;
  }
}

/* Slightly tighten the A− / A+ pills */
#decreaseFont.control-pill, #increaseFont.control-pill{ padding:.26rem .5rem; font-size:.9rem; }

/* Container for the unified pill */
.font-controls {
  display: inline-flex;
  border: 1px solid #d9d9d9;
  border-radius: 999px; /* full pill */
  overflow: hidden; /* hides individual button shape corners */
}

/* Buttons inside */
.font-controls button {
  padding: 0.3rem 0.75rem;
  background: var(--bg-secondary);
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--text-primary);
}

/* Hover + active state */
.font-controls button:hover {
  background: #eee;
}

.font-controls button:active {
  background: #ddd;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--n-300);
  background: #f8f8f8;
  color: var(--text-primary);
}

/* Position it in the top right of the card */
.badge-top {
  position: absolute;
  top: 24px;
  right: 24px;
}

/* ================================
   ✨ FINAL SPREADSHEET TABLE STYLES
   Overrides everything above
   ================================ */

/* uniform grey grid on all cells */
#rubrictable, #feedbackTable {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  width: 100%;
}

#rubrictable th, #rubrictable td,
#feedbackTable th, #feedbackTable td {
  border: 1px solid #d9d9d9 !important; /* light Excel-style border */
  padding: 6px 8px !important;
}

/* header */
#rubrictable thead th,
#feedbackTable thead th {
  background: #fafafa !important;
  font-weight: 600;
  color: #444;
}

/* ✅ SINGLE CELL hover highlight */
#rubrictable td:hover,
#feedbackTable td:hover {
  background: #fff8d6 !important;   /* pale yellow */
  transition: background 0.15s ease;
  cursor: text;
}

/* focused (editing) cell – subtle outline */
#rubrictable [contenteditable="true"]:focus,
#feedbackTable [contenteditable="true"]:focus {
  outline: 2px solid #ffce45 !important;
  outline-offset: -2px;
  background: #fff6bb !important;
}


.css-magnifier {
  position: relative;
  display: inline-block;
}

.group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin: 0.5rem 0 0.5rem;
    color: var(--text-primary);
}

.group-header svg {
    stroke-width: 1.75;
}