:root{
  --green-50:#EAF7F0;
  --green-100:#D8F1E4;
  --green-200:#B6E5CC;
  --green-300:#86D7AE;
  --green-400:#4CC78C;
  --green-500:#12B76A;
  --green-600:#00A562;
  --green-700:#008A52;

  --ink-900:#0b1324;
  --ink-700:#34425f;
  --ink-500:#5d6a85;
  --ink-300:#9aa3b2;
  --ink-100:#e6e9ef;

  --bg:#f7f9fc;
  --card:#ffffff;
  --ring: rgba(0,165,98,.35);
  --shadow:0 6px 24px rgba(9,30,66,.08), 0 1px 2px rgba(9,30,66,.04);
}

*{box-sizing:border-box}
html,body{height:100%}
html{scroll-behavior:smooth}
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--ink-900);
  background-color: #ffffff; /* ✅ Pure white background */
  overflow-x: hidden;
}


/* doodles */
.doodle{position:fixed;pointer-events:none;z-index:0;opacity:.8}
.doodle-1{top:-60px;left:-40px;width:260px;height:260px}
.doodle-2{bottom:-40px;right:-40px;width:240px;height:240px}

/* topbar */
.topbar{
  position:sticky; top:0; z-index:100;
  display:flex; gap:16px; justify-content:space-between; align-items:center;
  padding:10px 20px; 
  background:rgba(255,255,255,.98); 
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom:1px solid rgba(0,0,0,.06);
  width:100%;
  box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 1px 3px rgba(0,0,0,.06);
  transition: all 0.3s ease;
}

/* Ensure topbar stays above menu on mobile */
@media (max-width: 900px) {
  .topbar {
    z-index: 1001;
    background: rgba(255,255,255,.95);
  }
}
.brand{
  display:flex; align-items:center; gap:8px; font-weight:700; font-size:18px;
  text-decoration: none;
  transition: all 0.2s ease-out;
  padding: 2px 0;
  border-radius: 8px;
}
/* --- ADDED RULE for text gradient --- */
.brand span {
  background: linear-gradient(180deg, var(--ink-900), var(--ink-700));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.2s ease;
}
/* --- ADDED RULE for hover effects --- */
.brand:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}
.brand:hover span {
  opacity: 0.85;
}
/* Make the bell ring again on hover */
.brand:hover .bell-logo {
  animation: bell-ring 900ms ease-in-out;
}
/* --- END ADDED RULES --- */

.brand .logo{filter: drop-shadow(0 2px 6px rgba(0,165,98,.20));}
/* bell icon shared size & animation */
.bell-logo{ width:28px; height:32px; transform-origin: top center; }
@keyframes bell-ring{
  0%{ transform: rotate(0) }
  15%{ transform: rotate(18deg) }
  30%{ transform: rotate(-14deg) }
  45%{ transform: rotate(10deg) }
  60%{ transform: rotate(-6deg) }
  75%{ transform: rotate(3deg) }
  100%{ transform: rotate(0) }
}
/* play ring once on load */
.bell-logo{ animation: bell-ring 900ms ease-in-out 1 200ms; }
@media (prefers-reduced-motion: reduce){
  .bell-logo{ animation: none }
}
.actions{
  display:flex; 
  align-items:center; 
  gap:3px; 
  position:absolute; 
  left:50%; 
  transform:translateX(-50%);
  background: rgba(255,255,255,.8);
  padding: 3px;
  border-radius: 10px;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.04);
  border: 1px solid rgba(255,255,255,.8);
}

/* Unified styling for all navigation items (links and buttons) */
.actions .link,
.actions button.btn {
  color:var(--ink-700); 
  text-decoration:none; 
  font-weight:500;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  font-family: inherit;
  line-height: 1.5;
}

/* Underline effect for all nav items */
.actions .link::after,
.actions button.btn::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 0;
  height: 2px;
  background: var(--green-500);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

/* Hover state - consistent for all */
.actions .link:hover,
.actions button.btn:hover {
  color:var(--green-600);
  background: rgba(18,183,106,.1);
  transform: translateY(-1px);
}

.actions .link:hover::after,
.actions button.btn:hover::after {
  width: calc(100% - 32px);
  transform: translateX(-50%) scaleX(1);
}

/* Active state - consistent for all */
.actions .link.active,
.actions button.btn.active { 
  color:var(--green-600); 
  font-weight: 600;
  background: rgba(18,183,106,.12);
}

.actions .link.active::after,
.actions button.btn.active::after {
  width: calc(100% - 32px);
  transform: translateX(-50%) scaleX(1);
}

/* Active/pressed state */
.actions .link:active,
.actions button.btn:active {
  transform: translateY(0);
  background: rgba(18,183,106,.15);
}

/* Focus state for accessibility */
.actions .link:focus-visible,
.actions button.btn:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

/* Nav dropdown (Resources) */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-toggle {
  gap: 6px;
}

.dropdown-toggle .chevron {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.nav-dropdown:focus-within .chevron,
.nav-dropdown:hover .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 12px 32px rgba(15,23,42,.16);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateY(6px);
  z-index: 999;
}

.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-item {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink-700);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.18s ease;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: rgba(18,183,106,.1);
  color: var(--green-700);
  outline: none;
}

/* User Details Section */
.user-details {
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
  position: relative;
}

.user-info-wrapper {
  position: relative;
}

.user-info-trigger {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.user-info-trigger:hover {
  transform: translateY(-1px);
}

.user-info-trigger:active {
  transform: translateY(0);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(18,183,106,.06);
  border: 1px solid rgba(18,183,106,.12);
  transition: all 0.2s ease;
}

.user-info:hover {
  background: rgba(18,183,106,.1);
  border-color: rgba(18,183,106,.2);
}

.user-info-trigger[aria-expanded="true"] .user-info {
  background: rgba(18,183,106,.12);
  border-color: rgba(18,183,106,.25);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.8);
  background: var(--green-100);
  box-shadow: 0 2px 8px rgba(18,183,106,.15);
  transition: all 0.2s ease;
}

.user-info:hover .user-avatar {
  box-shadow: 0 3px 12px rgba(18,183,106,.25);
  transform: scale(1.05);
}

.avatar-fallback {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid rgba(255,255,255,.8);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(18,183,106,.15);
  transition: all 0.2s ease;
}

.user-info:hover .avatar-fallback {
  box-shadow: 0 3px 12px rgba(18,183,106,.25);
  transform: scale(1.05);
}

.user-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-900);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.user-email {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.3;
}

.user-dropdown-icon {
  color: var(--ink-400);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.user-info-trigger[aria-expanded="true"] .user-dropdown-icon {
  transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(18,183,106,.05), rgba(18,183,106,.02));
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.user-avatar-large {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.9);
  background: var(--green-100);
  box-shadow: 0 2px 8px rgba(18,183,106,.15);
}

.user-dropdown-header .avatar-fallback {
  width: 48px;
  height: 48px;
  font-size: 18px;
  border: 2px solid rgba(255,255,255,.9);
}

.user-dropdown-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.user-name-large {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-900);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-email-large {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(0,0,0,.06);
  margin: 4px 0;
}

.user-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.user-dropdown-item:hover {
  background: rgba(18,183,106,.08);
  color: var(--green-600);
}

