/* =========================================================
   Naija Scholar — visual system
   Lavender glass · deep navy contrast · pastel accents
   ========================================================= */

:root {
  color-scheme: light;

  --bg: #e9e5f9;
  --bg-2: #f5f2ff;
  --paper: #ffffff;

  --ink: #17142e;
  --ink-soft: #2a2547;
  --muted: #6f6a8a;

  --line: rgba(35, 29, 80, 0.10);
  --line-strong: rgba(35, 29, 80, 0.18);
  --check-border: rgba(35, 29, 80, 0.28);

  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.80);
  --glass-soft: rgba(255, 255, 255, 0.44);
  --glass-input: rgba(255, 255, 255, 0.88);
  --card-border: rgba(255, 255, 255, 0.74);
  --card-border-soft: rgba(255, 255, 255, 0.48);

  --violet: #6d5dfc;
  --violet-2: #9a86ff;
  --violet-soft: #e8e3ff;
  --pink: #f56aa8;
  --pink-soft: #ffe3f1;
  --blue: #45bdf5;
  --blue-soft: #ddf5ff;
  --mint: #54d6a4;
  --mint-soft: #dcfaee;
  --yellow: #ffd166;
  --yellow-soft: #fff3d1;
  --rust: #ef6a56;
  --rust-soft: #ffe6e1;

  --green: #1f9d72;
  --green-strong: #137a57;

  --navy: #1d1938;
  --navy-2: #2a2454;
  --navy-3: #3d2a66;
  --on-navy: #f8f6ff;
  --on-navy-muted: #b9b2dd;

  --glow-1: rgba(124, 101, 255, 0.30);
  --glow-2: rgba(255, 126, 182, 0.20);
  --glow-3: rgba(89, 199, 255, 0.18);
  --dot: rgba(29, 25, 56, 0.07);

  --shadow: 0 30px 70px rgba(45, 35, 100, 0.16);
  --shadow-sm: 0 12px 30px rgba(45, 35, 100, 0.10);
  --shadow-xs: 0 5px 16px rgba(45, 35, 100, 0.06);

  --radius: 30px;
  --radius-md: 22px;
  --radius-sm: 15px;
  --radius-xs: 11px;

  --sans: "Segoe UI Variable Text", "Segoe UI", Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", Inter, "SF Pro Display", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #100d22;
  --bg-2: #181330;
  --paper: #1b1636;

  --ink: #f4f1ff;
  --ink-soft: #ddd7f7;
  --muted: #aaa2cc;

  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --check-border: rgba(255, 255, 255, 0.34);

  --glass: rgba(30, 25, 62, 0.66);
  --glass-strong: rgba(38, 32, 76, 0.82);
  --glass-soft: rgba(30, 25, 62, 0.50);
  --glass-input: rgba(20, 16, 45, 0.82);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-border-soft: rgba(255, 255, 255, 0.06);

  --violet: #9a8cff;
  --violet-2: #b7a8ff;
  --violet-soft: rgba(154, 140, 255, 0.16);
  --pink: #ff8fc3;
  --pink-soft: rgba(255, 143, 195, 0.14);
  --blue: #6ed2ff;
  --blue-soft: rgba(110, 210, 255, 0.14);
  --mint: #54d6a4;
  --mint-soft: rgba(84, 214, 164, 0.14);
  --yellow: #ffd166;
  --yellow-soft: rgba(255, 209, 102, 0.14);
  --rust: #ff8f7a;
  --rust-soft: rgba(255, 143, 122, 0.14);

  --green: #5fd6a5;
  --green-strong: #8ef0c8;

  --navy: #0c091b;
  --navy-2: #151130;
  --navy-3: #241b44;
  --on-navy: #f8f6ff;
  --on-navy-muted: #b3abd6;

  --glow-1: rgba(124, 101, 255, 0.20);
  --glow-2: rgba(255, 126, 182, 0.12);
  --glow-3: rgba(89, 199, 255, 0.10);
  --dot: rgba(255, 255, 255, 0.055);

  --shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
  --shadow-sm: 0 12px 30px rgba(0, 0, 0, 0.28);
  --shadow-xs: 0 5px 16px rgba(0, 0, 0, 0.20);
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  background:
    radial-gradient(1000px 720px at 8% -12%, var(--glow-1), transparent 62%),
    radial-gradient(900px 680px at 102% -4%, var(--glow-2), transparent 56%),
    radial-gradient(900px 700px at 50% 112%, var(--glow-3), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
}

