/* ── 1. CSS Custom Properties (Light Mode defaults) ─────────────── */
:root {
  /* Page & surfaces — GF uses clean white/near-white */
  --pg:  #FFFFFF;
  --pc:  #FFFFFF;
  --pi:  #F8F9FA;
  --ph:  #F1F3F4;

  /* Borders — GF's signature light grey */
  --bc:  #DADCE0;
  --bi:  #BDC1C6;
  --bd:  #E8EAED;

  /* Primary — Google Blue */
  --gr:  #1557B0; /*#1A73E8*/
  --gl:  #E8F0FE;
  --gd:  #1557B0;

  /* Accent — Google Green (used for eligible / positive signals) */
  --ac:  #137333;
  --al:  #E6F4EA;

  /* Eligible (success green — unchanged) */
  --ok:  #137333;
  --ob:  #E6F4EA;
  --or:  #81C995;

  /* Not-eligible (red — unchanged) */
  --no:  #B31412;
  --nb2: #FCE8E6;
  --nr:  #F28B82;

  /* Warning / manual alert */
  --wt:  #B06000;
  --wb:  #FEF7E0;
  --wr:  #FDD663;
  --wa:  #F9AB00;

  /* Typography — GF uses near-black + medium grey */
  --tp:  #202124;
  --ts:  #5F6368;
  --tm:  #80868B;

  /* Navigation */
  --nv:  #1557B0;
  --nt:  #E8EAED;
  --nm:  rgba(232,234,237,0.55);
  --ns:  rgba(32,33,36,0.12);

  /* Shadows & effects */
  --sh:  0 1px 2px rgba(60,64,67,0.08), 0 2px 6px rgba(60,64,67,0.06);
  --shh: 0 1px 3px rgba(60,64,67,0.12), 0 4px 12px rgba(60,64,67,0.10);
  --fr:  0 0 0 3px rgba(26,115,232,0.20);
  --bs:  0 2px 10px rgba(26,115,232,0.28);
  --bt:  #FFFFFF;

  /* Time Slot Clash */
  --cl:  #174A7E;
  --clb: #EEF4FB;
  --clr: #85B7D9;

  /* Typefaces */
  --font-display: 'Source Serif 4', serif;
  --font-body:    'Karla', sans-serif;
  --font-hero:    'Poppins', sans-serif;
}
 
/* ── 2. Dark Mode overrides ──────────────────────────────────────── */
.dark {
  --pg:  #202124;
  --pc:  #292A2D;
  --pi:  #1C1D1F;
  --ph:  #35363A;
  --bc:  #3C4043;
  --bi:  #5F6368;
  --bd:  #303134;
  --gr:  #8AB4F8;
  --gl:  rgba(138,180,248,0.14);
  --gd:  #93C5FD;
  --ac:  #81C995;
  --al:  rgba(129,201,149,0.14);
  --ok:  #81C995;
  --ob:  rgba(129,201,149,0.12);
  --or:  #34A853;
  --no:  #F28B82;
  --nb2: rgba(242,139,130,0.12);
  --nr:  #C5221F;
  --wt:  #FDD663;
  --wb:  rgba(253,214,99,0.10);
  --wr:  #594300;
  --wa:  #FDD663;
  --tp:  #E8EAED;
  --ts:  #9AA0A6;
  --tm:  #5F6368;
  --nv:  #202124;
  --nt:  #E8EAED;
  --nm:  rgba(232,234,237,0.55);
  --ns:  rgba(255,255,255,0.10);
  --sh:  0 1px 3px rgba(0,0,0,0.30), 0 4px 12px rgba(0,0,0,0.25);
  --shh: 0 2px 6px rgba(0,0,0,0.35), 0 8px 24px rgba(0,0,0,0.30);
  --fr:  0 0 0 3px rgba(138,180,248,0.24);
  --bs:  0 2px 10px rgba(0,0,0,0.40);
  --bt:  #202124;
  --cl:  #8AB4F8;
  --clb: #0D1A2E;
  --clr: #1F3D5C;
}
 
/* ── 3. Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
html {
  /* Smooth colour transitions on theme toggle */
  transition: background-color 0.2s ease;
}
 
body {
  font-family: var(--font-body);
  background: var(--pg);
  color: var(--tp);
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Global theme transition — background, border, colour only */
div, span, p, h1, h2, label, button, input, select, textarea, nav, a, li {
  transition:
    background-color 0.2s ease,
    border-color     0.2s ease,
    color            0.2s ease,
    box-shadow       0.2s ease;
}
 
/* ── 4. Typography helpers ───────────────────────────────────────── */
.sec-label {
  font-family: var(--font-hero);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--tp);
}
 