.user-dropdown-item svg {
  color: currentColor;
  flex-shrink: 0;
}

.user-dropdown-item span {
  flex: 1;
}

/* Hide login button when user is logged in */
.user-logged-in .login-btn-nav {
  display: none !important;
}

/* Ensure login button is visible by default */
.login-btn-nav {
  display: inline-flex;
}

/* Make login button stand out in navbar - positioned on right edge */
.login-btn-nav {
  background: linear-gradient(180deg, var(--green-500), var(--green-600)) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(18, 183, 106, 0.25), 0 2px 4px rgba(18, 183, 106, 0.15) !important;
  padding: 7px 18px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
  overflow: hidden;
  min-height: 32px !important;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

/* Desktop: position on right edge */
.login-btn-nav.desktop-only {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  z-index: 99;
}

/* Mobile: hide desktop button, show in drawer */
.login-btn-nav.mobile-only {
  display: none;
}

.login-btn-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.login-btn-nav:hover::before {
  left: 100%;
}

.login-btn-nav.desktop-only:hover {
  background: linear-gradient(180deg, var(--green-600), var(--green-700)) !important;
  color: #fff !important;
  transform: translateY(-50%) translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(18, 183, 106, 0.35), 0 4px 8px rgba(18, 183, 106, 0.2) !important;
}

.login-btn-nav.desktop-only:active {
  transform: translateY(-50%) translateY(0) !important;
  box-shadow: 0 2px 8px rgba(18, 183, 106, 0.25) !important;
}

/* When user is logged in, shift user details to accommodate */
.user-logged-in .user-details {
  right: 20px;
}

/* Default user details position when login button is visible */
.user-details {
  right: 20px;
}


/* Mobile responsive for user details - merged into main mobile query below */

/* Hamburger menu button */
.menu-toggle {
  display: none;
  width: 28px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  position: relative;
  margin-left: auto;
}

/* Ensure hamburger button stays visible and clickable when menu is open */
@media (max-width: 900px) {
  .menu-toggle {
    position: relative;
    z-index: 1002;
  }
}

.menu-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ink-900);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  display: block;
  pointer-events: none; /* Prevent interference with button clicks */
}

.menu-toggle span:nth-child(1) {
  top: 0;
}

.menu-toggle span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle span:nth-child(3) {
  bottom: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  width: 0;
  transform: translateY(-50%) translateX(-10px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

/* modal */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
  padding:16px;
  box-sizing:border-box;
}
.modal[aria-hidden="false"]{ display:flex }
.modal-backdrop{ position:absolute; inset:0; background:rgba(11,19,36,.35) }
.modal-content{
  position:relative; z-index:1; width:100%; max-width:520px; padding:32px; border-radius:16px;
  background:#fff; border:1px solid var(--ink-100); box-shadow:var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 32px);
  overflow-y:auto;
}
.auth-modal{ 
  text-align:center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-hero{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom: 0;
}
.auth-title{ 
  margin:0; 
  font-size:22px; 
  font-weight: 700;
  color: var(--ink-900);
}
.auth-subtitle{ display:none }
.auth-hero .bell-logo{ width:44px; height:44px }
.auth-desc{ 
  color:var(--ink-700); 
  font-size:14px; 
  line-height:1.6; 
  background:linear-gradient(180deg,#fff,#f7fff9); 
  border:1px solid var(--ink-100); 
  padding:14px 16px; 
  border-radius:12px; 
  margin: 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.auth-privacy{ 
  color:var(--ink-500); 
  font-size:12px; 
  margin: 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Center Google Sign-In button */
.g_id_signin{ display:flex; justify-content:center }
.g_id_signin > div{ margin:0 auto }

/* Ensure login button in modal is visible */
.auth-modal .btn.primary {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: 320px !important;
  margin: 0 auto !important;
}

/* Google Sign-in Button Alignment */
.google-signin-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 10px 14px !important;
  line-height: 1 !important;
}

.google-signin-btn svg {
  display: inline-block !important;
  margin: 0 !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
  width: 18px !important;
  height: 18px !important;
  position: relative !important;
  top: 0 !important;
}

.google-signin-btn span {
  display: inline-block !important;
  vertical-align: middle !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  top: 0 !important;
}

/* Ensure all modal content is visible */
.modal-content * {
  visibility: visible !important;
}

.modal-content p,
.modal-content button,
.modal-content h3,
.modal-content .auth-hero {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Manual Login Form Styles */
#manualLoginForm input[type="text"],
#manualLoginForm input[type="email"] {
  padding: 12px 16px !important;
  border: 1px solid var(--ink-300) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
  background: white !important;
  color: var(--ink-900) !important;
}

#manualLoginForm input[type="text"]:focus,
#manualLoginForm input[type="email"]:focus {
  outline: none !important;
  border-color: var(--green-500) !important;
  box-shadow: 0 0 0 3px var(--ring) !important;
}

#manualLoginForm input[type="text"]::placeholder,
#manualLoginForm input[type="email"]::placeholder {
  color: var(--ink-400) !important;
}

#manualLoginForm .btn.primary {
  margin-top: 0.5rem !important;
}

.modal-close{ position:absolute; right:10px; top:10px; border:none; background:transparent; font-size:20px; cursor:pointer; color:var(--ink-500) }

/* Mobile tweaks for auth modal */
@media (max-width: 640px) {
  .modal{
    padding:12px;
  }

  .modal-content{
    width:100%;
    max-width:100%;
    padding:20px 16px;
    border-radius:14px;
  }

  .auth-hero{
    gap:6px;
  }

  .auth-title{
    font-size:18px;
  }

  .auth-desc{
    font-size:13px;
    padding:12px 12px;
  }

  #manualLoginForm{
    margin-bottom:1.25rem;
  }

  .google-signin-btn{
    font-size:14px;
    padding:10px 12px !important;
  }
}