#app {
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(38px, 5vw, 58px);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(24px, 2.4vw, 30px);
}

h3 {
  font-size: 20px;
}

p {
  margin-top: 0;
  margin-bottom: 16px;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
  background: none;
  border: 0;
}

img {
  max-width: 100%;
}

input[type="checkbox"] {
  display: inline-grid;
  flex: none;
  place-content: center;
  width: 19px;
  height: 19px;
  margin: 0;
  border: 1.5px solid var(--check-border);
  border-radius: 6px;
  background-color: var(--glass-input);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px 13px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="checkbox"]:hover {
  border-color: rgba(109, 93, 252, 0.55);
}

input[type="checkbox"]:checked {
  border-color: transparent;
  background-color: var(--violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.4 8.4l3.1 3.1 6.1-6.9'/%3E%3C/svg%3E");
  box-shadow: 0 5px 12px rgba(109, 93, 252, 0.30);
}

::selection {
  background: var(--violet);
  color: #fff;
}

:where(button, a, summary):focus-visible {
  outline: 3px solid rgba(109, 93, 252, 0.38);
  outline-offset: 2px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(109, 93, 252, 0.28) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: rgba(109, 93, 252, 0.26);
  border-radius: 999px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 16px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 32px);
  max-width: 1120px;
  height: 70px;
  margin: 16px auto 0;
  padding: 0 12px 0 18px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: 0 18px 42px rgba(45, 35, 100, 0.13);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand b {
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--violet), var(--violet-2) 48%, var(--pink));
  color: #fff;
  font-size: 19px;
  box-shadow: 0 10px 22px rgba(109, 93, 252, 0.34);
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 3px;
}

.topbar nav [data-action="planner"] {
  display: inline-flex;
}

.icon-button,
.text-button {
  min-height: 42px;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.text-button {
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.text-button:hover {
  background: var(--violet-soft);
  color: var(--violet);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass-soft);
  color: var(--ink-soft);
  font-size: 18px;
}

.icon-button:hover {
  background: var(--violet-soft);
  color: var(--violet);
}

/* ---------- Shell ---------- */

main {
  max-width: 1120px;
  min-height: calc(100vh - 200px);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* ---------- Shared type ---------- */

.eyebrow,
.role-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.12);
}

.page-heading {
  max-width: 780px;
  margin: 0 0 34px;
}

.page-heading > p:not(.eyebrow) {
  max-width: 640px;
  color: var(--muted);
  font-size: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  margin: 0 0 24px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.back-link:hover {
  border-color: rgba(109, 93, 252, 0.34);
  background: var(--violet-soft);
  color: var(--violet);
}

.page-heading > .back-link {
  display: flex;
  width: max-content;
  margin-bottom: 16px;
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.button:hover {
  border-color: rgba(109, 93, 252, 0.38);
  color: var(--violet);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--violet), #8b6bff 58%, var(--pink));
  color: #fff;
  box-shadow: 0 14px 30px rgba(109, 93, 252, 0.34);
}

.button.primary:hover {
  color: #fff;
  filter: brightness(1.06);
}

.button.secondary {
  background: var(--glass-soft);
}

.button.small {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 11px;
  font-size: 12px;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---------- Home ---------- */

.welcome {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
}

.welcome h1 {
  max-width: 930px;
  margin: 16px 0 22px;
  font-size: clamp(46px, 7vw, 82px);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.welcome h1 em {
  display: inline;
  font-style: normal;
  background: linear-gradient(100deg, #5643ef 0%, #8f5cff 52%, #e84a92 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  max-width: 640px;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.welcome h2:not(.home-tools-title) {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 48px;
}

.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 250px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: rise 0.4s ease both;
}

.role-card::before {
  content: "";
  position: absolute;
  top: -90px;
  right: -70px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.32), transparent 68%);
  pointer-events: none;
}

.role-card:hover {
  border-color: rgba(109, 93, 252, 0.34);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.jamb-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-2) 58%, var(--navy-3) 100%);
  color: var(--on-navy);
  box-shadow: 0 30px 60px rgba(29, 25, 56, 0.28);
}