.text-muted-italic {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--tp);
}
 
/* ── 5. Navigation bar ───────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 56px;
  background: var(--nv);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
 
.nav-left {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
 
.nav-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
  margin-right: 10px;
}
 
.nav-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--nt);
  white-space: nowrap;
  margin-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
.nav-sep {
  width: 1px;
  height: 16px;
  background: var(--ns);
  flex-shrink: 0;
  margin: 0 10px;
}
 
.nav-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--nm);
  white-space: nowrap;
}
 
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.nav-docs-link {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--nt);
  text-decoration: none;
  opacity: 0.8;
  margin-right: 12px;
  transition: opacity 0.15s ease;
}
.nav-docs-link:hover { opacity: 1; }

.nav-brand-link {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  min-width: 0;
}

.t-short { display: none; }
 
.theme-btn {
  width: 68px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
 
.theme-btn:hover { background: rgba(255,255,255,0.25); }
 
.nav-ugac {
  width: 75px;
  height: 75px;
  object-fit: contain;
  flex-shrink: 0;
}

.dark #dav-icon {
  filter: invert(1);
}
 
/* ── 6. Page content wrapper ─────────────────────────────────────── */
.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 72px;
}
 
/* ── 7. Hero ─────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 48px 0 8px;
}
 
.hero-title {
  font-family: var(--font-hero);
  font-weight: 700;
  font-size: 35px;
  color: var(--tp);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
 
.hero-sub {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--tp);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}
 
/* ── 8. Cards ────────────────────────────────────────────────────── */
.card {
  background: var(--pc);
  border: 1px solid var(--bc);
  border-radius: 12px;
  box-shadow: var(--sh);
  padding: 36px;
  margin-top: 24px;
}
 
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
 
.help-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--bi);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  color: var(--tm);
  cursor: default;
  flex-shrink: 0;
}
 
.divider-dash {
  height: 1px;
  border-top: 1px dashed var(--bd);
  margin-bottom: 24px;
}
 
/* ── 9. Form grid & floating-label fields ────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
 
/* Field wrapper */
.field {
  position: relative;
}
 
.field-full { margin-bottom: 24px; }
 
/* All native controls share the same base styling */
.field input,
.field select,
.field textarea {
  width: 100%;
  height: 52px;
  padding: 22px 14px 10px;
  background: var(--pg);
  border: 1px solid var(--bi);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--tp);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
 
.field textarea {
  height: auto;
  min-height: 96px;
  padding-top: 28px;
  resize: vertical;
  line-height: 1.6;
  color: var(--ts);
}
 
/* Select: custom chevron via background SVG */
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231A73E8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
 
.dark .field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238AB4F8'/%3E%3C/svg%3E");
}
 
/* Student ID: monospace value, icon room */
#student_id {
  font-family: var(--font-body);
  padding-right: 40px;
}
 
 
/* Floating label — default (resting) */
.field label {
  position: absolute;
  left: 14px;
  top: 17px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--tm);
  pointer-events: none;
  transition:
    top      0.16s ease,
    font-size 0.16s ease,
    color    0.16s ease,
    font-weight 0.16s ease,
    letter-spacing 0.16s ease;
}
 
/* Floating label — active/filled state for inputs & textarea */
.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label,
.field textarea:not(:placeholder-shown) ~ label {
  top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ac);
  letter-spacing: 0.5px;
}
 
/* Select floating label */
.field select:focus ~ label,
.field select.has-value ~ label {
  top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ac);
  letter-spacing: 0.5px;
}
 
/* Focus ring
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gr);
  background: var(--pc);
  box-shadow: var(--fr);
}*/
 
/* ── 10. Primary button ───────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  cursor: pointer;
  background: var(--gr);
  color: var(--bt);
  box-shadow: var(--bs);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    background-color 0.18s ease,
    box-shadow       0.18s ease,
    transform        0.14s ease,
    color            0.18s ease;
}
 
.btn-primary:active { transform: translateY(0); }
 
.btn-primary:disabled {
  background: var(--bc);
  color: var(--tm);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  border: 1px solid var(--bi);
}
 
/* ── 11. Reset / secondary button ────────────────────────────────── */
.reset-row {
  text-align: center;
  margin-top: 36px;
}
 
.btn-reset {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--tm);
  background: transparent;
  border: 1px solid var(--bc);
  border-radius: 8px;
  padding: 10px 28px;
  text-decoration: none;
  cursor: pointer;
}
 