/* tabs */
.exam-tabs{
  display:flex; gap:8px; flex-wrap:wrap;
  padding:10px 16px; background:#fff; border-bottom:1px solid var(--ink-100);
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}
.exam-tab{
  padding:8px 14px; border-radius:8px; border:1px solid var(--ink-100);
  background:#fff; color:var(--green-600); font-weight:600; cursor:pointer; transition:.18s;
}
.exam-tab:hover{ background:#000; color:#fff; border-color:#000; }
.exam-tab.active{ background:#000; color:#fff; border-color:#000; }
/* Subscribe button in tabs area */
.exam-tabs .subscribe-btn {
  margin-top: 0;
  width: auto;
  padding: 8px 16px;
  font-size: 0.875rem;
  white-space: nowrap;
}

/* buttons */
.btn{
  border:1px solid transparent; padding:10px 14px; border-radius:10px; font-weight:600;
  cursor:pointer; transition:.18s transform ease, .18s background ease, .18s box-shadow ease, .12s color ease, .12s border-color ease;
  box-shadow:0 1px 0 rgba(9,30,66,.04);
  text-decoration: none; /* Ensure links styled as buttons have no underline */
}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn.primary{
  background:linear-gradient(180deg, var(--green-500), var(--green-600));
  color:#fff; border-color:rgba(0,0,0,.15); box-shadow:var(--shadow);
}
.btn.primary:hover, .btn.primary:focus{ background:#000; color:#fff; border-color:#000; box-shadow:0 0 0 3px var(--ring) }
.btn.primary:active{ background:#000; color:#fff; border-color:#000; box-shadow:none }
.btn.secondary{background:#fff; color:var(--green-600); border-color:var(--ink-100)}
.btn.secondary:hover{ color:#fff; background:linear-gradient(180deg, var(--green-500), var(--green-600)); border-color:rgba(0,0,0,.15); box-shadow:var(--shadow); transform:translateY(-1px) }
.btn.secondary:active{ transform:translateY(0); box-shadow:none }
.btn.secondary:focus-visible{ outline:none; box-shadow:0 0 0 3px var(--ring) }
.btn.ghost{background:transparent; color:var(--green-600); border-color:var(--ink-100)}

/* searchbar */
.searchbar{ display:flex; align-items:center; gap:12px; background:#fff; padding:10px; border-radius:14px; box-shadow:var(--shadow) }
.searchbar .field{position:relative; display:flex; flex-direction:column; min-width:230px}
.searchbar .field input{ border:none; outline:none; padding:8px 10px; font-size:14px; color:var(--ink-900) }
.searchbar .field label{ position:absolute; top:-10px; left:8px; font-size:12px; color:var(--ink-500); background:#fff; padding:0 4px }
.searchbar .divider{width:1px; height:28px; background:var(--ink-100)}

/* layout */
.container{
  position:relative; z-index:1;
  display:grid; grid-template-columns: 1fr; /* <-- CHANGED */
  gap:16px;
  padding:24px; max-width:1440px; margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* left panel */
.filters{ background:var(--card); border:1px solid var(--ink-100); border-radius:16px; padding:16px; box-shadow:var(--shadow); height:max-content }
.filters-title{ margin:0 0 12px 0; font-size:18px }
.filter-group{ padding:12px 0; border-bottom:1px dashed var(--ink-100) }
.filter-group:last-child{ border-bottom:none }
.filter-label{ display:block; font-weight:600; color:var(--ink-700); margin-bottom:8px }
.chipset{ display:flex; flex-wrap:wrap; gap:8px }
.chip{
  border:1px solid var(--ink-100); background:linear-gradient(180deg,#fff,#f6fff9); color:var(--ink-700);
  border-radius:999px; padding:8px 12px; cursor:pointer; font-weight:600; font-size:12px;
}
.chip.active, .chip:hover{ border-color:var(--green-200); color:var(--green-700); box-shadow:0 0 0 3px var(--ring) }
.w-100{ width:100% }

/* results list */
.results{ background:var(--card); border:1px solid var(--ink-100); border-radius:16px; padding:16px; box-shadow:var(--shadow); min-height:60vh; width: 100%; box-sizing: border-box; }
.results-header{ display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:12px; border-bottom:1px solid var(--ink-100) }
.results h2{ margin:0; font-size:18px }

.card-list{ list-style:none; padding:0; margin:12px 0 0 0; display:flex; flex-direction:column; gap:12px }
.card{
  border:1px solid var(--ink-100); border-radius:14px; padding:0; background:#fff;
  transition:.2s transform ease,.2s box-shadow ease,.2s border-color ease;
  overflow: hidden;
}
.card:hover{ 
  transform:translateY(-2px); 
  box-shadow:var(--shadow);
  border-color:var(--green-200);
  cursor: pointer;
}
.card-link {
  display:grid; 
  grid-template-columns: 56px 1fr; 
  gap:12px; 
  padding:14px;
  text-decoration: none;
  color: inherit;
  align-items: center;
}
.card-link:hover {
  text-decoration: none;
  color: inherit;
}
.card-link:hover .title {
  color: var(--green-600);
}
.card .logo{
  width:56px; height:56px; border-radius:12px; background:linear-gradient(180deg,var(--green-100),#fff);
  display:flex; align-items:center; justify-content:center; font-weight:800; color:var(--green-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px;
  font-size: 12px;
  line-height: 1.2;
}
/* --- ADDED RULE --- */
.card .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px; /* Match the parent .logo container */
  background: #fff;
  padding: 4px; /* Give logo a little space */
}
/* --- END ADDED RULE --- */

.meta{ display:flex; flex-direction:column; gap:6px }
.title{ 
  font-weight:700;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}
.org{ color:var(--ink-700); font-weight:600 }
.row{ display:flex; flex-wrap:wrap; gap:8px; color:var(--ink-500); font-size:13px }

/* pagination */
.pagination{ display:flex; justify-content:center; gap:6px; padding-top:12px }
.page-btn{ min-width:36px; height:36px; border-radius:8px; border:1px solid var(--ink-100); background:#fff; cursor:pointer }
.page-btn.active, .page-btn:hover{ border-color:var(--green-200); box-shadow:0 0 0 3px var(--ring) }

/* details */
.details{ 
  background:var(--card); border:1px solid var(--ink-100); 
  border-radius:16px; padding:0; box-shadow:var(--shadow); 
  min-height:60vh; overflow:hidden;
  display: none; /* <-- ADDED THIS LINE to hide it */
}
.detail{ padding:16px }
.empty-state{ padding:40px; text-align:center; color:var(--ink-500) }
.empty-art{ width:220px; height:140px; margin:0 auto 8px auto; display:block }
.detail-header{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px }
.detail-title{ margin:0; font-size:20px }
.detail-org{ color:var(--ink-700); font-weight:600 }
.detail-actions{ display:flex; gap:10px }
.apply{ background:linear-gradient(180deg, var(--green-500), var(--green-600)); color:#fff }
.apply:hover{ background:#000; border-color:#000 }
.save{ background:#fff; border:1px solid var(--ink-100); color:var(--ink-700) }
.detail-body{ margin-top:14px; line-height:1.6; color:var(--ink-700) }

/* status pill */
.status{ margin-top:12px; padding:8px 10px; border-radius:10px; font-size:12px; background:#F7FFF9; border:1px solid var(--green-100); color:var(--green-700) }

/* footer */
.footer{ padding:32px 24px; max-width:1440px; margin:24px auto 0; color:var(--ink-700) }
.footer-grid{ 
  display:grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap:16px; background:#fff; border:1px solid var(--ink-100); 
  border-radius:16px; padding:20px; box-shadow:var(--shadow) 
}
.footer-grid h4{ margin:0 0 8px 0 }
.footer-grid a{ display:block; color:var(--ink-700); text-decoration:none; padding:4px 0 }
.footer-grid a:hover{ color:var(--green-600) }
.newsletter{ display:flex; gap:8px }
.newsletter input{ flex:1; padding:10px 12px; border-radius:10px; border:1px solid var(--ink-100) }
.newsletter button{ white-space:nowrap }
.copyright{ text-align:center; margin:10px 0 0 0; color:var(--ink-500) }
.footer-disclaimer{ 
  margin-top: 20px; 
  padding: 16px 20px; 
  background: var(--green-50); 
  border: 1px solid var(--green-200); 
  border-radius: 12px; 
  font-size: 0.875rem; 
  line-height: 1.6; 
  color: var(--ink-700);
}
.footer-disclaimer strong{ color: var(--ink-900); }
.footer-disclaimer a{ color: var(--green-600); text-decoration: underline; }
.footer-disclaimer a:hover{ color: var(--green-700); }

/* responsive */
@media (max-width: 1200px){
  /* Container is already 1fr, this is redundant but fine */
  .container{grid-template-columns: 1fr}
  /* Details is already hidden, this is redundant but fine */
  .details{display:none}
}
/* Tablet and medium screen adjustments for login button */
@media (max-width: 1024px) and (min-width: 901px) {
  .actions .login-btn-nav {
    padding: 9px 18px !important;
    font-size: 14px !important;
  }
}

@media (max-width: 900px){
  .topbar{
    row-gap: 10px;
    flex-wrap: nowrap;
    position: relative;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    min-height: 50px; /* Ensure consistent height on mobile */
  }
  
  .brand {
    font-size: 16px;
    flex-shrink: 0;
    order: 1;
    z-index: 1003; /* Above menu when open */
    gap: 8px;
  }
  
  .brand span {
    display: none; /* Hide text on very small screens, show only logo */
  }
  
  .bell-logo {
    width: 28px;
    height: 32px;
  }
  
  /* Show hamburger menu button on mobile */
  .menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    order: 2; /* Place it after the brand */
    position: relative;
    z-index: 1003; /* Above everything including user-details */
    margin-left: auto;
    margin-right: 8px;
    width: 40px; /* Larger touch target */
    height: 40px;
    padding: 8px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    background: transparent;
    border: none;
  }
  
  .menu-toggle:active {
    transform: scale(0.95);
  }
  
  /* User details on mobile */
  .user-details {
    position: relative;
    order: 3; /* Place after hamburger menu */
    margin-left: 0;
    flex-shrink: 0;
    z-index: 1003; /* Above menu when open */
  }
  
  .user-info {
    gap: 0;
    padding: 6px;
    background: rgba(18,183,106,.08);
    border: 1px solid rgba(18,183,106,.15);
    min-width: 40px; /* Larger touch target */
    min-height: 40px;
    justify-content: center;
  }
  
  .user-text {
    display: none; /* Hide text on mobile, show only avatar */
  }
  
  .user-dropdown-icon {
    display: none; /* Hide dropdown icon on mobile */
  }
  
  .user-avatar,
  .avatar-fallback {
    width: 32px;
    height: 32px;
    font-size: 12px;
    border-width: 1.5px;
  }
  
  /* User dropdown on mobile */
  .user-dropdown {
    right: 0;
    left: auto;
    min-width: 240px;
    max-width: calc(100vw - 32px);
  }
  
  /* Hide navigation by default on mobile */
  .actions {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    padding-top: 72px; /* Space for topbar */
    gap: 0;
    box-shadow: -4px 0 32px rgba(9,30,66,.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002; /* Above topbar (1001) so drawer is visible */
    overflow-y: auto;
    overflow-x: hidden;
    left: auto;
    transform: none;
    display: flex !important;
    border-left: 1px solid rgba(0,0,0,.06);
  }
  
  /* Show navigation when menu is open */
  .actions.menu-open {
    right: 0;
  }
  
  .actions .link,
  .actions button.btn {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--ink-100);
    display: flex;
    align-items: center;
    margin-top: 0;
    justify-content: flex-start;
    min-height: 56px; /* Touch-friendly height */
    border-radius: 0;
    background: transparent;
    color: var(--ink-700);
    text-align: left;
    -webkit-tap-highlight-color: rgba(18,183,106,.1);
    transition: all 0.2s ease;
    position: relative;
  }
  
  .actions .link:first-of-type,
  .actions button.btn:first-of-type {
    border-top: 1px solid var(--ink-100);
  }
  
  .actions .link:last-of-type,
  .actions button.btn:last-of-type {
    border-bottom: 1px solid var(--ink-100);
  }
  
  /* Remove underline effect on mobile */
  .actions .link::after,
  .actions button.btn::after {
    display: none;
  }

  /* Dropdown adjustments on mobile */
  .nav-dropdown {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    position: relative;
    inset: auto;
    width: 100%;
    margin: 0;
    padding: 0 0 8px 0;
    box-shadow: none;
    border: none;
    border-radius: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    gap: 0;
  }

  .dropdown-item {
    padding: 14px 24px;
    border-bottom: 1px solid var(--ink-100);
    border-radius: 0;
  }

  .dropdown-item:last-of-type {
    border-bottom: none;
  }
  
  /* Login button on mobile - show in drawer, hide desktop version */
  .login-btn-nav.desktop-only {
    display: none !important;
  }
  
  .login-btn-nav.mobile-only {
    position: static !important;
    transform: none !important;
    background: linear-gradient(180deg, var(--green-500), var(--green-600)) !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    width: calc(100% - 32px) !important;
    margin: 12px 16px !important;
    padding: 14px 24px !important;
    min-height: 48px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(18, 183, 106, 0.25) !important;
    text-align: center !important;
    justify-content: center !important;
    border: none !important;
    -webkit-tap-highlight-color: rgba(18, 183, 106, 0.3) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    order: 999; /* Put at bottom of mobile menu */
  }
  
  .login-btn-nav.mobile-only:hover,
  .login-btn-nav.mobile-only:active {
    background: linear-gradient(180deg, var(--green-600), var(--green-700)) !important;
    color: #fff !important;
    transform: scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(18, 183, 106, 0.3) !important;
  }
  
  .login-btn-nav.mobile-only:active {
    transform: scale(0.96) !important;
  }
  
  /* Extra small screens - ensure button is still prominent */
  @media (max-width: 360px) {
    .login-btn-nav.mobile-only {
      font-size: 15px !important;
      padding: 12px 20px !important;
      margin: 10px 12px !important;
      width: calc(100% - 24px) !important;
    }
  }
  
  /* Active state indicator on mobile */
  .actions .link.active,
  .actions button.btn.active {
    background: rgba(18,183,106,.08);
    color: var(--green-600);
    font-weight: 600;
    border-left: 4px solid var(--green-500);
    padding-left: 20px;
  }
  
  /* Hover/touch active state */
  .actions .link:hover,
  .actions button.btn:hover,
  .actions .link:active,
  .actions button.btn:active {
    background: rgba(18,183,106,.12);
    color: var(--green-600);
    transform: none; /* Remove desktop transform */
    padding-left: 28px;
    border-left: 4px solid var(--green-500);
  }
  
  /* Focus state for accessibility */
  .actions .link:focus-visible,
  .actions button.btn:focus-visible {
    outline: 2px solid var(--green-500);
    outline-offset: -2px;
  }
  
  .searchbar{flex-wrap:wrap}
  .searchbar .field{min-width:160px}
  .container{grid-template-columns: 1fr}
  
  /* Improve announcement cards on mobile */
  .container {
    padding: 16px;
  }
  
  .results {
    padding: 12px;
    border-radius: 12px;
  }
  
  .card-list {
    gap: 10px;
    margin-top: 10px;
  }
  
  .card {
    border-radius: 12px;
  }
  
  .card-link {
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 12px;
    align-items: flex-start;
  }
  
  .card .logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    font-size: 11px;
    flex-shrink: 0;
  }
  
  .card .logo img {
    padding: 3px;
  }
  
  .meta {
    gap: 4px;
    min-width: 0; /* Allow text to wrap */
  }
  
  .title {
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .org {
    font-size: 12px;
  }
  
  .row {
    font-size: 11px;
    gap: 6px;
  }
  
  /* Mobile responsive for exam tabs */
  .exam-tabs {
    padding: 10px 12px;
    gap: 6px;
    flex-wrap: wrap;
  }
  
  .back-btn {
    padding: 6px 12px;
    font-size: 0.875rem;
    margin-right: 8px;
    flex-shrink: 0;
  }
  
  .exam-tab {
    padding: 6px 12px;
    font-size: 0.875rem;
    flex-shrink: 0;
  }
  
  .exam-tabs .subscribe-btn {
    padding: 6px 12px;
    font-size: 0.8125rem;
    margin-left: auto;
    min-width: fit-content;
    flex-shrink: 0;
  }
  
  /* On mobile, if tabs wrap, make subscribe button full width on new line */
  @media (max-width: 480px) {
    .exam-tabs .subscribe-btn {
      margin-left: 0;
      width: 100%;
      margin-top: 6px;
      order: 10; /* Move to end when wrapping */
    }
  }
  
  /* Results header on mobile */
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 10px;
  }
  
  .results-header h2 {
    font-size: 16px;
    width: 100%;
  }
  
  /* Source selector on mobile */
  .source-selector-container {
    padding: 16px 12px;
  }
  
  .source-selector-container h2 {
    font-size: 20px;
    margin-bottom: 16px;
    padding: 0 4px;
  }
  
  .source-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
  
  .source-card {
    padding: 1rem 0.875rem;
    min-height: 160px;
  }
  
  .source-card h3 {
    font-size: 1rem;
  }
  
  .source-card .source-full {
    font-size: 0.8125rem;
  }
  
  .source-card .source-desc {
    font-size: 0.75rem;
  }
  
  .source-card-wrapper .subscribe-btn {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  /* --- ADDED RULE --- */
  /* Stack footer to 1 column on mobile */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    text-align: left;
  }
  /* --- END ADDED RULE --- */
}

@media (max-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  /* Extra small mobile - tabs and buttons */
  .exam-tabs {
    padding: 8px 10px;
    gap: 6px;
  }
  
  .back-btn {
    padding: 6px 10px;
    font-size: 0.8125rem;
    margin-right: 6px;
  }
  
  .exam-tab {
    padding: 6px 10px;
    font-size: 0.8125rem;
  }
  
  .exam-tabs .subscribe-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
    margin-left: 0;
    width: 100%;
    margin-top: 6px;
    order: 10; /* Move to end when wrapping */
  }
  
  /* Source grid on very small screens */
  .source-grid {
    grid-template-columns: 1fr;
    gap: 0.875rem;
  }
  
  .source-card {
    min-height: 140px;
  }
  
  /* Results header */
  .results-header h2 {
    font-size: 15px;
  }
  
  /* Container padding */
  .container {
    padding: 12px;
  }
  
  .results {
    padding: 10px;
  }
  
  /* Card adjustments */
  .card-link {
    grid-template-columns: 40px 1fr;
    gap: 10px;
    padding: 10px;
  }
  
  .card .logo {
    width: 40px;
    height: 40px;
    font-size: 10px;
  }
  
  .title {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  
  /* Pagination on small screens */
  .pagination {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-btn {
    min-width: 32px;
    height: 32px;
    font-size: 0.8125rem;
    padding: 0 8px;
  }
  
  /* Source selector on very small screens */
  .source-selector-container {
    padding: 12px 8px;
    margin: 1rem auto;
  }
  
  .source-selector-container h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }
}

/* Overlay when menu is open */
@media (max-width: 900px) {
  .menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 19, 36, 0.6);
    z-index: 999;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
  }
  
  .menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
  }
  
  /* Show brand text on slightly larger mobile screens */
  @media (min-width: 360px) {
    .brand span {
      display: inline;
    }
  }
  
  /* Improve hamburger button visibility */
  .menu-toggle span {
    background: var(--ink-900);
  }
  
  /* Ensure hamburger button is visible when menu is open */
  .actions.menu-open ~ * .menu-toggle span,
  .menu-toggle[aria-expanded="true"] span {
    background: var(--ink-900);
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .topbar {
    padding: 10px 12px;
    min-height: 52px;
  }
  
  .brand {
    font-size: 16px;
    gap: 6px;
  }
  
  .bell-logo {
    width: 24px;
    height: 28px;
  }
  
  .menu-toggle {
    width: 28px;
    height: 28px;
    margin-right: 4px;
  }
  
  .actions {
    width: 280px;
    max-width: 90vw;
    padding-top: 68px;
  }
  
  .actions .link,
  .actions button.btn {
    padding: 14px 20px;
    min-height: 52px;
    font-size: 15px;
  }
  
  .user-info {
    padding: 5px;
    min-width: 36px;
    min-height: 36px;
  }
  
  .user-avatar,
  .avatar-fallback {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .topbar {
    padding: 10px 12px;
    min-height: 52px;
  }
  
  .brand {
    font-size: 16px;
    gap: 6px;
  }
  
  .bell-logo {
    width: 24px;
    height: 28px;
  }
  
  .menu-toggle {
    width: 28px;
    height: 28px;
    margin-right: 4px;
  }
  
  .actions {
    width: 280px;
    max-width: 90vw;
    padding-top: 68px;
  }
  
  .actions .link,
  .actions button.btn {
    padding: 14px 20px;
    min-height: 52px;
    font-size: 15px;
  }
  
  .user-info {
    padding: 5px;
    min-width: 36px;
    min-height: 36px;
  }
  
  .user-avatar,
  .avatar-fallback {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 4px;
  z-index: 1000;
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  background: #4CAF50;
  color: white;
}

.notification.error {
  background: #f44336;
  color: white;
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* --- HOME PAGE STYLES --- */
/* REMOVED: .features, .feature-card, 
  .subscribe-section, .subscribe-form 
*/

.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem; /* Adds spacing between new sections */
}

/* General Home Page Section Titles */
.home-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink-900);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.home-subtitle {
    font-size: 1.125rem;
    color: var(--ink-700);
    text-align: center;
    margin-top: 0;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 1. Hero Section (Existing) */
.hero {
    text-align: center;
    /* Using a cleaner gradient, removing image */
    background: linear-gradient(145deg, var(--green-50), #fff);
    border: 1px solid var(--green-100);
    border-radius: 1.5rem;
    margin: 0;
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: 3rem;
    color: var(--ink-900);
    margin-bottom: 1rem;
    /* Added text gradient */
    background: linear-gradient(180deg, var(--ink-900), var(--green-700));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--ink-700);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap; /* Added for mobile */
}

/* 2. "Why Choose Us?" Section (New) */
/* Padding handled inline in HTML for consistency */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.why-card {
    background: var(--card);
    border: 1px solid var(--ink-100);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(9,30,66,.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.why-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 24px rgba(9,30,66,.12);
    border-color: var(--green-200);
}
.why-icon {
    width: 40px;
    height: 40px;
    color: var(--green-600);
    margin-bottom: 1rem;
    flex-shrink: 0;
}
.why-card h3 {
    color: var(--ink-900);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}
.why-card p {
    color: var(--ink-700);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 2.5 "Exam Preparation Guidelines" Section (New) */
.guidelines-section {
    background: transparent;
}

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

.guideline-card {
    background: var(--card);
    border: 1px solid var(--ink-100);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 8px rgba(9,30,66,.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    /* Improve touch interaction on mobile */
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.guideline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-500), var(--green-600));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.guideline-card:hover::before {
    transform: scaleX(1);
}

.guideline-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(9,30,66,.15);
    border-color: var(--green-300);
}

.guideline-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.guideline-icon svg {
    color: var(--green-600);
    transition: all 0.3s ease;
}

.guideline-card:hover .guideline-icon {
    background: linear-gradient(135deg, var(--green-100), var(--green-200));
    transform: translateY(-4px) rotate(-3deg);
}

.guideline-card:hover .guideline-icon svg {
    color: var(--green-700);
}

.guideline-card h3 {
    color: var(--ink-900);
    margin: 0 0 0.75rem 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.guideline-card p {
    color: var(--ink-700);
    margin: 0;
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
}

.guideline-arrow {
    display: inline-block;
    margin-top: 1rem;
    font-size: 1.5rem;
    color: var(--green-600);
    transition: all 0.3s ease;
    font-weight: 600;
}

.guideline-card:hover .guideline-arrow {
    transform: translateX(6px);
    color: var(--green-700);
}

/* 3. "Featured Sources" Section (New) */
.featured-sources { background: transparent; border: none; box-shadow: none; margin: 0; border-radius: 0; }
.source-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    padding: 0 1rem;
    margin-bottom: 2.5rem;
}
.source-logo-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0; /* remove padded card look */
    border-radius: 0;
    background: transparent;
    border: none;
    width: 120px;
    transition: none;
}
.source-logo-card:hover { transform: none; box-shadow: none; }
.source-logo-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
}
.source-logo-card span {
    font-weight: 600;
    color: var(--ink-700);
}

/* --- ADDED: Home Page Latest News --- */
/* 4. "Latest News" Section */
/* Padding handled inline in HTML for consistency */

/* Latest News Header */
.latest-news-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.latest-news-title-section {
  text-align: center;
  width: 100%;
}

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

/* ---- Notice Board styles ---- */
.notice-board {
  padding: 0;
}

/* News Section Container */
.news-section {
  margin-bottom: 3rem;
}

.news-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--ink-100);
  text-align: center;
}

/* Newspaper-style layout */
.newspaper-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.5rem;
  row-gap: 1.5rem;
  align-items: start;
}

/* Section 1 specific layout */
.section-1 {
  grid-template-areas: 
    "large right"
    "bottom bottom";
  grid-template-rows: auto 1fr;
  row-gap: 0;
}

.section-1 .news-featured {
  grid-area: large;
}

.section-1 .news-grid-right {
  grid-area: right;
}

.section-1 .news-grid-bottom {
  grid-area: bottom;
  margin-top: 0;
  padding-top: 0;
}

/* Section 2 specific layout */
.section-2 {
  grid-template-areas: 
    "top top"
    "large right";
}

.section-2 .news-grid-top {
  grid-area: top;
}

.section-2 .news-featured {
  grid-area: large;
}

.section-2 .news-grid-right {
  grid-area: right;
}

/* Featured card (large, left side) */
.news-featured {
  background: var(--card);
  border: 1px solid var(--ink-100);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.news-featured:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(9,30,66,.12);
}

.news-featured .featured-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--ink-100);
  position: relative;
}

.news-featured .news-badge {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
}

.news-featured .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.news-featured:hover .featured-image img {
  transform: scale(1.05);
}

.news-featured .news-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-featured .featured-headline {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 12px 0 16px 0;
}

.news-featured .featured-headline a {
  color: var(--ink-900);
  text-decoration: none;
  transition: color .2s ease;
}

.news-featured .featured-headline a:hover {
  color: var(--green-600);
}

/* Grid of smaller cards on the right (stacked vertically) */
.news-grid-right {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

/* Grid for cards at the top (horizontal) */
.news-grid-top {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Grid for cards below (horizontal, 2 columns) */
.news-grid-bottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 0;
  padding-top: 0;
}

.news-card-small {
  background: var(--card);
  border: 1px solid var(--ink-100);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(9,30,66,.08);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.news-card-small .news-badge {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  font-size: 9px;
  padding: 3px 8px;
}

.news-card-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(9,30,66,.12);
  border-color: var(--green-200);
}

.news-card-small .small-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
  background: var(--ink-100);
  position: relative;
}

.news-card-small .small-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.news-card-small:hover .small-image img {
  transform: scale(1.05);
}

.news-card-small .news-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Image placeholders */
.image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink-100);
  color: var(--ink-300);
}

/* News content elements */
.news-badge {
  display: inline-block;
  background: linear-gradient(180deg, var(--green-500), var(--green-600));
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(18,183,106,.25);
}

.news-date {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.news-date .date-icon {
  width: 14px;
  height: 14px;
  color: var(--green-600);
  flex-shrink: 0;
}

.news-card-small .news-date {
  font-size: 11px;
  margin-bottom: 6px;
}

.news-card-small .news-date .date-icon {
  width: 12px;
  height: 12px;
}

.news-headline {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink-900);
  margin: 0 0 12px 0;
  line-height: 1.4;
  flex-grow: 1;
}

.news-headline a {
  color: var(--ink-900);
  text-decoration: none;
  transition: color .2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-headline a:hover {
  color: var(--green-600);
}

.news-card-small .news-headline {
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.news-card-small .news-headline a {
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.news-read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  transition: all .2s ease;
  border: 1px solid var(--ink-100);
  background: #fff;
  color: var(--ink-700);
  margin-top: auto;
  width: fit-content;
}

.news-read-link:hover {
  color: #fff;
  background: linear-gradient(180deg, var(--green-500), var(--green-600));
  border-color: rgba(0,0,0,.15);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.news-read-link.small {
  padding: 6px 12px;
  font-size: 12px;
  margin-top: auto;
}

.news-read-link .link-icon {
  width: 14px;
  height: 14px;
  transition: transform .2s ease;
  flex-shrink: 0;
}

.news-read-link.small .link-icon {
  width: 12px;
  height: 12px;
}

.news-read-link:hover .link-icon {
  transform: translate(2px, -2px);
}

/* Responsive adjustments for newspaper layout */
@media (max-width: 1024px) {
  .section-1,
  .section-2 {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "large"
      "right"
      "bottom";
  }
  
  .section-2 {
    grid-template-areas: 
      "top"
      "large"
      "right";
  }
  
  .news-grid-top,
  .news-grid-bottom {
    grid-template-columns: 1fr;
  }
  
  .news-featured .featured-image {
    height: 300px;
  }
}

@media (max-width: 768px) {
  .news-featured .featured-image {
    height: 250px;
  }
  
  .news-featured .featured-headline {
    font-size: 1.25rem;
  }
  
  .news-card-small .small-image {
    height: 120px;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .news-featured .featured-image {
    height: 220px;
  }
  
  .news-card-small .small-image {
    height: 100px;
  }
  
  .news-card-small .news-headline {
    font-size: 0.85rem;
  }
  
  .news-card-small .news-content {
    padding: 10px;
  }
  
  /* User details on very small screens */
  .user-info {
    padding: 3px;
  }
  
  .user-avatar,
  .avatar-fallback {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  
  .user-dropdown {
    min-width: 180px;
    right: 0;
  }
}

/* Modern card design - clean and even */
.notice {
  position: relative;
  background: var(--card);
  border: 1px solid var(--ink-100);
  border-radius: 12px;
  padding: 20px;
  min-height: 180px;
  box-shadow: 0 2px 8px rgba(9,30,66,.08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Remove tilt effects for even appearance */
.notice.tilt-1,
.notice.tilt-2,
.notice.tilt-3,
.notice.tilt-4 {
  transform: none;
}

/* Remove pin decoration for cleaner look */
.notice::before {
  display: none;
}

/* New badge */
.notice .badge {
  display: inline-block;
  background: linear-gradient(180deg, var(--green-500), var(--green-600));
  color: #fff;
  font-weight: 700;
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  position: absolute;
  right: 16px;
  top: 16px;
  box-shadow: 0 2px 8px rgba(18,183,106,.25);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Notice header with date */
.notice-header {
  margin-bottom: 12px;
}

.notice .date {
  font-size: 13px;
  color: var(--ink-500);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}

.notice .date-icon {
  width: 14px;
  height: 14px;
  color: var(--green-600);
  flex-shrink: 0;
}

/* Headline styling */
.notice .headline {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-900);
  margin: 0 0 16px 0;
  line-height: 1.4;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Actions at bottom */
.notice .note-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--ink-100);
}

.notice .read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  transition: all .2s ease;
  border: 1px solid var(--ink-100);
  background: #fff;
  color: var(--green-600);
  font-weight: 600;
}

.notice .read-link:hover {
  color: #fff;
  background: linear-gradient(180deg, var(--green-500), var(--green-600));
  border-color: rgba(0,0,0,.15);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.notice .read-link .link-icon {
  width: 14px;
  height: 14px;
  transition: transform .2s ease;
  flex-shrink: 0;
}

.notice .read-link:hover .link-icon {
  transform: translate(2px, -2px);
}

/* animation: smooth fade-in */
@keyframes fadeInUp {
  0% { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  100% { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* apply animation via inline style (JS sets delay) */
.notice.animate,
.news-featured.animate,
.news-card-small.animate {
  animation: fadeInUp .4s cubic-bezier(.2,.9,.2,1) both;
}

/* hover effect - subtle lift */
.notice:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(9,30,66,.12);
  border-color: var(--green-200);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .latest-news-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .latest-news-actions {
    width: 100%;
    justify-content: flex-start;
  }
  
  .notice-board {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .notice {
    padding: 16px;
    min-height: 160px;
  }
  
  .notice .headline {
    font-size: 1rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@media (max-width: 640px) {
  .notice {
    padding: 14px;
    min-height: 150px;
  }
  
  .notice .badge {
    right: 12px;
    top: 12px;
    font-size: 9px;
    padding: 3px 8px;
  }
}

/* fallback small message */
.notice-empty { 
    padding: 2rem; 
    text-align:center; 
    color:var(--ink-700); 
    background:var(--card); 
    border: 1px solid var(--ink-100);
    border-radius:12px;
    margin: 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
}


/* Styles for the news card rendered by home.js */
.news-card {
    background: var(--card);
    border: 1px solid var(--ink-100);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex; /* Use flex for layout */
    flex-direction: column; /* Stack children vertically */
    justify-content: space-between; /* Push footer to bottom */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(9,30,66,.1);
}

.news-card-date {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--green-600);
    margin-bottom: 0.75rem;
}

.news-card-headline {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ink-900);
    margin: 0 0 1rem 0;
    /* Allow headline to grow, pushing footer down */
    flex-grow: 1; 
}

.news-card-footer {
    margin-top: 1rem; /* Add space above the button */
}
/* --- END: Home Page Latest News --- */


/* 4. "What We Track" Section (New) */
.what-we-track { background: transparent; border: none; box-shadow: none; margin: 0; border-radius: 0; }
.what-we-track-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}
.track-card .home-title {
  text-align: left;
}
.track-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.track-list li {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--ink-700);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.track-list li::before {
    content: '✓';
    color: var(--green-600);
    font-weight: 700;
    font-size: 1.25rem;
}
.track-art {
    display: flex;
    align-items: center;
    justify-content: center;
}
/* --- MODIFIED RULE --- */
.track-art img {
    width: 250px; /* Increased size from 150px */
    max-width: 100%; /* Added for responsiveness */
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,165,98,.25));
    /* animation: bell-ring 1.5s ease-in-out infinite 1s; -- REMOVED */
    transition: transform 0.3s ease; /* Added for hover */
}

/* --- ADDED RULE --- */
/* Add hover effect for interactivity */
.track-art img:hover {
    transform: scale(1.05);
}

/* 5. "CTA Section" (New) */
/* --- MODIFIED RULE --- */
.cta-section { background: transparent; border: none; box-shadow: none; margin: 0; border-radius: 0; }
.cta-section-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

/* --- ADDED RULE --- */
/* This new wrapper will hold the text content */
.cta-content {
    text-align: left; /* Align text left on desktop */
}

/* --- ADDED NEW RULE --- */
.cta-content .hero-buttons {
    justify-content: flex-start; /* Aligns button to the left */
}

/* --- MODIFIED RULES (for clarity) --- */
.cta-section h2 {
    font-size: 2.25rem;
    /* color: #fff; -- REPLACED */
    color: var(--ink-900); /* CHANGED TO DARK */
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.cta-section p {
    font-size: 1.125rem;
    /* color: var(--green-100); -- REPLACED */
    color: var(--ink-700); /* CHANGED TO DARK */
    margin-top: 0;
    margin-bottom: 2rem;
}
/* --- END MODIFIED RULES --- */

/* Re-style primary button for dark background */
/* --- REMOVED THE FOLLOWING RULES --- */
/*
.cta-section .btn.primary {
    background: #fff;
    color: var(--green-600);
    border-color: #fff;
}
.cta-section .btn.primary:hover {
    background: var(--green-50);
    color: var(--green-700);
    border-color: var(--green-50);
    box-shadow: 0 0 0 3px #fff;
}
*/
/* --- END REMOVED RULES --- */


/* --- ADDED NEW RULES for CTA art --- */
.cta-art {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- MODIFIED RULE --- */
.cta-art img {
    width: 250px;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
    background: #fff; /* Added a white card background */
    padding: 1rem; /* Added padding around the image */
    box-shadow: var(--shadow); /* Added a shadow to lift it */
}

.cta-art img:hover {
    transform: scale(1.05); /* Interactive hover */
}
/* --- END ADDED NEW RULES --- */


/* --- END NEW HOME STYLES --- */


/* Responsive adjustments */
@media (max-width: 768px) {
    .home-container {
      gap: 3rem;
      padding: 1rem;
    }

    /* --- MODIFIED RULE --- */
    .hero h1, .cta-section h2 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .home-title {
      font-size: 1.75rem;
    }
    .home-subtitle {
      font-size: 1rem;
    }

    /* MODIFIED this rule to include .cta-section */
    .what-we-track-inner, .cta-section-inner {
      grid-template-columns: 1fr;
    }

    /* MODIFIED this rule to include .cta-content */
    .track-card .home-title, .cta-content {
      text-align: center;
    }

    /* --- MODIFIED RULE --- */
    .track-art {
      margin-top: 1rem; /* Add some space */
    }

    /* --- ADDED RULE for new cta-art on mobile --- */
    .cta-art {
        display: none; /* Hide the second image on mobile for a cleaner look */
    }

    /* Remove side margins on mobile for full-width sections */
    .hero, .featured-sources, .what-we-track, .cta-section {
      margin: 0;
      border-radius: 0;
    }
    
    /* Improve Why Choose Us section on mobile */
    .why-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
    }
    
    .why-card {
      padding: 20px;
      border-radius: 12px;
    }
    
    .why-icon {
      width: 36px;
      height: 36px;
      margin-bottom: 0.875rem;
    }
    
    .why-card h3 {
      font-size: 1.125rem;
      margin-bottom: 0.625rem;
    }
    
    .why-card p {
      font-size: 0.875rem;
    }
    
    /* Guidelines grid responsive */
    .guidelines-grid {
      grid-template-columns: 1fr;
      gap: 1.25rem;
    }
    
    .guideline-card {
      padding: 24px;
    }
    
    .guideline-card h3 {
      font-size: 1.25rem;
    }
    
    .guideline-card p {
      font-size: 0.9rem;
    }
    
    .guideline-icon {
      width: 44px;
      height: 44px;
    }
    
    .why-card p {
      font-size: 0.9rem;
      line-height: 1.5;
    }
}

/* Tablet devices (landscape and portrait) */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Guidelines grid for tablet - 2 columns */
    .guidelines-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
    }
    
    .guideline-card {
      padding: 26px;
    }
    
    .guideline-card h3 {
      font-size: 1.3rem;
    }
    
    .guideline-card p {
      font-size: 0.95rem;
    }
    
    /* Make the third card span both columns if there are only 3 cards */
    .guideline-card:nth-child(3):last-child {
      grid-column: 1 / -1;
      max-width: 600px;
      margin: 0 auto;
      width: 100%;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .why-card {
      padding: 18px;
    }
    
    .why-icon {
      width: 32px;
      height: 32px;
      margin-bottom: 0.75rem;
    }
    
    .why-card h3 {
      font-size: 1rem;
    }
    
    .why-card p {
      font-size: 0.8125rem;
    }
    
    /* Guidelines cards on extra small screens */
    .guideline-card {
      padding: 20px;
    }
    
    .guideline-card h3 {
      font-size: 1.125rem;
    }
    
    .guideline-card p {
      font-size: 0.875rem;
    }
    
    .guideline-icon {
      width: 40px;
      height: 40px;
    }
    
    .why-card p {
      font-size: 0.875rem;
    }
    
    /* Further optimize announcement cards for very small screens */
    .card-link {
      grid-template-columns: 44px 1fr;
      gap: 10px;
      padding: 10px;
    }
    
    .card .logo {
      width: 44px;
      height: 44px;
      border-radius: 8px;
      font-size: 10px;
    }
    
    .title {
      font-size: 13px;
      -webkit-line-clamp: 3;
      line-clamp: 3;
    }
    
    .org {
      font-size: 11px;
    }
    
    .row {
      font-size: 10px;
    }
}

/* --- DUPLICATE STYLES (for safety, will be merged) --- */
/* These are from the original file, ensure they are not lost */

/* NEW STYLES FOR SOURCE CARDS */
.source-selector-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem 24px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.source-selector-container h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--ink-900);
}

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

.source-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

.source-card {
    background: var(--card);
    border: 1px solid var(--ink-100);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: var(--ink-900);
    min-height: 180px;
    flex: 1;
}

.source-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(9,30,66,.1);
}

.source-card-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(180deg, var(--green-100), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--green-700);
    margin: 0 auto 1rem auto;
}

.source-card-logo img{ width:100%; height:100%; object-fit:contain; border-radius:50%; background:#fff }

.source-card h3 {
    margin: 0;
    font-size: 1.25rem;
}

.source-full{ margin-top:4px; color: var(--ink-700); font-size: .9rem }
.source-desc{ margin:8px 8px 0 8px; color: var(--ink-500); font-size: .85rem; line-height:1.4 }

/* Subscribe button styles */
.subscribe-btn {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--green-600);
    border-radius: 8px;
    background: #fff;
    color: var(--green-700);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.subscribe-btn:hover {
    background: var(--green-50);
    border-color: var(--green-700);
    transform: translateY(-1px);
}

.subscribe-btn.subscribed {
    background: var(--green-600);
    color: #fff;
    border-color: var(--green-600);
}

.subscribe-btn.subscribed:hover {
    background: var(--green-700);
    border-color: var(--green-700);
}

.subscribe-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Style for the 'Back' button in the tab bar */
.back-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--ink-100);
    background: #fff;
    color: var(--ink-700);
    font-weight: 600;
    cursor: pointer;
    transition: .18s;
    margin-right: 16px;
}
.back-btn:hover {
    background: var(--ink-100);
}

/* Legal Pages Styles */
.legal-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 24px;
    min-height: calc(100vh - 200px);
}

.legal-container {
    background: var(--card);
    border: 1px solid var(--ink-100);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
}

.legal-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ink-900);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.legal-updated {
    color: var(--ink-500);
    font-size: 0.9rem;
    margin: 0 0 2rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--ink-100);
}

.legal-section {
    margin-bottom: 2rem;
}

.legal-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ink-900);
    margin: 0 0 1rem 0;
}

.legal-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink-700);
    margin: 1.5rem 0 0.75rem 0;
}