.jamb-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -90px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 134, 255, 0.35), transparent 68%);
  pointer-events: none;
}

.uni-card {
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  color: var(--ink);
}

.role-card .role-number {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-soft);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.13em;
}

.jamb-card .role-number {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #d8d0ff;
}

.role-card strong {
  position: relative;
  z-index: 1;
  margin: 20px 0 7px;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.role-card > span:nth-of-type(2) {
  position: relative;
  z-index: 1;
  max-width: 290px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.jamb-card > span:nth-of-type(2) {
  color: var(--on-navy-muted);
}

.arrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
  padding-top: 24px;
  font-size: 13px;
  font-weight: 600;
}

.arrow b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 14px;
}

.jamb-card .arrow b {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.home-tools-title {
  margin: 0 0 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.home-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 26px;
}

.tool-link {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  grid-template-rows: auto auto;
  gap: 3px 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--glass);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: rise 0.4s ease both;
}

.tool-link:hover {
  border-color: rgba(109, 93, 252, 0.34);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.tool-link > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c6bff, #a78bfa);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 18px rgba(109, 93, 252, 0.26);
}

.tool-link:nth-child(2) > span {
  background: linear-gradient(135deg, #ff9a6c, var(--pink));
  box-shadow: 0 8px 18px rgba(245, 106, 168, 0.26);
}

.tool-link:nth-child(3) > span {
  background: linear-gradient(135deg, #ffcf5c, #ff9a6c);
  box-shadow: 0 8px 18px rgba(255, 154, 108, 0.26);
}

.tool-link:nth-child(4) > span {
  background: linear-gradient(135deg, #54d6a4, #45bdf5);
  box-shadow: 0 8px 18px rgba(84, 214, 164, 0.26);
}

.tool-link:nth-child(5) > span {
  background: linear-gradient(135deg, #45bdf5, #7c6bff);
  box-shadow: 0 8px 18px rgba(69, 189, 245, 0.26);
}

.tool-link:nth-child(6) > span {
  background: linear-gradient(135deg, var(--pink), #a78bfa);
  box-shadow: 0 8px 18px rgba(245, 106, 168, 0.26);
}

.tool-link strong {
  font-size: 14px;
  font-weight: 600;
}

.tool-link small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.tool-link > b {
  grid-column: 3;
  grid-row: 1 / 3;
  justify-self: end;
  color: var(--violet);
  font-size: 16px;
}

.home-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.home-foot span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-soft);
}

/* ---------- Planner ---------- */

.planner-intro {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  max-width: 880px;
  margin-bottom: 24px;
  padding: 22px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.planner-number {
  display: grid;
  flex: none;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  color: #fff;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(109, 93, 252, 0.30);
}

.planner-intro h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.planner-intro p,
.planner-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.plan-form {
  max-width: 900px;
}

.plan-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.plan-input-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.plan-input-grid select,
.plan-input-grid input {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-input);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.plan-input-grid select:focus,
.plan-input-grid input:focus {
  border-color: rgba(109, 93, 252, 0.5);
  box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.12);
}

.uni-plan-fields {
  display: contents;
}

.uni-plan-fields[hidden] {
  display: none !important;
}

.plan-input-grid input[type="date"] {
  color-scheme: light dark;
}

.focus-fieldset,
.pace-fieldset {
  margin: 18px 0;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.focus-fieldset legend,
.pace-fieldset legend {
  padding: 0 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.focus-fieldset > .planner-hint {
  margin: 0 0 12px;
}

.plan-focus-list {
  display: grid;
}

.plan-focus-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.plan-focus-row:first-child {
  border-top: 0;
}

.plan-focus-row input,
.pace-option input,
.plan-task input {
  width: 18px;
  height: 18px;
  accent-color: var(--violet);
}

.plan-focus-row select {
  height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--glass-input);
  color: var(--ink);
  font-size: 11px;
}

.pace-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pace-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.pace-option:has(input:checked) {
  border-color: rgba(109, 93, 252, 0.45);
  background: linear-gradient(135deg, var(--violet-soft), var(--pink-soft));
  box-shadow: 0 8px 20px rgba(109, 93, 252, 0.10);
}

.pace-option > span {
  display: grid;
  gap: 2px;
}

.pace-option b {
  font-size: 12px;
}

.pace-option small {
  color: var(--muted);
  font-size: 10px;
}

.plan-progress {
  position: relative;
  max-width: 880px;
  margin-top: 26px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy), var(--navy-2) 62%, var(--navy-3));
  color: #fff;
  box-shadow: 0 26px 50px rgba(29, 25, 56, 0.24);
}

.plan-progress::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 126, 182, 0.22), transparent 68%);
  pointer-events: none;
}