.btn-reset:hover { color: var(--gr); border-color: var(--or); }
 
/* ── 12. Manual history alert ────────────────────────────────────── */
.manual-alert {
  background: var(--wb);
  border: 1px solid var(--wr);
  border-radius: 0 8px 8px 0;
  padding: 16px 18px;
  margin-bottom: 4px;
}
 
.manual-alert-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
 
.manual-warn-icon {
  font-size: 16px;
  color: var(--wt);
  flex-shrink: 0;
  margin-top: 1px;
}
 
.manual-alert-text {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--wt);
  opacity: 0.88;
  margin-top: 6px;
  line-height: 1.5;
}
 
/* ── 13. Chips ───────────────────────────────────────────────────── */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
 
.chip {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  border-radius: 50px;
}
 
.chip-primary {
  font-size: 13px;
  color: var(--tp);
  font-weight: bold;
  padding: 5px 11px;
}
.chip-example {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
 
.chip-ex-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--tm);
}
 
/* ── 14. Badges ──────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 11px;
  border-radius: 6px;
  padding: 3px 10px;
}
 
.badge-accent {
  color: var(--tp);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.5;
}
 
.badge-ok {
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.5;
}

.badge-consent {
  color: var(--ac);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.5;
}

.badge-clash {
  color: var(--cl);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.5;
}
 
.badge-no {
  color: var(--no);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.5;
}

/* ── Minor label on course code + name row ──────────────────────────────── */
.entry-minor-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ac);
  flex-shrink: 0;
}

/* ── Division selector inside entries ────────────────────────────── */
.entry-div-wrap {
  margin: 8px 0 4px;
}

.div-select {
  width: 100%;
  padding: 6px 28px 6px 10px;
  border: 2px solid var(--bi);
  border-radius: 50px;
  background: transparent;
  color: var(--tp);
  font-family: var(--font-body);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231A73E8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.dark .div-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238AB4F8'/%3E%3C/svg%3E");
}

/* ── Minor registration message ──────────────────────────────────── */
.minor-msg {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #FDF4DC;
  font-family: var(--font-body);
  font-size: 11.75px;
  color: var(--tp);
  line-height: 1.6;
}


.dark .minor-msg{background: #1C1608;}

/* ── Query fallback notice ───────────────────────────────────────── */
.fallback-alert {
  margin-bottom: 24px;
  /*margin-left: 100px;*/
  padding: 14px 18px;
  background: #FDF4DC;
  border-radius: 10px;
}

.fallback-alert__body {
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: var(--tp);
  margin: 0;
  line-height: 1.55;
}

.dark .fallback-alert{background: #1C1608;}

/* ── 15. Results grid ────────────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}
 
.result-card {
  border-radius: 12px;
  box-shadow: var(--sh);
  padding: 28px;
}
 
.card-ok {
  background: var(--pc);
  border: 1px solid var(--bc);
}

.card-consent {
  background: var(--pc);
  border: 1px solid var(--bc);
}

.card-clash {
  background: var(--pc);
  border: 1px solid var(--bc);
}
 
.card-no {
  background: var(--pc);
  border: 1px solid var(--bc);
}
 
.result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
 
.result-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}
 
.result-ok { color: var(--ok); }
.result-consent { color: var(--ac); }
.result-clash { color: var(--cl); }
.result-no { color: var(--no); }
 
.result-divider {
  height: 1px;
  margin-bottom: 8px;
}
 
.divider-ok { background: var(--or); opacity: 0.5; }
.divider-consent { background: var(--wr); opacity: 0.6; }
.divider-clash { background: var(--clr); opacity: 0.5; }
.divider-no { background: var(--nr); opacity: 0.5; }

/* ── Tabs (X/Twitter Style) ── */
.tabs-container {
  display: flex;
  border-bottom: 1px solid var(--bd);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  background: transparent;
  border: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--tm);
  padding: 16px 24px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.tab-btn:hover {
  color: var(--tp);
  background: var(--ph);
}
.tab-btn.active {
  color: var(--tp);
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gr);
  border-radius: 4px 4px 0 0;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
 
/* ── 16. Course entries ──────────────────────────────────────────── */
.entry {
  background: var(--pc);
  padding: 24px;
  border: 1px solid var(--bc);
  border-radius: 12px;
  box-shadow: var(--sh);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  margin-bottom: 16px;
}

.entry-code {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  opacity: 0.75;
}

.entry-code-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  margin-bottom: 6px;
}
 
.entry-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--tp);
  line-height: 1.3;
  margin-bottom: 6px;
}
 
