/* ============================================================
   JEE Main Dashboard — styles.css
   Mobile-first, responsive, dark/light mode
   ============================================================ */

/* ── Custom properties ── */
:root {
  --bg:           #f4f6fb;
  --surface:      #ffffff;
  --surface2:     #f0f3f9;
  --text:         #1a1a2e;
  --muted:        #64748b;
  --accent:       #2563eb;
  --accent-soft:  rgba(37,99,235,.1);
  --success:      #10b981;
  --success-soft: rgba(16,185,129,.12);
  --danger:       #ef4444;
  --danger-soft:  rgba(239,68,68,.12);
  --warn:         #f59e0b;
  --border:       #dde3ee;
  --th-bg:        #f1f5f9;
  --ring-track:   #dde3ee;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.07);
  --shadow-md:    0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.15);
  --radius-sm:    8px;
  --radius-md:    12px;
  --radius-lg:    16px;
  --transition:   .25s ease;
}

body.dark {
  --bg:           #0f1117;
  --surface:      #1a1d27;
  --surface2:     #22263a;
  --text:         #e2e8f0;
  --muted:        #94a3b8;
  --accent:       #3b82f6;
  --accent-soft:  rgba(59,130,246,.12);
  --success:      #34d399;
  --success-soft: rgba(52,211,153,.12);
  --danger:       #f87171;
  --danger-soft:  rgba(248,113,113,.12);
  --warn:         #fbbf24;
  --border:       #2e3347;
  --th-bg:        #1e2235;
  --ring-track:   #2e3347;
  --shadow-sm:    0 1px 4px rgba(0,0,0,.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,.4);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.6);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ── */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  padding-top:    env(safe-area-inset-top, 0px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  padding-left:   env(safe-area-inset-left, 0px);
  padding-right:  env(safe-area-inset-right, 0px);
  transition: background var(--transition), color var(--transition);
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.header-logo-image {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.header-text h1 {
  font-size: clamp(1.05rem, 4vw, 1.3rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent);
}

.subtitle {
  font-size: clamp(.65rem, 3vw, .78rem);
  color: var(--muted);
  white-space: nowrap;
}

/* ── Icon button (theme toggle) ── */
.icon-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  color: var(--text);
}
.icon-btn:hover  { background: var(--surface2); transform: rotate(18deg); }
.icon-btn:active { transform: rotate(18deg) scale(.93); }

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

/* ── Field label ── */
.field-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* ── Select ── */
.select-wrap { position: relative; }

.select-wrap select {
  width: 100%;
  padding: 11px 38px 11px 14px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color var(--transition);
  min-height: 44px;
}

.select-wrap select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select-arrow {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: .85rem;
}

/* ── Drop Zone ── */
.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  color: var(--muted);
  font-size: .9rem;
  min-height: 88px;
}

.drop-zone:hover,
.drop-zone:focus,
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  outline: none;
}

.drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  font-size: 0;
}

.drop-icon { font-size: 1.6rem; margin-bottom: 6px; display: block; }

#dropText {
  pointer-events: none;
  display: block;
  overflow-wrap: break-word;
  word-break: break-all;
  max-width: 100%;
  font-size: .875rem;
}

/* ── Primary button ── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  margin-bottom: 14px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-primary:hover  { background: #1d4ed8; box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Danger button ── */
.btn-danger {
  padding: 9px 20px;
  min-height: 40px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--danger);
  background: transparent;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-danger:hover { background: rgba(239,68,68,.08); }