.plan-progress > * {
  position: relative;
  z-index: 1;
}

.plan-progress > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.plan-progress > div:first-child .eyebrow {
  color: #c9c0ff;
}

.plan-progress > div:first-child .eyebrow::before {
  background: linear-gradient(135deg, var(--pink), var(--blue));
}

.plan-progress > div:first-child strong {
  color: #fff;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
}

.plan-progress > div:first-child > span:last-child,
.plan-progress > p {
  color: var(--on-navy-muted);
  font-size: 12px;
}

.plan-progress .progress-track {
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.14);
}

.plan-progress .progress-track span {
  background: linear-gradient(90deg, var(--pink), var(--violet-2), var(--blue));
}

.plan-progress > p {
  margin: 0;
}

.plan-upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 880px;
  margin-top: 18px;
  padding: 18px 22px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.plan-upgrade > div {
  display: grid;
  gap: 2px;
}

.plan-upgrade strong {
  font-size: 13px;
}

.plan-upgrade span {
  color: var(--muted);
  font-size: 11px;
}

.week-plan {
  max-width: 880px;
  margin-top: 34px;
}

.week-plan > h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.plan-day {
  margin-bottom: 12px;
  padding: 18px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.plan-day-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.plan-day-heading > div {
  display: grid;
  gap: 2px;
}

.plan-day-heading > div > span {
  color: var(--violet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.plan-day-heading strong {
  font-size: 15px;
}

.plan-day-heading > small {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--mint-soft);
  color: var(--green-strong);
  font-size: 11px;
  font-weight: 700;
}

.plan-task {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  margin: 8px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.plan-task:hover {
  border-color: rgba(109, 93, 252, 0.30);
}

.plan-task > span {
  display: grid;
  gap: 2px;
}

.plan-task strong {
  font-size: 12px;
  font-weight: 600;
}

.plan-task small {
  color: var(--muted);
  font-size: 11px;
}

.plan-task.is-done {
  border-color: rgba(31, 157, 114, 0.20);
  background: var(--mint-soft);
}

.plan-task.is-done strong {
  color: var(--muted);
  text-decoration: line-through;
}

.rest-day {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.plan-edit {
  max-width: 900px;
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.plan-edit summary {
  color: var(--violet);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.plan-edit .plan-form {
  padding-top: 20px;
}

.plan-edit[open] {
  padding-bottom: 22px;
}

.plan-edit .plan-input-grid {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.plan-edit .focus-fieldset,
.plan-edit .pace-fieldset {
  background: transparent;
  box-shadow: none;
}

/* ---------- Streak ---------- */

.streak-section {
  max-width: 900px;
}

.streak-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.streak-stats > div {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.streak-stats > div::after {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 134, 255, 0.18), transparent 70%);
}

.streak-stats strong {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.streak-stats span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}

.streak-action {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.streak-action span {
  color: var(--muted);
  font-size: 13px;
}

.streak-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  max-width: 560px;
  margin-bottom: 16px;
}

.streak-day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.streak-day.is-active {
  border-color: rgba(31, 157, 114, 0.25);
  background: linear-gradient(135deg, var(--mint-soft), rgba(84, 214, 164, 0.32));
  color: var(--green-strong);
  box-shadow: 0 6px 14px rgba(31, 157, 114, 0.12);
}

.streak-note {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- CGPA ---------- */

.cgpa-section {
  max-width: 900px;
}

.cgpa-form {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.cgpa-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cgpa-form input,
.cgpa-form select {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass-input);
  color: var(--ink);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.cgpa-form input:focus,
.cgpa-form select:focus {
  border-color: rgba(109, 93, 252, 0.5);
  box-shadow: 0 0 0 3px rgba(109, 93, 252, 0.12);
}

.cgpa-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.cgpa-summary > div {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.cgpa-summary strong {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.cgpa-summary > div:last-child strong {
  font-size: 23px;
  letter-spacing: -0.02em;
}

.cgpa-summary span {
  color: var(--muted);
  font-size: 12px;
}

.cgpa-table {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.cgpa-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--glass);
  box-shadow: var(--shadow-xs);
}

.grade-pill {
  padding: 4px 12px;
  border: 1px solid rgba(109, 93, 252, 0.15);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--violet-soft), var(--pink-soft));
  color: var(--violet);
  font-size: 12px;
  font-weight: 700;
}

.cgpa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Library ---------- */

.library-filters {
  display: flex;
  align-items: end;
  gap: 14px;
  max-width: 900px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.library-filters .search-box {
  flex: 1;
  height: 48px;
  margin: 0;
  border-radius: 999px;
  background: var(--glass-input);
}

.library-type-label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.library-type-label select {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-input);
  color: var(--ink);
  outline: none;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.library-card {
  position: relative;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: rise 0.4s ease both;
}

.library-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(154, 134, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.library-card:hover {
  border-color: rgba(109, 93, 252, 0.30);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.library-card-top,
.library-card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.library-category {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-level {
  color: var(--muted);
  font-size: 11px;
}

.library-card h2 {
  position: relative;
  z-index: 1;
  margin: 16px 0 8px;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.library-card > p {
  position: relative;
  z-index: 1;
  min-height: 36px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.library-card-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.library-card-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--violet);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.library-card-foot a:hover {
  text-decoration: underline;
}

/* ---------- Search ---------- */

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 700px;
  height: 54px;
  margin-bottom: 12px;
  padding: 0 16px;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  background: var(--glass-strong);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-box:focus-within {
  border-color: rgba(109, 93, 252, 0.45);
  box-shadow: 0 0 0 4px rgba(109, 93, 252, 0.12);
}

.search-box > span {
  color: var(--violet);
  font-size: 20px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.clear-search {
  padding: 0;
  color: var(--muted);
  font-size: 21px;
  cursor: pointer;
}

.clear-search:hover {
  color: var(--violet);
}

.search-results {
  display: grid;
  gap: 8px;
  max-width: 700px;
  margin-bottom: 26px;
}

.search-result {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.search-result:hover {
  border-color: rgba(109, 93, 252, 0.34);
  background: var(--violet-soft);
}

.search-result strong {
  font-size: 13px;
}

.search-result span {
  color: var(--muted);
  font-size: 11px;
}

.section-title {
  margin: 34px 0 14px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Subjects / faculties / levels ---------- */

.subject-grid,
.faculty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.subject-tile,
.faculty-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 132px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 20px;
  background: var(--glass);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  animation: rise 0.4s ease both;
}

.subject-tile::after,
.faculty-tile::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -38px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(109, 93, 252, 0.16), transparent 70%);
  pointer-events: none;
}

.subject-tile:hover,
.faculty-tile:hover,
.level-tile:hover {
  border-color: rgba(109, 93, 252, 0.34);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}

.tile-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--violet-soft);
  color: var(--violet);
  font-size: 11px;
  font-weight: 700;
}

.subject-tile:nth-child(6n + 2) .tile-index {
  background: var(--pink-soft);
  color: var(--pink);
}

.subject-tile:nth-child(6n + 3) .tile-index {
  background: var(--blue-soft);
  color: var(--blue);
}

.subject-tile:nth-child(6n + 4) .tile-index {
  background: var(--mint-soft);
  color: var(--green);
}

.subject-tile:nth-child(6n + 5) .tile-index {
  background: var(--yellow-soft);
  color: #b8860b;
}

.subject-tile:nth-child(6n + 6) .tile-index {
  background: var(--rust-soft);
  color: var(--rust);
}

.subject-tile strong,
.faculty-tile strong {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
}

.subject-tile > span:last-child,
.faculty-tile > span {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
}

.subject-tile b,
.faculty-tile b {
  color: var(--violet);
}

.mock-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy), var(--navy-2) 66%, var(--navy-3));
  color: #fff;
  box-shadow: 0 26px 50px rgba(29, 25, 56, 0.24);
}

.mock-banner::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(69, 189, 245, 0.22), transparent 68%);
  pointer-events: none;
}

.mock-banner > * {
  position: relative;
  z-index: 1;
}

.mock-banner .eyebrow {
  color: #c9c0ff;
}

.mock-banner h2 {
  margin-bottom: 6px;
  color: #fff;
}

.mock-banner p:not(.eyebrow) {
  margin: 0;
  color: var(--on-navy-muted);
}

/* ---------- Lists ---------- */

.topic-list,
.course-list {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.course-list {
  max-width: 860px;
}

.topic-row,
.unit-row,
.list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease;
}

.topic-row:last-child,
.unit-row:last-child,
.list-link:last-child {
  border-bottom: 0;
}

.topic-row:hover,
.unit-row:hover,
.list-link:hover {
  background: var(--glass-strong);
}

.topic-row > div,
.unit-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topic-row strong,
.unit-row strong {
  font-size: 14px;
  font-weight: 600;
}

.topic-row span,
.unit-row span {
  color: var(--muted);
  font-size: 12px;
}

.all-topic {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--violet-soft), var(--pink-soft));
}

.list-link {
  width: 100%;
  border-width: 0 0 1px;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.list-link b {
  color: var(--violet);
  font-size: 16px;
}

.gst-section {
  margin-top: 44px;
}

.gst-section h2 {
  margin-bottom: 14px;
}

.gst-strip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding: 22px 24px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--violet-soft), var(--pink-soft) 58%, var(--blue-soft));
  box-shadow: var(--shadow-sm);
}

.gst-strip div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gst-strip strong {
  font-size: 14px;
}

.gst-strip span {
  color: var(--muted);
  font-size: 12px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 700px;
}

.level-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 120px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.level-tile::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 106, 168, 0.16), transparent 70%);
}