.entry-meta {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tp);
  line-height: 1.6;
}

.div-slot {
  white-space: pre-line;
  font-family: var(--font-body);
}

.div-instructor {
  white-space: pre-line;
  font-family: var(--font-body);
}
 
.entry-reason {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--no);
}

.entry-clash-msg {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cl);
  line-height: 1.5;
}

.entry-equiv-msg {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: transparent;
  border: 2px solid var(--bi);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: bold;
  color: var(--ts);
  line-height: 1.5;
}

/* ── Click-to-expand: chevron ─────────────────────────────────── */
.entry { cursor: pointer; }
 
.entry-chevron {
  font-size: 25px;
  color: var(--gr);
  flex-shrink: 0;
  transition: transform 0.25s ease, color 0.2s ease;
  line-height: 1;
  margin-left: 8px;
}
 
.entry.expanded .entry-chevron {
  transform: rotate(180deg);
}
 
/* ── Click-to-expand: description panel ──────────────────────── */
.entry-desc-wrap {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}
 
.entry.expanded .entry-desc-wrap {
  max-height: None;
}
 
.entry-desc-divider {
  height: 1px;
  border-top: 1px dashed var(--bd);
  margin: 12px 0 10px;
}
 
.entry-desc-label {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tm);
  margin-bottom: 6px;
}
 
.entry-desc-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tp);
  line-height: 1.65;
  margin: 0;
  padding-bottom: 4px;
}

.score {
  font-size: 13px;
  opacity: 0.75;
  color: var(--tp);
  margin-top: 2px;
  margin-bottom: 4px;
  font-family: var(--font-body);
}

/* ── Grade statistics ────────────────────────────────────────────── */
.grade-stats-wrap {
  margin-bottom: 6px;
}

.grade-years-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.grade-year-block {
  flex: 1;
  min-width: 160px;
}

.grade-stats-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tm);
  margin-bottom: 6px;
}

.grade-year-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--tp);
  margin-bottom: 6px;
  opacity: 0.75;
}

.grade-years-col {
  flex-direction: column;
}

.grade-div-block { margin: 0; }

.grade-divs-row {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
}

.grade-div-name {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--tp);
  margin-bottom: 5px;
}

.grade-div-sep {
  height: 1px;
  border-top: 1px dotted var(--bd);
  margin: 6px 0;
}

.grade-chart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 6px 0;
}

.grade-chart-wrap { flex-shrink: 0; }

.grade-pct-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.grade-pct-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 12px;
}

.grade-pct-label {
  color: var(--tm);
  min-width: 44px;
}

.grade-pct-val {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--tp);
}

.grade-stats-divider {
  height: 1px;
  border-top: 1px dashed var(--bd);
  margin: 10px 0 8px;
}
 
/* ── 17. Empty states ────────────────────────────────────────────── */
.empty-result {
  text-align: center;
  padding: 20px 0;
  color: var(--ts);
}
 
.empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
  opacity: 0.5;
}
 
.empty-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--ts);
}
 
.empty-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tm);
  margin-top: 4px;
}

/* ── Feedback ────────────────────────────────────────────────────── */
.star-label {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tm);
  margin-bottom: 10px;
}

.star-row { display: flex; gap: 4px; margin-bottom: 12px; }

.star {
  font-size: 32px;
  color: var(--tm);
  cursor: pointer;
  line-height: 1;
  transition: color 0.12s ease, transform 0.1s ease;
}

.star.hover  { color: #D4A040; opacity: 0.65; transform: scale(1.1); }
.star.active { color: #D4A040; }

.feedback-section {
    margin-top: 72px;
    padding-top: 32px;
}

.feedback-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feedback-header p {
    color: var(--ts);
    max-width: 42rem;
}

.feedback-success {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tp);
  background: var(--gl);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.toast-stack {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.toast {
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.toast-success {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tp);
  background: var(--gl);
  border-radius: 8px;
  padding: 10px 14px;
}

.toast-error {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--tp);
  background: var(--nb2);
  border-radius: 8px;
  padding: 10px 14px;
}
 
/* ── 18. Animations ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}
 
.fade-up    { animation: fadeUp 0.38s ease both; }
.fade-up-d1 { animation: fadeUp 0.38s 0.09s ease both; }
.fade-up-d2 { animation: fadeUp 0.38s 0.18s ease both; }
.fade-up-d3 { animation: fadeUp 0.38s 0.27s ease both; }
 
/* ══════════════════════════════════════════════════════════════════
   19. RESPONSIVE LAYOUT
   Three breakpoints:
     ≤ 900px  tablet  — tighten content column, stack results grid
     ≤ 640px  mobile  — single column everything, abbreviate nav
     ≤ 400px  small   — micro-phone adjustments
══════════════════════════════════════════════════════════════════ */
 
/* ── Tablet (641px – 900px) ──────────────────────────────────────── */
@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr; }
 
  .nav-title {
    font-size: 14px;
    /* Prevent very long title from pushing right-side controls off screen */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
  }
}
 