.btn-secondary {
  padding: 9px 20px;
  min-height: 40px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn-secondary:hover { background: var(--accent-soft); }

.btn { padding: 9px 20px; min-height: 40px; font-family: inherit;
       font-size: .9rem; font-weight: 600; cursor: pointer;
       border-radius: var(--radius-sm); border: 1px solid var(--danger);
       color: var(--danger); background: transparent;
       transition: background var(--transition); }
.btn:hover { background: rgba(239,68,68,.08); }

/* ── Spinner ── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Rings row ── */
.rings-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.ring-card {
  flex: 1 1 140px;
  max-width: 220px;
  min-width: 130px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 10px 10px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.ring-card canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
  margin: 0 auto;
}

.ring-text {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 6px;
  color: var(--text);
}

/* ── Tables ── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}

@media (max-width: 599px) {
  .table-scroll {
    background:
      linear-gradient(to right, var(--surface) 30%, transparent),
      linear-gradient(to left,  var(--surface) 30%, transparent) right,
      radial-gradient(farthest-side at left,  rgba(0,0,0,.12), transparent) left,
      radial-gradient(farthest-side at right, rgba(0,0,0,.12), transparent) right;
    background-color: var(--surface);
    background-attachment: local, local, scroll, scroll;
    background-size: 30px 100%, 30px 100%, 12px 100%, 12px 100%;
    background-repeat: no-repeat;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 380px;
  background: var(--surface);
}

th, td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: .85rem;
}

th {
  background: var(--th-bg);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

td:first-child { text-align: left; font-weight: 500; }
th:first-child  { text-align: left; }

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

tbody tr {
  transition: background var(--transition);
}
tbody tr:hover { background: rgba(0,0,0,.035); }
body.dark tbody tr:hover { background: rgba(255,255,255,.04); }

/* ── Clickable detail rows ── */
/* Result badges in detail table */
td.result-correct  { color: var(--success); font-weight: 600; }
td.result-wrong    { color: var(--danger);  font-weight: 600; }
td.result-skip     { color: var(--muted); }
td.result-cancelled { color: var(--warn); font-weight: 600; }

/* Summary table score column */
.summary-table td:nth-child(2) { color: var(--accent); font-weight: 700; }

/* ── Chart card ── */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.chart-title {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin-bottom: 12px;
}

.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ── Section heading ── */
.section-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 16px 0 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.section-hint {
  font-size: .72rem;
  font-weight: 400;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}

/* ── Center row ── */
.center-row {
  text-align: center;
  margin-top: 12px;
}

.action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ── Utility classes ── */
#resultsSection {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s ease;
}
#resultsSection.visible {
  max-height: 9999px;
}

#charts,
#questionAnalysis {
  opacity: 0;
  transition: opacity .4s;
}
#charts.show,
#questionAnalysis.show {
  opacity: 1;
}

/* ── Scrollbar ── */
@media (pointer: fine) {
  ::-webkit-scrollbar       { width: 5px; height: 5px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════
   QUESTION DETAIL MODAL
   ═══════════════════════════════════════════════ */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  /* prevent body scroll bleed */
  overscroll-behavior: contain;
}

.modal-backdrop.open {
  display: flex;
  animation: backdropIn .2s ease;
}

@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: 100%;
  max-width: 680px;
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
  animation: sheetUp .3s cubic-bezier(.32,1,.5,1);
  padding: 0 0 env(safe-area-inset-bottom, 0px);
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@media (min-width: 600px) {
  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }
  .modal-box {
    border-radius: var(--radius-lg);
    max-height: 88vh;
    animation: modalPop .25s cubic-bezier(.34,1.4,.64,1);
  }
  @keyframes modalPop {
    from { transform: scale(.92) translateY(12px); opacity: 0; }
    to   { transform: scale(1)   translateY(0);    opacity: 1; }
  }
}

/* ── Modal Header ── */
.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
  flex-wrap: wrap;
}

.modal-title-row {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.modal-qnum {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.modal-subject-tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent);
}

.modal-qid {
  font-size: .72rem;
  color: var(--muted);
}

/* Result badge */
.modal-badge {
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-correct {
  background: var(--success-soft);
  color: var(--success);
}
.badge-wrong {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-skip {
  background: var(--surface2);
  color: var(--muted);
}

/* Close button */
.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: .85rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  line-height: 1;
  align-self: center;
}
.modal-close:hover { background: var(--danger-soft); color: var(--danger); }

/* ── Modal Sections ── */
.modal-section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-section:last-child { border-bottom: none; }

.modal-section-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 10px;
}

.modal-question-text {
  font-size: .93rem;
  line-height: 1.65;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
}

/* ── Options ── */
.modal-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  background: var(--surface2);
  transition: border-color var(--transition), background var(--transition);
  cursor: default;
}

/* Correct option (not chosen) — green border */
.modal-option.opt-correct {
  border-color: var(--success);
  background: var(--success-soft);
}

/* Chosen correct — green border, slightly stronger */
.modal-option.opt-correct-chosen {
  border-color: var(--success);
  background: var(--success-soft);
  box-shadow: 0 0 0 3px rgba(16,185,129,.18);
}

/* Chosen wrong — red border */
.modal-option.opt-wrong-chosen {
  border-color: var(--danger);
  background: var(--danger-soft);
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

.opt-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
}