.level-tile span {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, var(--violet), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.level-tile small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

/* ---------- Quiz / mock ---------- */

.quiz-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto 12px;
  color: var(--muted);
  font-size: 12px;
}

body:has(.mock-layout) .quiz-top {
  max-width: none;
}

.quiz-top .back-link {
  margin: 0;
}

.progress-track {
  height: 7px;
  max-width: 800px;
  margin: 12px auto 32px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line);
}

body:has(.mock-layout) .progress-track {
  max-width: none;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--violet), var(--pink));
  transition: width 0.25s ease;
}

.question-panel {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: var(--glass-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.question-panel h1 {
  margin: 12px 0 26px;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.source-tag {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.answer-list {
  display: grid;
  gap: 10px;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass);
  color: var(--ink);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.answer-option > span {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--glass-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.answer-option:hover,
.answer-option.selected {
  border-color: rgba(109, 93, 252, 0.40);
  background: var(--violet-soft);
  transform: translateY(-1px);
}

.answer-option:hover > span,
.answer-option.selected > span {
  border-color: var(--violet);
  background: var(--violet);
  color: #fff;
}

.answer-option.answer-correct {
  border-color: rgba(31, 157, 114, 0.35);
  background: var(--mint-soft);
}

.answer-option.answer-correct > span {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.answer-option.answer-wrong {
  border-color: rgba(239, 106, 86, 0.35);
  background: var(--rust-soft);
}

.answer-option.answer-wrong > span {
  border-color: var(--rust);
  background: var(--rust);
  color: #fff;
}

.answer-option:disabled {
  cursor: default;
}

.answer-feedback {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid rgba(31, 157, 114, 0.20);
  border-left: 4px solid var(--green);
  border-radius: 16px;
  background: var(--mint-soft);
}

.answer-feedback.is-wrong {
  border-color: rgba(239, 106, 86, 0.20);
  border-left-color: var(--rust);
  background: var(--rust-soft);
}

.answer-feedback strong {
  color: var(--green-strong);
  font-size: 13px;
}

.answer-feedback.is-wrong strong {
  color: var(--rust);
}

.answer-feedback p {
  margin: 8px 0;
  font-size: 13px;
}

.answer-feedback > .button {
  margin-top: 12px;
}

.mock-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.question-palette {
  position: sticky;
  top: 100px;
  height: max-content;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: linear-gradient(160deg, var(--navy), var(--navy-2));
  box-shadow: 0 24px 45px rgba(29, 25, 56, 0.22);
}

.question-palette > strong {
  display: block;
  margin-bottom: 14px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-palette > div {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-height: min(560px, calc(100vh - 280px));
  padding-right: 4px;
  overflow-y: auto;
}

.palette-item {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.palette-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.palette-item.current {
  border-color: var(--pink);
  outline: 2px solid var(--pink);
  outline-offset: 1px;
  background: rgba(245, 106, 168, 0.18);
  color: #fff;
}

.palette-item.answered {
  border-color: rgba(84, 214, 164, 0.40);
  background: rgba(84, 214, 164, 0.20);
  color: #d6ffef;
}

.mock-controls {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 25px;
}

.timer {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--rust-soft);
  color: var(--rust);
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Results ---------- */

.result-heading {
  padding: 10px 0 32px;
  text-align: center;
}

.result-heading h1 {
  margin: 0;
  background: linear-gradient(135deg, var(--violet), var(--pink) 58%, var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--display);
  font-size: 86px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.result-heading h1 small {
  font-size: 34px;
}

.result-heading p:last-child {
  color: var(--muted);
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.result-section {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.result-section h2,
.weak-section h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.score-row:last-child {
  border-bottom: 0;
}

.weak-section {
  max-width: 800px;
  margin: 24px auto 0;
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.weak-section > p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.weak-section > p:last-child {
  border-bottom: 0;
}

.weak-section b {
  color: var(--rust);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

/* ---------- Contribute ---------- */

.contribution-block {
  max-width: 860px;
  margin-bottom: 18px;
  padding: 26px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}

.contribution-block h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.contribution-block ol {
  margin: 0 0 16px;
  padding-left: 20px;
}

.contribution-block li {
  padding: 5px 0;
  color: var(--muted);
  font-size: 13px;
}

.contribution-block code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--violet-soft);
  color: var(--violet);
  font: 12px/1.5 "Cascadia Code", Consolas, monospace;
}

.contribution-block pre {
  padding: 20px;
  overflow: auto;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #e9e4ff;
  font: 12px/1.7 "Cascadia Code", Consolas, monospace;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.contribution-block pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.link-button {
  margin: 6px 0;
}

/* ---------- Mock setup ---------- */

.mock-form {
  max-width: 820px;
}

.mock-form fieldset {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--glass-soft);
  box-shadow: var(--shadow-sm);
}

.mock-form legend {
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.check-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-strong);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.check-option:hover {
  border-color: rgba(109, 93, 252, 0.34);
  background: var(--violet-soft);
}

.check-option:has(input:checked) {
  border-color: rgba(109, 93, 252, 0.45);
  background: var(--violet-soft);
}

.check-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--violet);
}

.mock-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  color: var(--muted);
  font-size: 12px;
}

.mock-summary span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass-soft);
}

.mock-summary b {
  margin-left: 4px;
  color: var(--violet);
}

.s {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Utility ---------- */

.empty-note {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: var(--glass-soft);
  color: var(--muted);
  font-size: 13px;
}

.form-error {
  min-height: 22px;
  color: var(--rust);
  font-size: 12px;
}

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 20px 40px rgba(29, 25, 56, 0.30);
  font-size: 13px;
  text-align: center;
  transform: translateX(-50%);
  animation: rise 0.2s ease;
}

/* ---------- Motion ---------- */

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

/* ---------- Responsive ---------- */

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

  .mock-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 820px) {
  .mock-layout {
    grid-template-columns: 1fr;
  }

  .question-palette {
    position: static;
    order: 2;
  }

  .question-palette > div {
    grid-template-columns: repeat(8, 1fr);
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .library-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    top: 10px;
    width: calc(100% - 24px);
    height: 62px;
    margin-top: 10px;
    padding: 0 9px 0 13px;
  }

  .brand {
    gap: 9px;
    font-size: 13px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 17px;
  }

  .topbar nav {
    gap: 1px;
  }

  .topbar nav [data-action="library"] {
    display: none;
  }

  .text-button {
    padding: 0 9px;
    font-size: 12px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .nav-secondary {
    display: none;
  }

  main {
    padding: 34px 16px 60px;
  }

  footer {
    padding: 22px 16px 34px;
  }

  .welcome h1 {
    font-size: clamp(40px, 10vw, 56px);
  }

  .lede {
    font-size: 16px;
  }

  .role-grid,
  .home-tools,
  .plan-input-grid {
    grid-template-columns: 1fr;
  }

  .role-card {
    min-height: 205px;
    padding: 22px;
  }

  .role-card strong {
    font-size: 26px;
  }

  .subject-grid,
  .faculty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-tile {
    min-height: 112px;
    padding: 14px;
  }

  .subject-tile strong,
  .faculty-tile strong {
    font-size: 13px;
  }

  .mock-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }

  .check-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .question-panel {
    padding: 20px;
  }

  .question-palette > div {
    grid-template-columns: repeat(8, 1fr);
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .button {
    width: 100%;
  }

  .home-foot {
    gap: 8px;
  }

  .page-heading {
    margin-bottom: 24px;
  }

  .back-link {
    margin-bottom: 20px;
  }

  .library-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .library-type-label {
    min-width: 0;
  }

  .library-card > p {
    min-height: 0;
  }

  .uni-plan-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .plan-focus-row {
    grid-template-columns: 22px minmax(0, 1fr) 130px;
    gap: 8px;
  }

  .pace-options {
    grid-template-columns: 1fr;
  }

  .pace-option {
    min-height: 54px;
  }

  .plan-upgrade {
    align-items: flex-start;
  }

  .plan-upgrade > span {
    max-width: 250px;
  }

  .cgpa-form {
    grid-template-columns: 1fr 1fr;
  }

  .cgpa-form button {
    grid-column: 1 / -1;
  }

  .cgpa-row {
    grid-template-columns: 1fr auto auto auto;
  }

  .streak-stats {
    gap: 10px;
  }

  .streak-stats > div {
    padding: 15px;
  }

  .streak-stats strong {
    font-size: 30px;
  }
}

@media (max-width: 520px) {
  .topbar nav [data-action="planner"] {
    display: none;
  }

  .brand span:last-child {
    font-size: 12px;
  }

  .subject-grid,
  .faculty-grid {
    grid-template-columns: 1fr 1fr;
  }

  .check-grid {
    grid-template-columns: 1fr;
  }

  .question-palette > div {
    grid-template-columns: repeat(6, 1fr);
  }

  .result-heading h1 {
    font-size: 64px;
  }

  .result-actions {
    flex-direction: column;
  }

  .streak-stats,
  .cgpa-summary {
    grid-template-columns: 1fr;
  }

  .plan-progress > div:first-child {
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
  }

  .plan-progress > div:first-child .eyebrow {
    flex-basis: 100%;
  }

  .plan-progress > div:first-child strong {
    font-size: 30px;
  }

  .cgpa-form {
    grid-template-columns: 1fr;
  }

  .cgpa-form button {
    grid-column: auto;
  }

  .cgpa-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }

  .cgpa-row > span:nth-child(2) {
    justify-self: end;
  }

  .cgpa-row .grade-pill {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .cgpa-row .button {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .mock-summary {
    gap: 8px;
  }

  .plan-focus-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .plan-focus-row select {
    grid-column: 2;
  }

  .contribution-block {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