/* ── Mobile (≤ 640px) ────────────────────────────────────────────── */
@media (max-width: 640px) {
 
  /* ── Nav: show abbreviated title to save space ── */
  .navbar { padding: 0 14px; height: 52px; }
 
  .nav-logo  { width: 26px; height: 26px; margin-right: 8px; }
  .nav-ugac  { width: 36px; height: 36px; }
 
 
  .t-full  { display: none; }
  .t-short { display: inline; }
  .nav-title .t-short { font-size: 14px; }

  .nav-right { gap: 8px; flex-shrink: 1; min-width: 0; }
  .nav-docs-link { font-size: 13px; margin-right: 0; }

  /* Collapse the theme-btn label to icon only */
  .theme-btn { width: 36px; }
 
  /* Hide separator and UGAC sub-label in left cluster */
  .nav-sep { display: none; }
  .nav-sub { display: none; }
 
  /* ── Content ── */
  .content { padding: 52px 14px 56px; }
 
  /* ── Hero ── */
  .hero { padding: 32px 0 4px; }
  .hero-title { font-size: 22px; }
  .hero-sub   { font-size: 14px; }
 
  /* ── Cards ── */
  .card        { padding: 20px; margin-top: 16px; }
  .result-card { padding: 18px; }
 
  /* ── Form grid: single column ── */
  .form-grid { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }

  .tab-content, .results-grid { min-width: 0; }
  .entry { max-width: 100%; overflow: hidden; }
  .entry-meta, .div-slot, .div-instructor,
  .minor-msg, .minor-remark-note, .minor-remark-warning { overflow-wrap: anywhere; }
 
  /* ── iOS Safari: prevent auto-zoom on input focus.
       Safari zooms whenever font-size < 16px on a focused input.
       Inputs are bumped to 16px on mobile and the label is adjusted accordingly. ── */
  .field input,
  .field select,
  .field textarea {
    font-size: 16px;
  }
 
  /* Re-tune floating label sizes for 16px base */
  .field input:focus ~ label,
  .field input:not(:placeholder-shown) ~ label,
  .field textarea:focus ~ label,
  .field textarea:not(:placeholder-shown) ~ label,
  .field select:focus ~ label,
  .field select.has-value ~ label {
    top: 7px;
    font-size: 10px;
  }
 
  /* ── Field icon stays vertically centred ── */
  .field-icon { font-size: 12px; }
 
  /* ── Buttons: make touch targets comfortably tappable ── */
  .btn-primary { height: 50px; font-size: 15px; }
  .btn-reset   { padding: 12px 24px; font-size: 14px; }
 
  /* ── Manual alert ── */
  .manual-alert { padding: 14px; }
 
  /* ── Chips: smaller padding on small screens ── */
  .chip-primary  { font-size: 11px; padding: 4px 9px; }
  .chip-example  { gap: 6px; }
 
  /* ── Course entries ── */
  .entry { padding: 14px 12px; }
  .entry-code-row { flex-wrap: wrap; row-gap: 2px; }
  .entry-code { font-size: 15px; }
  .entry-name { font-size: 13.5px; }
  .entry-meta { font-size: 12px; }
  .score { font-size: 11.5px; }
  .entry-desc-text { font-size: 12.5px; }
  .entry-desc-label, .grade-stats-label { font-size: 11px; letter-spacing: 1px; }
  .tab-btn { padding: 12px 14px; font-size: 13.5px; }
  .tabs-container { scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs-container::-webkit-scrollbar { display: none; }

  .minor-msg,
  .minor-remark-note,
  .minor-remark-warning { padding: 8px 10px; font-size: 11.5px; }
 
  /* ── Badges ── */
  .badge { font-size: 10px; padding: 2px 8px; }

 /* ── Grade statistics: side-by-side years, reduced pie size ── */
  .grade-year-block { min-width: 0; flex: 1 1 45%; }
  .grade-years-row  { gap: 12px; }
  .grade-year-name { font-size: 11.5px; letter-spacing: 1px; }
  .grade-div-name, .grade-pct-item { font-size: 11px; }
  .grade-chart-row  { flex-direction: column; align-items: center; gap: 8px; }
  .grade-pct-col    { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; justify-content: center; }
  .grade-pct-label { min-width: 0; }
  .grade-pct-item { gap: 4px; }
  .grade-divs-row   { flex-wrap: wrap; gap: 12px; }
  .grade-pie-chart  { max-width: 110px; height: auto !important; aspect-ratio: 1 / 1; }
 
  /* ── Prevent any element from causing horizontal scroll ── */
  .results-grid { gap: 14px; }
}
 
/* ── Small phones (≤ 400px) ──────────────────────────────────────── */
@media (max-width: 400px) {
  .navbar { padding: 0 10px; }
  .content { padding: 52px 10px 48px; }
  .card    { padding: 16px; }
  .hero-title { font-size: 20px; }
 
  .tab-btn { padding: 10px 10px; font-size: 12.5px; }
  .entry   { padding: 12px 10px; }
  .nav-ugac { display: none; }
}
 
/* ── Global overflow guard: never let content wider than viewport ── */
html, body { overflow-x: hidden; max-width: 100%; }

/* ── 20. Profile section ─────────────────────────────────────────── */
/* Flat layout — no card box; a rule replaces the card chrome.        */
.profile-section {
  margin-top: 32px;
}

/* ── Profile rule ────────────────────────────────────────────────── */
.profile-rule {
  height: 1px;
  background: var(--bd);
  margin: 16px 0;
}

/* ── Profile header — Student ID  ───────────── */
.profile-hd {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.profile-id {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 20px;
  color: var(--gr);
  letter-spacing: -0.5px;
  line-height: 1;
}

.sign-out-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--tm);
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
  flex-shrink: 0;
}