.opt-correct .opt-letter,
.opt-correct-chosen .opt-letter {
  background: var(--success);
  color: #fff;
}

.opt-wrong-chosen .opt-letter {
  background: var(--danger);
  color: #fff;
}

.opt-text {
  flex: 1;
  font-size: .88rem;
  color: var(--text);
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* opt-body wraps opt-text + opt-id-note vertically */
.opt-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.opt-id-note {
  font-size: .68rem;
  color: var(--muted);
  font-family: monospace;
}

/* opt-tags floats right */
.opt-tags {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

/* Unavailable question text */
.modal-question-unavailable {
  font-size: .85rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.6;
}

.opt-tag {
  flex-shrink: 0;
  font-size: .66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 10px;
}

.tag-correct {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid var(--success);
}

.tag-wrong {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* ── Short Answer (SA) ── */
.sa-answer-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
}

.sa-label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
}

.sa-val {
  font-size: 1.1rem;
  font-weight: 700;
}
.sa-correct { color: var(--success); }
.sa-wrong   { color: var(--danger);  }
.sa-skip    { color: var(--muted);   }

/* ── Modal note ── */
.modal-note {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 8px;
  text-align: center;
}

/* ── Tablet / Desktop ── */
@media (min-width: 540px) {
  .container { padding: 20px 20px 40px; }
  .card      { padding: 20px; }
  th, td     { padding: 11px 16px; font-size: .88rem; }
  th         { font-size: .75rem; }
  .modal-section { padding: 18px 24px; }
  .modal-header  { padding: 20px 24px 16px; }
}

@media (min-width: 860px) {
  .container { padding: 28px 24px 48px; }
}

/* ============================================================
   KEAM Page Additions
   ============================================================ */

.helper-text {
  font-size: .82rem;
  color: var(--muted);
  margin-top: 8px;
}

.textarea-wrap {
  display: grid;
  gap: 10px;
}

.answer-textarea {
  width: 100%;
  min-height: 220px;
  padding: 14px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.answer-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.info-banner {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.info-banner-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--muted);
  margin-bottom: 8px;
}

.info-banner {
  margin-bottom: 14px;
}

.info-banner strong {
  color: var(--text);
}

.keam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
}

/* ============================================================
   Landing Page
   ============================================================ */

.landing-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.landing-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 16px;
  border-bottom: none;
  margin-bottom: 28px;
  padding-bottom: 0;
}

.landing-header-spacer {
  width: 42px;
  height: 42px;
}

.landing-title-wrap {
  text-align: center;
}

.landing-title {
  font-size: clamp(1.7rem, 7vw, 2.5rem);
  line-height: 1.05;
  color: var(--accent);
  letter-spacing: -.02em;
}

.landing-subtitle {
  margin-top: 8px;
  white-space: normal;
  font-size: .9rem;
}

.landing-grid {
  display: grid;
  gap: 18px;
}

.exam-link-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 260px;
  padding: 22px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, var(--surface), var(--surface2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.exam-link-card::before {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -46px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: .14;
  filter: blur(6px);
  transition: transform .24s ease, opacity .24s ease;
}

.exam-link-card:hover,
.exam-link-card:focus-visible {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .18);
  border-color: rgba(37, 99, 235, .28);
}

.exam-link-card:hover::before,
.exam-link-card:focus-visible::before {
  transform: scale(1.08);
  opacity: .2;
}

.exam-link-jee::before {
  background: radial-gradient(circle, #2563eb 0%, transparent 68%);
}

.exam-link-keam::before {
  background: radial-gradient(circle, #16a34a 0%, transparent 68%);
}

.exam-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.exam-link-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .12));
}

.exam-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.exam-link-content {
  position: relative;
  z-index: 1;
}

.exam-link-content h2 {
  font-size: clamp(1.35rem, 5vw, 1.75rem);
  line-height: 1.1;
  margin-bottom: 10px;
}

.exam-link-content p {
  font-size: .94rem;
  color: var(--muted);
  max-width: 46ch;
}

.exam-link-cta {
  position: relative;
  z-index: 1;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: .9rem;
}

body.dark .exam-link-card:hover,
body.dark .exam-link-card:focus-visible {
  box-shadow: 0 18px 40px rgba(0, 0, 0, .42);
}

@media (min-width: 760px) {
  .landing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-link-card {
    min-height: 300px;
    padding: 26px;
  }
}