.legal-section p {
    color: var(--ink-700);
    line-height: 1.7;
    margin: 0 0 1rem 0;
}

.legal-section ul {
    color: var(--ink-700);
    line-height: 1.8;
    margin: 0.5rem 0 1rem 1.5rem;
    padding-left: 0;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

.legal-section a {
    color: var(--green-600);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.legal-section a:hover {
    color: var(--green-700);
}

.legal-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ink-100);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.legal-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--green-50);
    color: var(--green-700);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid var(--green-200);
}

.legal-nav a:hover {
    background: var(--green-100);
    color: var(--green-800);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .legal-page {
        margin: 1rem auto;
        padding: 0 16px;
    }
    
    .legal-container {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .legal-container h1 {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .legal-updated {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem;
    }
    
    .legal-section {
        margin-bottom: 1.75rem;
    }
    
    .legal-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0.875rem;
    }
    
    .legal-section h3 {
        font-size: 1.1rem;
        margin-top: 1.25rem;
    }
    
    .legal-section p {
        font-size: 0.95rem;
        line-height: 1.65;
    }
    
    .legal-section ul {
        margin: 0.5rem 0 1rem 1.25rem;
    }
    
    .legal-nav {
        flex-direction: column;
        margin-top: 2rem;
        padding-top: 1.5rem;
    }
    
    .legal-nav a {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .legal-page {
        margin: 0.75rem auto;
        padding: 0 12px;
    }
    
    .legal-container {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    .legal-container h1 {
        font-size: 1.5rem;
        line-height: 1.25;
    }
    
    .legal-updated {
        font-size: 0.8rem;
    }
    
    .legal-section h2 {
        font-size: 1.15rem;
    }
    
    .legal-section h3 {
        font-size: 1rem;
    }
    
    .legal-section p {
        font-size: 0.9rem;
    }
}