/* ── Two-column row for Degree / Batch Year ──────────────────────── */
.form-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* ── 21. History section ─────────────────────────────────────────── */
/* Flat layout, no card box. Dead code once history is hidden,        */
/* kept here so toggling it back on costs nothing.                    */
.history-section {
  margin-top: 32px;
}

.history-hd {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.history-title {
  font-family: var(--font-hero);
  font-weight: 600;
  font-size: 15px;
  color: var(--tp);
}

.history-count {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ts);
}

/* ── Course grid — plain multi-column text, no per-item decoration ─ */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px 16px;
  padding: 4px 0 8px;
}

.course-code {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 13px;
  color: var(--gr);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
 
/* Remark note shown inside each minor-mode course card */
.minor-remark-note {
  font-family: var(--font-body);
  font-size: 11.75px;
  color: var(--tp);
  background: var(--gl);
  border-radius: 4px;
  padding: 7px 11px;
  margin: 8px 0 4px;
  line-height: 1.5;
}
.minor-remark-warning {
  font-family: var(--font-body);
  font-size: 11.75px;
  color: var(--tp);
  background: var(--gl);
  border-radius: 4px;
  padding: 7px 11px;
  margin: 8px 0 4px;
  line-height: 1.5;
}

/* ── 22. Documentation page ─────────────────────────────────────── */
/* ── Documentation-specific layout ─────────────────────────── */
    .doc-layout {
      display: flex;
      max-width: 1100px;
      margin: 0 auto;
      padding: 80px 24px 80px;
      gap: 40px;
      align-items: flex-start;
    }
 
    /* Sticky sidebar TOC */
    .doc-toc {
      flex: 0 0 210px;
      position: sticky;
      top: 80px;
      background: var(--pc);
      border: 1px solid var(--bc);
      border-radius: 12px;
      padding: 20px;
      box-shadow: var(--sh);
    }
 
    .doc-toc-title {
      font-family: var(--font-body);
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 2px;
      text-transform: uppercase;
      color: var(--ac);
      margin-bottom: 12px;
    }
 
    .doc-toc ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
 
    .doc-toc li { margin: 2px 0; }
 
    .doc-toc a {
      display: block;
      font-family: var(--font-body);
      font-size: 12px;
      color: var(--ts);
      text-decoration: none;
      padding: 5px 8px;
      border-radius: 6px;
      transition: background 0.15s ease, color 0.15s ease;
    }
 
    .doc-toc a:hover,
    .doc-toc a.active {
      background: var(--gl);
      color: var(--gr);
    }
 
    .doc-toc .toc-sub {
      padding-left: 16px;
      font-size: 11px;
    }
 
    /* Main content */
    .doc-content {
      flex: 1;
      min-width: 0;
    }
 
    .doc-page-title {
      font-family: var(--font-display);
      font-size: 40px;
      font-weight: 700;
      color: var(--tp);
      margin-bottom: 6px;
      line-height: 1.2;
    }
 
    .doc-page-sub {
      font-family: var(--font-body);
      font-size: 16px;
      color: var(--ts);
      margin-bottom: 36px;
    }
 
    /* Sections */
    .doc-section {
      margin-bottom: 48px;
      scroll-margin-top: 90px;
    }
 
    .doc-section-title {
      font-family: var(--font-display);
      font-size: 25px;
      font-weight: 600;
      color: var(--tp);
      margin-bottom: 16px;
      padding-bottom: 8px;
      border-bottom: 2px solid var(--bc);
      display: flex;
      align-items: center;
      gap: 10px;
    }
 
    .sec-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: var(--gr);
      color: #fff;
      font-family: var(--font-body);
      font-size: 12px;
      font-weight: 700;
      flex-shrink: 0;
    }
 
    .doc-subsection-title {
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 600;
      color: var(--tp);
      margin: 20px 0 10px;
    }
 
    .doc-body {
      font-family: var(--font-body);
      font-size: 16px;
      color: var(--ts);
      line-height: 1.75;
    }
 
    .doc-body p { margin-bottom: 12px; }
 
    .doc-body strong { color: var(--tp); }
 
    .doc-body ul {
      padding-left: 20px;
      margin-bottom: 12px;
    }
 
    .doc-body li { margin-bottom: 6px; }
 
    /* Info / warning boxes */
    .doc-infobox {
      background: var(--wb);
      border-radius: 8px;
      padding: 12px 16px;
      font-family: var(--font-body);
      font-size: 13px;
      color: var(--tp);
      line-height: 1.6;
      margin: 14px 0;
    }
 
    .doc-greenbox {
      background: var(--ob);
      border-radius: 8px;
      padding: 12px 16px;
      font-family: var(--font-body);
      font-size: 13px;
      color: var(--tp);
      line-height: 1.6;
      margin: 14px 0;
    }
 
    /* Score cards */
    .score-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin: 16px 0;
    }
 
    .score-card {
      background: var(--pc);
      border: 1px solid var(--bc);
      border-radius: 12px;
      padding: 18px;
      box-shadow: var(--sh);
    }
 
    .score-card-title {
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 600;
      color: var(--tp);
      margin-bottom: 8px;
    }
 
    .tag-ps  { background: var(--ob); color: var(--ok); }
    .tag-iss { background: var(--clb); color: var(--cl); }
 
    /* Formula display */
    .formula-block {
      background: var(--pi);
      border: 1px solid var(--bi);
      border-radius: 8px;
      padding: 14px 18px;
      margin: 12px 0;
      font-size: 15px;
      text-align: center;
      overflow-x: auto;
    }
 
    .formula-note {
      font-family: var(--font-body);
      font-size: 12px;
      color: var(--tm);
      margin-top: 8px;
    }
 
    /* PS vs ISS two-column layout */
    .score-columns {
      display: grid;
      grid-template-columns: 1fr 1fr;
      border: 1px solid var(--bc);
      border-radius: 12px;
      overflow: hidden;
      margin: 20px 0 28px;
    }
 
    .score-col {
      padding: 22px 24px;
    }
 
    .score-col:first-child {
      border-right: 1px solid var(--bc);
    }
 
    .score-col-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding-bottom: 12px;
      margin-bottom: 14px;
      border-bottom: 2px solid;
    }
 
    .score-col-ps  { border-bottom-color: var(--gr); }
    .score-col-iss { border-bottom-color: var(--cl); }
 
    .score-col-label {
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 600;
      color: var(--tp);
    }
 
    .score-col-ps  .score-col-abbr { background: var(--ob);  color: var(--ok); border: 1px solid var(--or);  }
    .score-col-iss .score-col-abbr { background: var(--clb); color: var(--cl); border: 1px solid var(--clr); }
 
    @media (max-width: 700px) {
      .score-columns { grid-template-columns: 1fr; }
      .score-col:first-child { border-right: none; border-bottom: 1px solid var(--bc); }
    }
 
    /* Flow diagram */
    .flow-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 16px 0;
      flex-wrap: wrap;
    }
 
    .flow-step {
      background: var(--pc);
      border: 1px solid var(--bc);
      border-radius: 10px;
      padding: 14px 16px;
      text-align: center;
      flex: 1;
      min-width: 100px;
      box-shadow: var(--sh);
    }
 
    .flow-icon { font-size: 22px; margin-bottom: 6px; }
 
    .flow-step h4 {
      font-family: var(--font-body);
      font-size: 13px;
      font-weight: 600;
      color: var(--tp);
      margin-bottom: 4px;
    }
 
    .flow-step p {
      font-family: var(--font-body);
      font-size: 11px;
      color: var(--ts);
    }
 
    .flow-arrow {
      font-size: 20px;
      color: var(--tm);
      flex-shrink: 0;
    }
 
    /* Eligibility status pills */
    .elig-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin: 14px 0;
    }
 
    .elig-card {
      border-radius: 10px;
      padding: 14px;
      border: 1px solid;
    }
 
    .elig-card.green  { background: var(--ob);  border-color: var(--or); }
    .elig-card.amber  { background: var(--wb);  border-color: var(--wr); }
    .elig-card.blue   { background: var(--clb); border-color: var(--clr); }
    .elig-card.red    { background: var(--nb2); border-color: var(--nr); }
 
    .elig-label {
      font-family: var(--font-body);
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 4px;
    }
 
    .elig-card.green .elig-label { color: var(--ok); }
    .elig-card.amber .elig-label { color: var(--wt); }
    .elig-card.blue  .elig-label { color: var(--cl); }
    .elig-card.red   .elig-label { color: var(--no); }
 
    .elig-desc {
      font-family: var(--font-body);
      font-size: 12px;
      color: var(--ts);
      line-height: 1.5;
    }
 
    /* Summary checklist */
    .check-list {
      list-style: none;
      padding: 0;
    }
 
    .check-list li {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-family: var(--font-body);
      font-size: 14px;
      color: var(--ts);
      padding: 8px 0;
      border-bottom: 1px solid var(--bd);
    }
 
    .check-list li:last-child { border-bottom: none; }
 
    .check-icon {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: var(--ob);
      color: var(--ok);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 10px;
      flex-shrink: 0;
      margin-top: 2px;
    }
 
    /* Responsive */
    @media (max-width: 768px) {
      .doc-layout { flex-direction: column; padding: 72px 16px 48px; }
      .doc-toc { position: static; width: 100%; flex: none; }
      .score-grid, .elig-grid { grid-template-columns: 1fr; }
      .flow-arrow { display: none; }
    }

    /* ── Favourites Modal overlay ── */
    .modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.4);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10000;
      backdrop-filter: blur(4px);
    }

    /* Modal box card */
    .modal-card {
      background: var(--pc);
      border: 1px solid var(--bc);
      border-radius: 12px;
      width: 90%;
      max-width: 500px;
      max-height: 80vh;
      box-shadow: var(--shh);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      animation: modalFadeIn 0.25s ease-out;
    }

    @keyframes modalFadeIn {
      from { opacity: 0; transform: scale(0.95); }
      to { opacity: 1; transform: scale(1); }
    }

    .modal-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--bd);
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--pi);
    }

    .modal-header h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 20px;
      color: var(--tp);
    }

    .modal-close-btn {
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: var(--ts);
      line-height: 1;
    }

    .modal-close-btn:hover {
      color: var(--tp);
    }

    #favs-list-container {
      padding: 20px;
      overflow-y: auto;
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .fav-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 16px;
      background: var(--pi);
      border: 1px solid var(--bd);
      border-radius: 8px;
    }

    .fav-item-info {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .fav-item-code {
      font-family: 'Source Serif 4', serif;
      font-weight: 600;
      font-size: 16px;
      color: var(--tp);
    }

    .fav-item-name {
      font-size: 13px;
      color: var(--ts);
    }

    .fav-remove-btn {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      color: #F9AB00;
      padding: 4px;
    }

#favs-note {
    background-color: var(--pi);
    border: 1px solid var(--bc);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-size: 14px;
    color: var(--tp);
}

#helper-tips {
    background-color: var(--pi);
    border: 1px solid var(--bc);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-size: 14px;
    color: var(--ts);
}

#helper-tips h4 {
    color: var(--tp);
    margin-bottom: 10px;
    font-size: 15px;
}

#helper-tips ul {
    list-style-type: none;
    padding-left: 0;
}

#helper-tips li {
    font-size: 13.5px;
    margin-bottom: 6px;
    padding-left: 12px;
    border-left: 2px solid var(--gr); /* Subtle accent matching the blue button */
}

/* Wide modal for detailed favourites cards */
.modal-card-wide {
    max-width: 800px !important;
}
