/* ── GLOBAL RESETS & VARIABLES ───────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:          #111210;
  --paper:        #F8F7F3;
  --muted:        #6B6A63;
  --border:       #E0DED6;
  --accent:       #1A6B45;
  --accent-light: #EBF4EE;
  --serif:        'Instrument Serif', Georgia, serif;
  --sans:         'DM Sans', sans-serif;

  /* MDCAT subject accent colours */
  --bio:          #166534; 
  --bio-bg:       #f0fdf4; 
  --chem:         #0891b2; 
  --chem-bg:      #ecfeff;
  --physics:      #b91c1c; 
  --physics-bg:   #fef2f2;
  --english:      #1A5FA6;
  --english-bg:   #EBF2FC;
  --logical:      #f98bc0;
  --logical-bg:   #f4dbeb;
  
  
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

.auth-hidden { display: none; }

/* ── NAV ──────────────────────────────────────────── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.logo {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.logo span { color: var(--accent); }

.tagline {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  transition: color .2s;
}

.nav-links a:hover { color: var(--ink); }

.nav-auth {
  display: flex;
  align-items: center;
}

.nav-cta {
  background: var(--accent);
  color: var(--paper);
  padding: 9px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity .2s;
}

.nav-cta:hover { opacity: .8; }

.nav-links a:focus-visible,
.nav-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ── MAIN ─────────────────────────────────────────── */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── PAGE HEADER ──────────────────────────────────── */
.page-header { margin-bottom: 44px; }
.exam-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.page-header h1 em {
  font-style: italic;
  color: var(--accent);
}
.page-header p {
  font-size: 15px;
  color: var(--muted);
}

/* ── SUBJECT GRID ─────────────────────────────────── */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

/* ── SUBJECT CARD ─────────────────────────────────── */
.subject-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px 22px;
  text-decoration: none;
  color: var(--ink);
  position: relative;
  transition: border-color .22s, box-shadow .22s, transform .2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  animation: cardFadeIn 0.6s ease-out backwards;
}

.subject-card:nth-child(1) { animation-delay: 0.1s; }
.subject-card:nth-child(2) { animation-delay: 0.2s; }
.subject-card:nth-child(3) { animation-delay: 0.3s; }
.subject-card:nth-child(4) { animation-delay: 0.4s; }
.subject-card:nth-child(5) { animation-delay: 0.5s; }

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

.subject-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  transform: translateY(-6px);
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  opacity: 0;
  transition: opacity .22s;
}



/* ── CARD ICON ────────────────────────────────────── */
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .3s ease;
}

.subject-card:hover .card-icon svg {
  transform: scale(1.15) rotate(-5deg);
}

.subject-logo {
  width: 100%;
  height: 100%;
  object-fit: contain; 
  padding: 8px; 
  box-sizing: border-box; 
}

.bio-icon      { background: var(--bio-bg);      color: var(--bio); }
.chem-icon     { background: var(--chem-bg);     color: var(--chem); }
.physics-icon  { background: var(--physics-bg);  color: var(--physics); }
.english-icon  { background: var(--english-bg);  color: var(--english); }
.logical-icon  { background: var(--logical-bg);  color: var(--logical); }


/* ── CARD BODY ────────────────────────────────────── */
.card-body { flex: 1; display: flex; flex-direction: column;}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.card-top h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}
.card-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--border);
}

/* ── CARD META ────────────────────────────────────── */
.card-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.meta-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  font-weight: 600;
}
.meta-value {
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}

/* ── PROGRESS BAR ─────────────────────────────────── */
.progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.progress-bar {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.progress-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

/* ── START HERE BUTTON ───────────────────────────── */
.card-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  margin-left: auto;
  margin-right: auto;
  padding: 10px 0;
  width: 50%;
  background: var(--accent);
  color: #ffffff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.subject-card:hover .card-start-btn {
  background: #155c39;
}

/* ── MOCK TEST BANNER ─────────────────────────────── */
.mock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 28px;
  text-decoration: none;
  margin-top: 16px;
  transition: border-color .22s, box-shadow .22s, transform .18s;
}
.mock-banner:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 28px rgba(0,0,0,.07);
  transform: translateY(-2px);
}

.mock-left { display: flex; align-items: center; gap: 16px; }
.mock-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.mock-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

.mock-title {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 2px;
  color: var(--ink);
}
.mock-sub { font-size: 14px; color: var(--muted); }
.mock-cta {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .subject-grid { grid-template-columns: 1fr; }
  nav {
    padding: 16px 24px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    order: 3;
    width: 100%;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 500;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}