:root {
  --brand: #16235e;
  --brand-strong: #0d1748;
  --brand-soft: #eef1fb;
  --accent: #ff5f1f;
  --accent-soft: #fff2ec;
  --ink: #172033;
  --muted: #6a7385;
  --line: #e6e9ef;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --success: #16794b;
  --warning: #a96600;
  --danger: #b42318;
  --shadow: 0 10px 28px rgba(23, 35, 95, 0.08);
  --radius: 16px;
  --max: 1180px;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface-2);
  line-height: 1.5;
}
button, input, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(230, 233, 239, 0.85);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
}
.topbar__inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; color: var(--brand); }
.brand img { width: 142px; height: 44px; object-fit: contain; object-position: left center; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a { padding: 9px 12px; border-radius: 9px; color: #424a5c; font-weight: 650; font-size: 14px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav-toggle { display: none; border: 1px solid var(--line); border-radius: 9px; background: white; padding: 8px 11px; }
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #111c54, #1c2c76 72%, #25398b);
  color: white;
  padding: 76px 0 70px;
}
.hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(255, 96, 31, 0.13);
  right: -100px;
  top: -90px;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 48px; }
.eyebrow { margin: 0 0 12px; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 800; color: #ffd6c4; }
.hero h1 { margin: 0; max-width: 760px; font-size: clamp(38px, 6vw, 64px); line-height: 1.03; letter-spacing: -.04em; }
.hero p { max-width: 680px; margin: 20px 0 0; font-size: 18px; color: #dfe4ff; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__panel { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: 22px; padding: 24px; }
.hero__panel strong { display: block; font-size: 32px; margin-bottom: 4px; }
.hero__panel span { color: #dfe4ff; }
.btn { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 750; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn--primary { background: var(--accent); color: white; box-shadow: 0 8px 20px rgba(255,96,31,.23); }
.btn--secondary { background: white; color: var(--brand); }
.btn--ghost { border: 1px solid var(--line); background: white; color: var(--ink); }
.btn--small { padding: 8px 11px; font-size: 13px; }
.btn:focus-visible, a:focus-visible { outline: 3px solid rgba(255,96,31,.28); outline-offset: 2px; }
.section { padding: 58px 0; }
.section--tight { padding: 34px 0; }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.section__head h2 { margin: 0; font-size: clamp(25px, 3.5vw, 36px); letter-spacing: -.025em; }
.section__head p { margin: 6px 0 0; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 1px rgba(16,24,40,.02); }
.card--raised { box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); }
.metric { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.metric__value { font-size: 30px; font-weight: 850; letter-spacing: -.03em; color: var(--brand); }
.metric__label { margin-top: 2px; color: var(--muted); font-size: 13px; }
.metric__badge { padding: 5px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; background: var(--brand-soft); color: var(--brand); }
.app-shell { min-height: 100vh; background: #f6f7fa; }
.app-layout { width: min(100% - 28px, 1320px); margin: 20px auto 40px; display: grid; grid-template-columns: 238px 1fr; gap: 18px; }
.sidebar { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; align-self: start; position: sticky; top: 90px; }
.sidebar__title { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 8px 10px; }
.sidebar a { display: flex; align-items: center; justify-content: space-between; padding: 10px 11px; border-radius: 9px; color: #454d5f; font-weight: 650; font-size: 14px; }
.sidebar a:hover, .sidebar a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.sidebar a[hidden], [data-institute-only][hidden] { display: none !important; }
.content { min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -.025em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.stack { display: grid; gap: 16px; }
.table-card { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.table-head { padding: 17px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.table-head h2 { font-size: 17px; margin: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 18px; text-align: left; border-bottom: 1px solid #eef0f4; font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #fbfbfd; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status--active, .status--success { background: #eaf8f1; color: var(--success); }
.status--scheduled { background: #fff4e6; color: var(--warning); }
.status--inactive { background: #f1f2f5; color: #667085; }
.status--danger { background: #fff0ee; color: var(--danger); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mock-card { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.mock-card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.mock-card__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: end; }
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 16px; border-radius: 0 12px 12px 0; color: #6a331e; }
.callout strong { color: #512311; }
.test-card { border: 1px solid #dfe3ee; background: white; border-radius: 18px; padding: 22px; }
.test-card--live { border-color: rgba(255,96,31,.38); box-shadow: 0 10px 30px rgba(255,96,31,.08); }
.test-card__top { display: flex; justify-content: space-between; gap: 14px; }
.test-card h2 { margin: 8px 0 6px; }
.test-card__window { margin-top: 16px; padding: 12px 14px; background: #f7f8fb; border-radius: 11px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.leaderboard { display: grid; gap: 10px; }
.rank-row { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; background: white; border: 1px solid var(--line); border-radius: 11px; }
.rank { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 850; }
.rank-row strong { display: block; }
.rank-row small { color: var(--muted); }
.feature-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 900; }
.footer {
  padding: 30px 0;
  border-top: 0;
  background: #101b4d;
  color: #dfe4ff;
  font-size: 13px;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.footer__brand {
  display: inline-flex;
  align-items: center;
}
.footer__brand img {
  width: 188px;
  height: auto;
}
.footer__copy {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 22px;
  flex-wrap: wrap;
  color: #c7cee9;
}
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; z-index: 100; background: #111827; color: white; padding: 11px 15px; border-radius: 10px; box-shadow: var(--shadow); transition: .18s ease; font-size: 14px; }
.toast--visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 980px) {
  .hero__grid, .grid--4, .grid--3 { grid-template-columns: 1fr 1fr; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .sidebar__title { display: none; }
  .sidebar a { white-space: nowrap; }
}
@media (max-width: 700px) {
  .container { width: min(100% - 22px, var(--max)); }
  .hero { padding: 54px 0; }
  .hero__grid, .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .hero__panel { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 11px; right: 11px; top: 62px; flex-direction: column; align-items: stretch; background: white; border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); }
  .nav[data-open] { display: flex; }
  .brand img { width: 104px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .mock-card { grid-template-columns: 1fr; }
  .mock-card__actions { justify-content: start; }
}

.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 15%, rgba(255,96,31,.08), transparent 28%),
    linear-gradient(145deg, #f7f8fb 0%, #eef1fb 100%);
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}
.auth-card {
  width: min(100%, 430px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px;
  box-shadow: var(--shadow);
}
.auth-brand {
  display: inline-block;
  margin-bottom: 22px;
}
.auth-brand img {
  width: 196px;
  height: auto;
}
.auth-eyebrow {
  color: var(--accent);
  margin-bottom: 7px;
}
.auth-card h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -.03em;
}
.auth-copy {
  margin: 8px 0 22px;
  color: var(--muted);
}
.auth-form {
  display: grid;
  gap: 15px;
}
.auth-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 750;
  color: #333b4d;
}
.auth-form input {
  width: 100%;
  border: 1px solid #d8dce6;
  border-radius: 10px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  outline: 0;
}
.auth-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23,35,95,.10);
}
.auth-error {
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff0ee;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}
.auth-submit { width: 100%; margin-top: 3px; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-note {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.student-session-dialog {
  width: min(100% - 28px, 500px);
  border: 0;
  padding: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 20px 56px rgba(16, 27, 77, .20);
}
.student-session-dialog::backdrop {
  background: rgba(20, 31, 49, .50);
}
.student-session-dialog__card {
  background: white;
  border: 1px solid #dfe3eb;
  border-radius: 16px;
  padding: 24px 26px 22px;
}
.student-session-dialog__card h2 {
  margin: 0;
  color: var(--brand);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.student-session-dialog__card p {
  margin: 10px 0 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.student-session-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}
.student-session-dialog__cancel,
.student-session-dialog__continue {
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 800;
}
.student-session-dialog__cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--brand);
}
.student-session-dialog__continue {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
}
.student-session-dialog__cancel:hover { background: var(--surface-2); }
.student-session-dialog__continue:hover { filter: brightness(.96); }
@media (max-width: 520px) {
  .student-session-dialog {
    width: min(100% - 22px, 500px);
  }
  .student-session-dialog__card { padding: 20px 18px 18px; }
  .student-session-dialog__card h2 { font-size: 21px; }
  .student-session-dialog__actions { gap: 8px; }
  .student-session-dialog__cancel,
  .student-session-dialog__continue {
    flex: 1;
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }
}
.admin-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.admin-user__meta {
  text-align: right;
  line-height: 1.25;
}
.admin-user__meta strong {
  display: block;
  font-size: 13px;
}
.admin-user__meta small {
  color: var(--muted);
  font-size: 11px;
}

.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 46px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible {
  background: #f1f3f8;
  color: var(--brand);
  outline: none;
}
.password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle__hide { display: none; }
.password-toggle[aria-pressed="true"] .password-toggle__show { display: none; }
.password-toggle[aria-pressed="true"] .password-toggle__hide { display: block; }

/* Platform admin live dashboard */
.admin-section[hidden] { display: none !important; }
.dashboard-eyebrow {
  margin-bottom: 6px;
  color: var(--accent);
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
}
.toolbar label {
  display: grid;
  gap: 6px;
  min-width: 160px;
  color: #4b5565;
  font-size: 12px;
  font-weight: 750;
}
.toolbar__search {
  flex: 1;
  max-width: 440px;
}
.toolbar input,
.toolbar select,
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid #d8dce6;
  border-radius: 10px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  outline: 0;
}
.toolbar input:focus,
.toolbar select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23,35,95,.09);
}
.form-field textarea { resize: vertical; min-height: 92px; }
.table-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.table-empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--muted);
}
.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.code-chip,
.type-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 4px 7px;
  background: #f1f3f8;
  color: #475067;
  font-size: 11px;
  font-weight: 750;
}
.type-chip { text-transform: capitalize; }
.credit-balance { color: var(--brand); }
.amount-positive { color: var(--success); }
.amount-negative { color: var(--danger); }
.reason-cell { max-width: 330px; }
.muted { color: var(--muted); }
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.table-pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.table-pagination .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.admin-callout { margin-bottom: 18px; }
.admin-table-gap { margin-top: 18px; }

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 42px;
}
.empty-state__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 15px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 900;
}
.empty-state h2 {
  margin: 0;
  font-size: 21px;
}
.empty-state p {
  max-width: 560px;
  margin-top: 7px;
}

.settings-card h3 { margin-bottom: 14px; }
.settings-card dl { margin: 0; }
.settings-card dl > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.settings-card dl > div:first-child { border-top: 0; }
.settings-card dt { color: var(--muted); font-size: 12px; font-weight: 700; }
.settings-card dd { margin: 0; font-weight: 700; }

.admin-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
}
.admin-dialog::backdrop {
  background: rgba(17, 24, 39, .46);
  backdrop-filter: blur(3px);
}
.dialog-card {
  width: 100%;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  margin: 0;
  padding: 24px;
  border: 1px solid rgba(230,233,239,.92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(16,24,40,.20);
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.dialog-head h2 {
  margin: 0;
  font-size: 23px;
}
.dialog-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}
.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}
.icon-button:hover { background: var(--surface-2); color: var(--ink); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-field {
  display: grid;
  gap: 6px;
  color: #3f4758;
  font-size: 12px;
  font-weight: 750;
}
.form-field small {
  color: var(--muted);
  font-weight: 500;
}
.form-field--wide { grid-column: 1 / -1; }
.form-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff0ee;
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.balance-banner {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
}
.balance-banner strong { font-size: 18px; }
.skeleton-text { opacity: .55; }

@media (max-width: 760px) {
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .toolbar__search { max-width: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field--wide { grid-column: auto; }
  .dialog-card { padding: 19px; }
  .table-pagination { justify-content: center; }
  .admin-user__meta { display: none; }
}

.btn--danger {
  border: 1px solid #f5c2bd;
  background: #fff5f4;
  color: var(--danger);
}
.btn--danger:hover {
  background: #ffebe8;
}
.form-divider {
  position: relative;
  margin: 22px 0 16px;
  border-top: 1px solid var(--line);
}
.form-divider span {
  position: relative;
  top: -10px;
  display: inline-block;
  padding-right: 10px;
  background: #fff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Consistent form alignment */
.institute-details-grid,
.login-password-grid {
  column-gap: 22px;
  row-gap: 18px;
  align-items: start;
}

.form-field {
  min-width: 0;
}

.form-field > span:first-child:not(.password-field) {
  min-height: 20px;
  display: flex;
  align-items: flex-end;
}

.form-field input,
.form-field select,
.password-field input {
  min-height: 48px;
}

.field-hint,
.form-field small {
  min-height: 18px;
  margin: 0;
  line-height: 18px;
}

.field-hint--placeholder {
  visibility: hidden;
  user-select: none;
}

.login-password-grid {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.admin-dialog {
  width: min(760px, calc(100% - 28px));
}

@media (max-width: 760px) {
  .institute-details-grid,
  .login-password-grid {
    row-gap: 14px;
  }

  .field-hint--placeholder {
    display: none;
  }

  .login-password-grid {
    margin-top: 16px;
    padding-top: 16px;
  }
}

.role-section[hidden] { display: none !important; }

.student-metric-text {
  margin-top: 12px;
  font-size: 22px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.student-empty-card {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .student-metric-text { font-size: 20px; }
}

.hero__panel-logo {
  width: 158px;
  height: auto;
  margin: 0 0 20px auto;
  opacity: .96;
}

@media (max-width: 700px) {
  .brand img { width: 122px; height: 40px; }
  .footer__inner { align-items: flex-start; flex-direction: column; }
  .footer__brand img { width: 170px; }
  .footer__copy { justify-content: flex-start; }
}


/* Mock test administration */
.mock-summary-grid {
  margin-bottom: 18px;
}

.mock-admin-note {
  margin-bottom: 18px;
}

.mock-test-dialog {
  width: min(860px, calc(100% - 28px));
}

.mock-form-grid {
  column-gap: 22px;
  row-gap: 16px;
  align-items: start;
}

.form-field select:disabled {
  background: #f4f5f8;
  color: #667085;
  cursor: not-allowed;
}

.mock-flow-card {
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid #dfe3ee;
  border-radius: 12px;
  background: #f7f9fc;
}

.mock-flow-card > strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 13px;
}

.mock-flow-card [data-mock-flow] {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.mock-flow-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.45;
}

.mock-upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.mock-upload-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 154px;
  padding: 16px;
  border: 1px dashed #cbd2e1;
  border-radius: 13px;
  background: #fbfcfe;
  color: #3f4758;
}

.mock-upload-card[hidden] {
  display: none !important;
}

.mock-upload-card__title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.mock-upload-card input[type="file"] {
  width: 100%;
  min-height: auto;
  padding: 9px;
  border: 1px solid #d8dce6;
  border-radius: 9px;
  background: white;
  color: #475467;
  font-size: 12px;
}

.mock-upload-card input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 750;
  cursor: pointer;
}

.mock-upload-card small {
  color: var(--muted);
  line-height: 1.45;
}

.mock-storage-note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #714024;
  font-size: 12px;
  line-height: 1.5;
}

.mock-storage-note strong {
  color: #592d17;
}

.mock-file-list {
  display: grid;
  gap: 5px;
}

.mock-file-chip {
  display: block;
  max-width: 320px;
  color: #475467;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.mock-file-chip strong {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 5px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
}

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

  .mock-upload-card {
    min-height: auto;
  }
}


/* Institute mock library and scheduling */
.institute-library-note {
  margin-bottom: 18px;
}

.schedule-summary-grid {
  margin-bottom: 18px;
}

.schedule-flow {
  display: block;
  max-width: 460px;
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
}

.status--upcoming {
  background: #eef4ff;
  color: #274690;
}

.status--upcoming .dot {
  background: #4776d0;
}

.password-set-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f0f4ff;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
}

.schedule-dialog {
  width: min(860px, calc(100% - 28px));
}

.schedule-assignment-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}

.schedule-assignment-head strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.schedule-assignment-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.schedule-scope-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.schedule-scope-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 92px;
  padding: 13px;
  border: 1px solid #dfe3ee;
  border-radius: 12px;
  background: white;
  cursor: pointer;
}

.schedule-scope-option:has(input:checked) {
  border-color: #aebbe9;
  box-shadow: 0 0 0 2px rgba(22, 35, 94, .06);
  background: #f7f8fe;
}

.schedule-scope-option input {
  margin-top: 3px;
}

.schedule-scope-option strong,
.schedule-active-toggle strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.schedule-scope-option small,
.schedule-active-toggle small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.schedule-refresh-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8f2;
  color: #7a452a;
  font-size: 11px;
  line-height: 1.45;
}

.student-picker {
  margin-top: 14px;
  border: 1px solid #dfe3ee;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.student-picker__toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #f8f9fc;
}

.student-picker__toolbar input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #d8dce6;
  border-radius: 8px;
  background: white;
}

.student-picker__summary {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.student-picker__list {
  max-height: 250px;
  overflow: auto;
}

.student-picker__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #f0f1f5;
  cursor: pointer;
}

.student-picker__item:last-child {
  border-bottom: 0;
}

.student-picker__item:hover {
  background: #fafbfe;
}

.student-picker__item input {
  margin-top: 3px;
}

.student-picker__item strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.student-picker__item small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.schedule-active-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  padding: 13px 14px;
  border: 1px solid #dfe3ee;
  border-radius: 12px;
  background: #f8fafc;
}

.schedule-active-toggle input {
  margin-top: 3px;
}

@media (max-width: 760px) {
  .schedule-scope-options {
    grid-template-columns: 1fr;
  }

  .student-picker__toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .student-picker__toolbar input {
    grid-column: 1 / -1;
  }
}


/* Student assigned mock tests */
.student-tests-card {
  margin-top: 18px;
}

.student-test-summary {
  margin-bottom: 18px;
}

.student-flow-summary {
  display: block;
  max-width: 520px;
  color: #475467;
  font-size: 12px;
  line-height: 1.5;
}


/* Student mock-test actions */
.student-attempt-btn {
  white-space: nowrap;
}
.student-action-note {
  display: inline-block;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}


/* Leaderboards */
.leaderboard-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.leaderboard-select-field {
  width: min(560px, 100%);
  margin: 0;
}

.leaderboard-select-field select {
  width: 100%;
}

.leaderboard-rule {
  max-width: 560px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.leaderboard-rule strong {
  color: var(--ink);
}

.leaderboard-summary-grid {
  margin-bottom: 18px;
}

.leaderboard-rank {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.leaderboard-current-row td {
  background: #fff8f3;
}

.leaderboard-current-row td:first-child {
  box-shadow: inset 4px 0 0 var(--accent);
}

.student-rank-cards {
  margin-bottom: 18px;
}

.leaderboard-rank-card {
  position: relative;
  overflow: hidden;
}

.leaderboard-rank-card::after {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  right: -28px;
  top: -30px;
  border-radius: 50%;
  background: rgba(255, 95, 31, .08);
}

.leaderboard-rank-card > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.leaderboard-rank-card > strong {
  display: block;
  margin-top: 7px;
  color: var(--brand);
  font-size: 42px;
  line-height: 1;
}

.leaderboard-rank-card > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
}

.leaderboard-table-gap {
  margin-top: 18px;
}

/* Platform admin · All Maharashtra Test Series */
.series-library-scroll {
  max-height: 390px;
  overflow: auto;
}
.series-library-scroll thead th,
.test-series-leaderboard-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}
.test-series-leaderboard-toolbar {
  align-items: end;
  justify-content: flex-start;
  flex-wrap: wrap;
}
.test-series-leaderboard-toolbar .leaderboard-select-field {
  flex: 1 1 360px;
  width: auto;
}
.test-series-mode-switch {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding-bottom: 1px;
}
.test-series-mode-switch .btn[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.test-series-leaderboard-search {
  flex: 1 1 280px;
  max-width: 390px;
  margin: 0;
}
.test-series-leaderboard-scroll {
  max-height: 520px;
  overflow: auto;
}
.test-series-leaderboard-scroll td,
.test-series-leaderboard-scroll th {
  white-space: nowrap;
}
.test-series-leaderboard-scroll td:nth-child(2),
.test-series-leaderboard-scroll th:nth-child(2) {
  white-space: normal;
  min-width: 230px;
}
.test-series-student-email {
  display: inline-block;
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

@media (max-width: 820px) {
  .test-series-leaderboard-toolbar {
    align-items: stretch;
  }
  .test-series-leaderboard-toolbar .leaderboard-select-field,
  .test-series-leaderboard-search {
    flex-basis: 100%;
    max-width: none;
  }
}

@media (max-width: 820px) {
  .leaderboard-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .leaderboard-rule {
    max-width: none;
    text-align: left;
  }
}


/* Compact score breakdowns for multi-mode mock tests */
.score-breakdown {
  min-width: 132px;
}

.score-breakdown > strong {
  display: block;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.score-breakdown > strong > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.score-breakdown > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  white-space: normal;
}

.score-breakdown--single {
  min-width: 104px;
}


/* Institute Word passage PDF */
.mock-library-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.word-pdf-download {
  white-space: nowrap;
}

.word-pdf-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 13px 15px;
  border: 1px solid #dfe4f2;
  border-radius: 14px;
  background: #fbfcff;
}

.word-pdf-note__mark {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
}

.word-pdf-note strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
}

.word-pdf-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}


/* Student dashboard · active All Maharashtra Test Series */
.dashboard-series-live {
  margin-top: 18px;
}
.dashboard-series-live[hidden] {
  display: none !important;
}
.dashboard-series-live__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.dashboard-series-live__head .eyebrow {
  margin-bottom: 4px;
}
.dashboard-series-live__head h2 {
  margin: 0;
  color: var(--brand);
  font-size: 20px;
  letter-spacing: -.02em;
}
.dashboard-series-live__head p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-series-live__card {
  overflow: hidden;
  border: 1px solid rgba(255,95,31,.30);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(22,35,94,.06);
}
.dashboard-series-live__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #f1e7e2;
  background:
    radial-gradient(circle at 93% 12%, rgba(255,95,31,.10), transparent 31%),
    linear-gradient(135deg, #fff 0%, #fffaf7 100%);
}
.dashboard-series-live__badges {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.dashboard-series-live__top h3 {
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: 21px;
}
.dashboard-series-live__top p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-series-live__today {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .09em;
}
.dashboard-series-mode-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.dashboard-series-mode {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
}
.dashboard-series-mode + .dashboard-series-mode {
  border-left: 1px solid #eef0f4;
}
.dashboard-series-mode__copy strong {
  display: block;
  color: var(--brand);
  font-size: 14px;
}
.dashboard-series-mode__copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.dashboard-series-mode__result {
  display: inline-flex;
  margin-top: 7px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 750;
}
.dashboard-series-mode__result.pass {
  background: #eaf8f1;
  color: var(--success);
}
.dashboard-series-mode__result.fail {
  background: #fff0ee;
  color: var(--danger);
}
.dashboard-series-mode__action .btn {
  white-space: nowrap;
}
@media (max-width: 900px) {
  .dashboard-series-mode-list {
    grid-template-columns: 1fr;
  }
  .dashboard-series-mode + .dashboard-series-mode {
    border-left: 0;
    border-top: 1px solid #eef0f4;
  }
}
@media (max-width: 620px) {
  .dashboard-series-live__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-series-live__head .btn {
    width: 100%;
  }
  .dashboard-series-live__top {
    flex-direction: column;
  }
  .dashboard-series-live__today {
    order: -1;
  }
  .dashboard-series-mode {
    grid-template-columns: 1fr;
  }
  .dashboard-series-mode__action .btn,
  .dashboard-series-mode__action .row-actions {
    width: 100%;
  }
  .dashboard-series-mode__action .btn {
    justify-content: center;
  }
}

/* Student self-service, institute membership and Global Test Series */
.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  font-size: 13px;
}
.auth-links a { color: var(--brand); font-weight: 750; }
.auth-success { background: #eaf8f1 !important; color: var(--success) !important; }
.page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.existing-student-match { display: grid; gap: 14px; margin-top: 18px; }
.existing-student-match .card p { margin-top: 7px; }
.notification-list { display: grid; }
.notification-item {
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.notification-item:last-child { border-bottom: 0; }
.notification-item--unread { background: #fffaf7; }
.notification-item strong { display: block; color: var(--brand); }
.notification-item p { margin: 5px 0; color: var(--ink); }
.notification-item small { color: var(--muted); }
.test-series-layout {
  display: grid;
  grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr);
  gap: 18px;
  align-items: stretch;
}
.test-series-list-column {
  min-width: 0;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 16px;
  overflow: hidden;
}
.test-series-leaderboard-card {
  position: static;
  min-width: 0;
  overflow: hidden;
  max-height: none;
  display: flex;
  flex-direction: column;
}
.test-series-leaderboard-controls {
  flex: 0 0 auto;
  padding: 16px 18px;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.test-series-my-rank {
  flex: 0 0 auto;
  padding: 12px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #fffaf7;
  box-shadow: 0 5px 14px rgba(16,24,40,.035);
}
.test-series-my-rank__label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.test-series-my-rank__empty {
  padding: 10px 12px;
  border: 1px dashed #d9dee8;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.test-series-my-rank__grid {
  display: grid;
  grid-template-columns: .72fr 1.55fr .8fr .9fr 1fr;
  gap: 8px;
}
.test-series-my-rank__grid[hidden] { display: none !important; }
.test-series-my-rank__grid > div {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #f0d6ca;
  border-radius: 10px;
  background: #fff;
}
.test-series-my-rank__grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.test-series-my-rank__grid strong {
  display: block;
  min-width: 0;
  color: var(--brand);
  font-size: 13px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.test-series-my-rank__grid [data-test-series-my-rank-rank] {
  color: var(--accent);
  font-size: 17px;
}
.test-series-my-rank__grid [data-test-series-my-rank-result] .status {
  white-space: nowrap;
}
.test-series-list-tools {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
.test-series-list-tools small { color: var(--muted); }
.test-series-search-field input { width: 100%; }
.test-series-tests-scroll {
  min-height: 0;
  height: auto;
  max-height: none;
  align-self: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 6px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.test-series-leaderboard-scroll {
  flex: 0 0 auto;
  height: 660px;
  min-height: 660px;
  max-height: 660px;
  overflow: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.test-series-leaderboard-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f8f9fc;
}
.test-series-mode-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.test-series-access-badge {
  border-radius: 999px;
  background: #fff4e6;
  color: #9a5a00;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 850;
}
.test-series-access-badge--paid { background: #eaf8f1; color: var(--success); }
.test-series-card { padding: 0; overflow: hidden; }
.test-series-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: #fbfbfd;
  border-bottom: 1px solid var(--line);
}
.test-series-card__head h2 { margin: 9px 0 4px; font-size: 20px; }
.test-series-card__head p { margin: 0; color: var(--muted); font-size: 13px; }
.test-series-card__status { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.series-mode-list { display: grid; }
.series-mode-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid #eef0f4;
}
.series-mode-row:last-child { border-bottom: 0; }
.series-mode-copy strong { display: block; }
.series-mode-copy small { display: block; margin-top: 4px; color: var(--muted); }
.series-attempt-results { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.series-attempt-result {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f1f3f6;
  font-size: 11px;
  font-weight: 700;
}
.series-attempt-result.pass { background: #eaf8f1; color: var(--success); }
.series-attempt-result.fail { background: #fff0ee; color: var(--danger); }
.test-series-leaderboard-table { width: 100%; min-width: 560px; table-layout: fixed; }
.test-series-leaderboard-table th:nth-child(1),
.test-series-leaderboard-table td:nth-child(1) { width: 12%; }
.test-series-leaderboard-table th:nth-child(2),
.test-series-leaderboard-table td:nth-child(2) { width: 34%; }
.test-series-leaderboard-table th:nth-child(3),
.test-series-leaderboard-table td:nth-child(3) { width: 16%; }
.test-series-leaderboard-table th:nth-child(4),
.test-series-leaderboard-table td:nth-child(4) { width: 20%; }
.test-series-leaderboard-table th:nth-child(5),
.test-series-leaderboard-table td:nth-child(5) { width: 18%; }
.test-series-leaderboard-table td {
  padding: 10px 14px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.35;
}
.test-series-leaderboard-table th {
  padding: 11px 14px;
}

@media (max-width: 1050px) {
  .test-series-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .test-series-list-column {
    height: auto;
    grid-template-rows: auto auto auto;
  }
  .test-series-leaderboard-card {
    position: static;
    max-height: none;
  }
  .test-series-tests-scroll {
    height: auto;
    max-height: 58vh;
  }
  .test-series-leaderboard-scroll {
    height: 660px;
    min-height: 660px;
    max-height: 660px;
  }
  .test-series-my-rank__grid {
    grid-template-columns: repeat(5, minmax(105px, 1fr));
    overflow-x: auto;
    padding-bottom: 2px;
  }
}
@media (max-width: 620px) {
  .test-series-leaderboard-scroll {
    height: 580px;
    min-height: 580px;
    max-height: 580px;
  }
  .auth-links { flex-direction: column; }
  .page-head__actions { width: 100%; justify-content: stretch; }
  .page-head__actions .btn { flex: 1; }
  .notification-item { flex-direction: column; }
  .test-series-card__head { flex-direction: column; }
  .test-series-card__status { justify-content: flex-start; }
  .series-mode-row { grid-template-columns: 1fr; }
}


/* Public marketing pages */
.marketing-topbar .topbar__inner { min-height: 76px; }
.home-hero { padding: 82px 0 78px; }
.home-hero .hero__grid { grid-template-columns: 1.12fr .88fr; }
.hero__microcopy {
  margin-top: 16px !important;
  color: #bcc7ee !important;
  font-size: 13px !important;
}
.home-proof-panel {
  display: grid;
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.home-proof-panel .hero__panel-logo {
  width: 174px;
  margin: 24px 24px 16px;
}
.proof-stat {
  padding: 18px 24px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.proof-stat strong {
  margin: 0 0 3px;
  font-size: 25px;
}
.proof-stat span {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}
.home-history-strip { padding-top: 30px; padding-bottom: 30px; }
.history-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 10px 30px rgba(22,35,94,.05);
}
.history-strip > div:not(.history-strip__arrow) { display: grid; gap: 2px; }
.history-strip__label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.history-strip strong { color: var(--brand); font-size: 20px; }
.history-strip small { color: var(--muted); }
.history-strip__arrow {
  color: var(--accent);
  font-size: 30px;
  font-weight: 900;
}
.marketing-section-head { max-width: 820px; }
.marketing-section-head p:last-child { max-width: 760px; }
.marketing-eyebrow { color: var(--accent); }
.feature-card { min-height: 190px; }
.section--brand-soft {
  background:
    radial-gradient(circle at 82% 12%, rgba(255,95,31,.07), transparent 27%),
    #eef1fb;
}
.split-story {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: 50px;
}
.split-story h2 { margin: 0 0 15px; font-size: clamp(30px,4vw,44px); color: var(--brand); letter-spacing: -.035em; }
.split-story p { color: #596579; font-size: 16px; line-height: 1.75; }
.text-link { display: inline-flex; margin-top: 10px; color: var(--brand); font-weight: 800; }
.text-link:hover { color: var(--accent); }
.impact-grid { align-content: center; }
.impact-card { min-height: 135px; display: grid; align-content: center; }
.impact-card strong { color: var(--brand); font-size: 27px; line-height: 1.1; }
.impact-card span { margin-top: 8px; color: var(--muted); font-size: 13px; }
.marketing-cta-inline {
  margin-top: 24px;
  padding: 21px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid #dce1ef;
  border-radius: 16px;
  background: #f8f9fc;
}
.marketing-cta-inline strong { display: block; color: var(--brand); font-size: 17px; }
.marketing-cta-inline span { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; }
.home-final-cta { padding-top: 28px; }
.final-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 40px 44px;
  border-radius: 22px;
  background: linear-gradient(135deg,#101b4d,#1c2c76);
  color: white;
  box-shadow: var(--shadow);
}
.final-cta h2 { margin: 0; max-width: 760px; font-size: clamp(28px,4vw,42px); letter-spacing: -.03em; }
.final-cta p:not(.eyebrow) { max-width: 720px; margin: 10px 0 0; color: #dfe4ff; }

.about-hero {
  padding: 78px 0 70px;
  background:
    radial-gradient(circle at 86% 20%, rgba(255,95,31,.12), transparent 23%),
    linear-gradient(135deg,#111c54,#1d2d75);
  color: white;
}
.about-hero__inner { max-width: 940px; }
.about-hero h1 { margin: 0; font-size: clamp(40px,6vw,66px); line-height: 1.02; letter-spacing: -.045em; }
.about-hero p:not(.eyebrow) { max-width: 880px; margin: 22px 0 0; color: #dfe4ff; font-size: 19px; line-height: 1.7; }
.about-impact-section { padding-top: 0; padding-bottom: 0; transform: translateY(-24px); position: relative; z-index: 2; }
.impact-band {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 16px 36px rgba(16,27,77,.09);
}
.impact-band > div { padding: 24px; border-right: 1px solid var(--line); }
.impact-band > div:last-child { border-right: 0; }
.impact-band strong { display: block; color: var(--brand); font-size: 24px; }
.impact-band span { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; }
.about-story-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 70px;
  align-items: start;
}
.about-story-index { position: sticky; top: 105px; }
.about-story-index span { color: var(--accent); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.about-story-index strong { display: block; margin-top: 10px; color: var(--brand); font-size: 24px; line-height: 1.3; }
.about-story-copy { display: grid; gap: 0; }
.story-chapter { padding: 0 0 42px 34px; border-left: 2px solid #dfe3ee; position: relative; }
.story-chapter::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px #fff2ec;
}
.story-chapter:last-child { padding-bottom: 0; }
.story-year { color: var(--accent); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.story-chapter h2 { margin: 6px 0 12px; color: var(--brand); font-size: 28px; }
.story-chapter p { margin: 0 0 12px; color: #596579; font-size: 16px; line-height: 1.75; }
.rename-section { background: #101b4d; color: white; }
.rename-card__intro { max-width: 820px; }
.rename-card__intro h2 { margin: 0; font-size: clamp(32px,4.5vw,48px); letter-spacing: -.035em; }
.rename-card__intro > p:last-child { color: #c9d1ef; font-size: 17px; }
.rename-reasons { margin-top: 34px; }
.rename-reasons article {
  padding: 24px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}
.rename-reasons article > span { color: #ffb08d; font-size: 12px; font-weight: 850; }
.rename-reasons h3 { margin: 8px 0 8px; font-size: 20px; }
.rename-reasons p { margin: 0; color: #cbd3ef; line-height: 1.65; }
.rename-message {
  margin-top: 30px;
  padding: 24px 26px;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  background: rgba(255,95,31,.10);
}
.rename-message strong { font-size: 20px; }
.rename-message p { margin: 7px 0 0; color: #dfe4ff; line-height: 1.7; }

@media (max-width: 980px) {
  .home-hero .hero__grid,
  .split-story,
  .about-story-layout { grid-template-columns: 1fr; }
  .history-strip { grid-template-columns: 1fr auto 1fr; }
  .history-strip .btn { grid-column: 1 / -1; justify-self: start; }
  .impact-band { grid-template-columns: repeat(2,1fr); }
  .impact-band > div:nth-child(2) { border-right: 0; }
  .impact-band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .about-story-index { position: static; max-width: 600px; }
}
@media (max-width: 700px) {
  .home-hero { padding: 58px 0; }
  .home-proof-panel { display: grid; }
  .history-strip { grid-template-columns: 1fr; }
  .history-strip__arrow { transform: rotate(90deg); width: fit-content; }
  .marketing-cta-inline,
  .final-cta { flex-direction: column; align-items: flex-start; }
  .final-cta { padding: 30px 24px; }
  .impact-band { grid-template-columns: 1fr; }
  .impact-band > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .impact-band > div:last-child { border-bottom: 0; }
  .about-hero { padding: 58px 0 52px; }
  .about-hero p:not(.eyebrow) { font-size: 17px; }
  .story-chapter { padding-left: 26px; }
}


/* Public platform promise / mission */
.platform-promise-section {
  background: #fff;
}
.platform-promise-grid,
.mission-grid {
  align-items: stretch;
}
.promise-card,
.mission-card {
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(16,27,77,.045);
}
.promise-card > span,
.mission-card > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.promise-card h3,
.mission-card h3 {
  margin: 18px 0 9px;
  color: var(--brand);
  font-size: 20px;
  line-height: 1.3;
}
.promise-card p,
.mission-card p {
  margin: 0;
  color: #657086;
  line-height: 1.7;
}
.about-mission-section {
  background:
    radial-gradient(circle at 10% 15%, rgba(255,95,31,.055), transparent 24%),
    #fff;
}

@media (max-width: 980px) {
  .platform-promise-grid,
  .mission-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 700px) {
  .platform-promise-grid,
  .mission-grid { grid-template-columns: 1fr; }
  .promise-card,
  .mission-card { min-height: 0; }
}


/* Public contact, privacy and development partners */
.development-partners-section {
  padding-top: 34px;
  background:
    radial-gradient(circle at 86% 14%, rgba(255,95,31,.065), transparent 26%),
    #fff;
}
.development-partners-head {
  max-width: 900px;
}
.development-partner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.development-partner-card {
  min-height: 270px;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid #dde2ed;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff 0%, #fbfcff 100%);
  box-shadow: 0 12px 34px rgba(16,27,77,.055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.development-partner-card:hover {
  transform: translateY(-3px);
  border-color: #cfd6e7;
  box-shadow: 0 18px 42px rgba(16,27,77,.09);
}
.development-partner-logo {
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #f6f8fc;
  overflow: hidden;
}
.development-partner-logo img {
  max-width: 88%;
  max-height: 132px;
  object-fit: contain;
}
.development-partner-logo--webtouter {
  background: linear-gradient(145deg, #fff7f2, #f7f8fb);
}
.development-partner-logo--webtouter img {
  width: 122px;
}
.development-partner-logo--mahesh img {
  width: 138px;
}
.development-partner-role,
.contact-partner-role {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.development-partner-card h3 {
  margin: 0;
  color: var(--brand);
  font-size: 25px;
}
.development-partner-card p {
  margin: 9px 0 14px;
  color: var(--muted);
  line-height: 1.65;
}
.development-partner-card strong {
  color: var(--brand);
  font-size: 13px;
}
.development-partner-card:hover strong {
  color: var(--accent);
}

.public-page-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 68px;
  background:
    radial-gradient(circle at 86% 16%, rgba(255,95,31,.14), transparent 24%),
    linear-gradient(135deg, #111c54, #1d2d75);
  color: #fff;
}
.public-page-hero::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 50%;
}
.public-page-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}
.public-page-hero h1 {
  margin: 0;
  max-width: 840px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.03;
  letter-spacing: -.045em;
}
.public-page-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 20px 0 0;
  color: #dfe4ff;
  font-size: 18px;
  line-height: 1.7;
}

.contact-section {
  background:
    linear-gradient(180deg, #f7f8fb 0%, #fff 38%, #fff 100%);
}
.contact-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 22px;
}
.contact-partner-card {
  padding: 28px;
  border: 1px solid #dfe3ed;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16,27,77,.06);
}
.contact-partner-card__top {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 110px;
}
.contact-logo {
  width: 106px;
  height: 106px;
  flex: 0 0 106px;
  display: grid;
  place-items: center;
  border: 1px solid #e8ebf2;
  border-radius: 18px;
  background: #f8f9fc;
}
.contact-logo img {
  max-width: 88px;
  max-height: 88px;
  object-fit: contain;
}
.contact-logo--webtouter {
  background: #fff8f4;
}
.contact-logo--webtouter img {
  max-width: 74px;
}
.contact-partner-card h2 {
  margin: 0;
  color: var(--brand);
  font-size: 27px;
  letter-spacing: -.025em;
}
.contact-partner-copy {
  margin: 18px 0 4px;
  color: var(--muted);
  line-height: 1.65;
}
.contact-details {
  margin: 22px 0 0;
}
.contact-details > div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.contact-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.contact-details dd {
  margin: 0;
  color: #374151;
  font-weight: 650;
  line-height: 1.55;
}
.contact-details a {
  color: var(--brand);
}
.contact-details a:hover {
  color: var(--accent);
}
.contact-guidance {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  overflow: hidden;
  border: 1px solid #dce1ee;
  border-radius: 18px;
  background: #eef1fb;
}
.contact-guidance > div {
  padding: 21px 24px;
}
.contact-guidance > div + div {
  border-left: 1px solid #d5dbea;
}
.contact-guidance span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.contact-guidance strong {
  display: block;
  margin-top: 5px;
  color: var(--brand);
  font-size: 16px;
}

.policy-updated {
  display: inline-flex;
  margin-top: 22px;
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #dfe4ff;
  font-size: 12px;
  font-weight: 750;
}
.privacy-section {
  background: #fff;
}
.privacy-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.privacy-index {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 3px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8f9fc;
}
.privacy-index > span {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.privacy-index a {
  padding: 8px 9px;
  border-radius: 8px;
  color: #4b5565;
  font-size: 12px;
  font-weight: 700;
}
.privacy-index a:hover {
  background: #fff;
  color: var(--brand);
}
.privacy-content {
  max-width: 820px;
}
.policy-section {
  scroll-margin-top: 106px;
  padding: 0 0 31px;
  margin-bottom: 31px;
  border-bottom: 1px solid var(--line);
}
.policy-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}
.policy-section h2 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 24px;
  letter-spacing: -.02em;
}
.policy-section p {
  margin: 0 0 12px;
  color: #566174;
  line-height: 1.78;
}
.policy-section ul {
  margin: 12px 0;
  padding-left: 22px;
  color: #566174;
}
.policy-section li {
  margin: 8px 0;
  line-height: 1.65;
}
.policy-contact {
  padding: 25px;
  border: 1px solid #dbe1ef;
  border-radius: 18px;
  background: #f7f9fd;
}
.policy-contact .btn {
  margin-top: 7px;
}

.footer--marketing {
  padding: 44px 0 22px;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) repeat(3, minmax(130px, .65fr));
  gap: 34px;
  align-items: start;
}
.footer__identity p {
  max-width: 420px;
  margin: 16px 0 0;
  color: #aeb9dc;
  font-size: 13px;
  line-height: 1.65;
}
.footer__group {
  display: grid;
  align-content: start;
  gap: 9px;
}
.footer__group strong {
  margin-bottom: 3px;
  color: #fff;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.footer__group a {
  color: #c7cee9;
}
.footer__group a:hover,
.footer__bottom a:hover {
  color: #fff;
}
.footer__bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: #aeb9dc;
  font-size: 12px;
}
.footer__bottom a {
  color: #dfe4ff;
  font-weight: 750;
}

@media (max-width: 980px) {
  .development-partner-grid,
  .contact-card-grid {
    grid-template-columns: 1fr;
  }
  .privacy-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .privacy-index {
    position: static;
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .privacy-index > span {
    grid-column: 1 / -1;
  }
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .footer__group:last-child {
    grid-column: 2 / 3;
  }
}
@media (max-width: 700px) {
  .development-partner-card {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .development-partner-logo {
    width: 100%;
    height: 126px;
  }
  .public-page-hero {
    padding: 58px 0 52px;
  }
  .public-page-hero p:not(.eyebrow) {
    font-size: 16px;
  }
  .contact-partner-card {
    padding: 22px;
  }
  .contact-partner-card__top {
    align-items: flex-start;
  }
  .contact-logo {
    width: 86px;
    height: 86px;
    flex-basis: 86px;
  }
  .contact-logo img {
    max-width: 72px;
    max-height: 72px;
  }
  .contact-logo--webtouter img {
    max-width: 60px;
  }
  .contact-details > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .contact-guidance {
    grid-template-columns: 1fr;
  }
  .contact-guidance > div + div {
    border-left: 0;
    border-top: 1px solid #d5dbea;
  }
  .privacy-index {
    grid-template-columns: 1fr;
  }
  .privacy-index > span {
    grid-column: auto;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__identity {
    grid-column: 1 / -1;
  }
  .footer__group:last-child {
    grid-column: auto;
  }
  .footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 480px) {
  .contact-partner-card__top {
    flex-direction: column;
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .footer__identity,
  .footer__group:last-child {
    grid-column: auto;
  }
}


/* Razorpay payments */
.test-series-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.payment-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-cta[hidden],
.paid-access-confirmation[hidden] {
  display: none !important;
}
.payment-cta small {
  color: var(--muted);
}
.paid-access-confirmation {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eaf8f1;
  color: var(--success);
  font-size: 13px;
}
.paid-access-confirmation strong {
  color: var(--success);
}
.paid-access-confirmation span {
  color: #417660;
}
.payment-section-head {
  margin-bottom: 14px;
}
.payment-pack-heading {
  margin-top: 22px;
}
.custom-credit-card {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(0, 2fr);
  gap: 28px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(255, 95, 31, .25);
  background:
    radial-gradient(circle at 8% 15%, rgba(255, 95, 31, .09), transparent 32%),
    #fff;
}
.custom-credit-card__intro h3 {
  margin: 10px 0 7px;
  color: var(--brand);
  font-size: 22px;
  letter-spacing: -.02em;
}
.custom-credit-card__intro p {
  max-width: 360px;
}
.custom-credit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .02em;
}
.custom-credit-card__controls {
  display: grid;
  grid-template-columns: minmax(145px, .7fr) minmax(330px, 1.5fr) auto;
  gap: 18px;
  align-items: end;
}
.custom-credit-input {
  display: grid;
  gap: 7px;
  color: #39435a;
  font-size: 12px;
  font-weight: 800;
}
.custom-credit-input input {
  width: 100%;
  min-height: 52px;
  border: 2px solid #dfe4ef;
  border-radius: 12px;
  padding: 10px 14px;
  background: #fff;
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  outline: 0;
}
.custom-credit-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255,95,31,.10);
}
.custom-credit-input small {
  color: var(--muted);
  font-weight: 600;
}
.custom-credit-summary {
  display: grid;
  grid-template-columns: 1fr 1.25fr .9fr;
  gap: 10px;
}
.custom-credit-summary > div {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfe;
}
.custom-credit-summary span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.custom-credit-summary strong {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
}
.custom-credit-summary .custom-credit-total strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}
.custom-credit-buy {
  min-width: 150px;
  min-height: 52px;
  white-space: nowrap;
}
.payment-pack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.payment-pack-card {
  display: flex;
  min-height: 250px;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  padding: 22px;
}
.payment-pack-card__content {
  display: grid;
  gap: 12px;
}
.payment-pack-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.payment-pack-credits {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.payment-pack-credits strong {
  color: var(--brand);
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 900;
  line-height: .95;
  letter-spacing: -.05em;
}
.payment-pack-credits span {
  color: var(--brand);
  font-size: 15px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.payment-pack-rate {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--brand-soft);
}
.payment-pack-rate strong {
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -.03em;
}
.payment-pack-rate span {
  color: #4f5870;
  font-size: 12px;
  font-weight: 750;
}
.payment-pack-total {
  color: var(--muted);
  font-size: 12px;
}
.payment-pack-total strong {
  color: #4e576b;
  font-size: 13px;
  font-weight: 750;
}
.payment-pack-card .btn {
  width: 100%;
}
.payment-metrics-grid--secondary {
  margin-top: 14px;
}
.payment-config-callout {
  margin: 18px 0;
}
@media (max-width: 1100px) {
  .custom-credit-card {
    grid-template-columns: 1fr;
  }
  .custom-credit-card__intro p {
    max-width: none;
  }
  .payment-pack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .custom-credit-card__controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .custom-credit-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .custom-credit-buy {
    width: 100%;
  }
}
@media (max-width: 680px) {
  .payment-pack-grid { grid-template-columns: 1fr; }
  .custom-credit-summary {
    grid-template-columns: 1fr;
  }
  .test-series-plan-card { align-items: flex-start; }
  .payment-cta { width: 100%; }
  .payment-cta .btn { width: 100%; }
}


/* Free student lessons */
.lesson-summary-grid { margin-bottom: 14px; }
.lesson-metric--pass { color: var(--success); }
.lesson-metric--fail { color: var(--danger); }
.lesson-metric--unattempted { color: #111827; }

.lesson-status-guide {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.lesson-status-guide span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.lesson-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111827;
}
.lesson-status-dot--failed { background: var(--danger); }
.lesson-status-dot--passed { background: var(--success); }

.lesson-toolbar { margin-bottom: 16px; }
.lesson-library-card { min-height: 420px; }
.lesson-grid-scroll {
  max-height: 62vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.lesson-grid-empty {
  grid-column: 1 / -1;
  padding: 42px 18px;
  text-align: center;
  color: var(--muted);
}
.lesson-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 16px;
  border: 2px solid #111827;
  border-radius: 14px;
  background: white;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.lesson-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(16,24,40,.08);
}
.lesson-tile--failed {
  border-color: var(--danger);
  color: #8f1f1f;
  background: #fff8f7;
}
.lesson-tile--passed {
  border-color: var(--success);
  color: #076a40;
  background: #f5fcf8;
}
.lesson-tile__number {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.lesson-tile strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.35;
}
.lesson-tile small {
  margin-top: auto;
  color: var(--muted);
  line-height: 1.35;
}
.lesson-tile__status {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 850;
}
.lesson-tile--failed .lesson-tile__status { color: var(--danger); }
.lesson-tile--passed .lesson-tile__status { color: var(--success); }

body.lesson-practice-active {
  overflow: hidden;
}

.lesson-practice-takeover[hidden] {
  display: none !important;
}

.lesson-practice-takeover {
  --lesson-practice-font-size: 19px;
  position: fixed;
  inset: 0;
  z-index: 900;
  display: grid;
  grid-template-rows: 66px auto minmax(0, 1fr) 56px;
  gap: 9px;
  padding: 0 12px 10px;
  overflow: hidden;
  background: #eef3f7;
}

.lesson-practice-topbar {
  margin: 0 -12px;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: white;
  border-top: 3px solid #ff5a1f;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
}

.lesson-practice-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.lesson-practice-brand img {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
}

.lesson-practice-brand > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.lesson-practice-brand span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.lesson-practice-brand strong {
  max-width: min(760px, 58vw);
  overflow: hidden;
  color: var(--brand);
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-practice-top-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
}

.lesson-elapsed-card {
  min-width: 112px;
  display: grid;
  gap: 0;
  padding: 6px 11px;
  border: 1px solid #d4dee6;
  border-radius: 9px;
  background: white;
}

.lesson-elapsed-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.lesson-elapsed-card strong {
  color: var(--brand);
  font-size: 21px;
  line-height: 1.05;
}

.lesson-practice-info {
  min-height: 48px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d9e2ea;
  border-radius: 9px;
  background: white;
}

.lesson-practice-info__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.lesson-practice-hint {
  margin: 0;
  overflow: hidden;
  color: #445b6d;
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-practice-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.lesson-practice-meta .code-chip {
  padding: 3px 7px;
  font-size: 10px;
}

.lesson-practice-mode-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #cbd8e2;
  border-radius: 999px;
  background: #f7f9fb;
  color: #34556d;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.lesson-practice-workspace {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lesson-typing-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ccd9e2;
  border-radius: 10px;
  background: white;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .05);
}

.lesson-panel-title {
  min-height: 46px;
  padding: 7px 9px 7px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #d6e0e8;
  background: #e8eef3;
  color: #314f66;
  font-size: 12px;
  font-weight: 850;
}

.lesson-panel-title__tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.lesson-panel-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.lesson-font-controls button {
  width: 31px;
  min-width: 31px;
  height: 29px;
  padding: 0;
  border: 1px solid #a9b7c4;
  border-radius: 6px;
  background: white;
  color: #19334a;
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
}

.lesson-font-controls button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.lesson-font-controls span {
  min-width: 43px;
  color: #17344e;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.lesson-question-box,
.lesson-answer-box {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 22px;
  font-family: Arial, sans-serif !important;
  font-size: var(--lesson-practice-font-size) !important;
  line-height: 1.58 !important;
  tab-size: 8;
  -moz-tab-size: 8;
  color: #111827;
}

.lesson-question-box {
  overflow: auto;
  white-space: pre-wrap;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}

.lesson-answer-box {
  overflow-y: auto;
  border: 0;
  resize: none;
  outline: none;
  background: white;
  scrollbar-gutter: stable;
}

.lesson-answer-box:focus {
  box-shadow: none;
}

.lesson-char {
  color: #111827;
  background: transparent;
  font-weight: 400;
}

.lesson-char--correct {
  color: #14834f;
  background: #eaf8f1;
}

.lesson-char--wrong {
  color: #b42318;
  background: #fff0ee;
}

.lesson-char--current {
  color: #111827;
  background: #fff0c2;
  box-shadow: inset 0 -2px 0 #d79a00;
}

.lesson-practice-footer {
  min-height: 56px;
  height: 56px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d6e0e8;
  border-radius: 9px;
  background: white;
  overflow: hidden;
}

.lesson-practice-footer [data-lesson-typing-status] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-practice-footer [data-submit-lesson] {
  min-width: 150px;
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .lesson-practice-brand strong {
    max-width: 44vw;
  }

  .lesson-panel-title small {
    display: none;
  }
}

@media (max-width: 760px) {
  body.lesson-practice-active {
    overflow: auto;
  }

  .lesson-practice-takeover {
    position: fixed;
    overflow-y: auto;
    grid-template-rows: auto auto auto auto;
    padding-bottom: 8px;
  }

  .lesson-practice-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .lesson-practice-brand strong {
    max-width: 86vw;
    white-space: normal;
  }

  .lesson-practice-top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .lesson-elapsed-card {
    flex: 1;
  }

  .lesson-practice-info {
    align-items: flex-start;
    flex-direction: column;
  }

  .lesson-practice-hint {
    white-space: normal;
  }

  .lesson-practice-workspace {
    height: auto;
    grid-template-columns: 1fr;
  }

  .lesson-typing-panel {
    height: 420px;
  }

  .lesson-practice-footer {
    position: sticky;
    bottom: 6px;
    height: auto;
    min-height: 56px;
    z-index: 2;
    box-shadow: 0 3px 18px rgba(17, 39, 59, .14);
  }
}

@media (max-width: 520px) {
  .lesson-practice-top-actions .btn {
    flex: 1 1 auto;
  }

  .lesson-panel-title__tools {
    gap: 4px;
  }

  .lesson-question-box,
  .lesson-answer-box {
    padding: 16px;
  }

  .lesson-practice-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .lesson-practice-footer [data-submit-lesson] {
    width: 100%;
  }
}

.lesson-result-card { width: 100%; }
.lesson-result-banner {
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .08em;
}
.lesson-result-banner--pass { background: #eaf8f1; color: var(--success); }
.lesson-result-banner--fail { background: #fff0ee; color: var(--danger); }
.lesson-result-metrics { margin-bottom: 14px; }
.lesson-result-metrics .card {
  display: grid;
  gap: 5px;
  padding: 15px;
}
.lesson-result-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.lesson-result-metrics strong {
  color: var(--brand);
  font-size: 20px;
}
.lesson-result-details .card { min-height: 125px; }
.lesson-result-details h3 { margin-bottom: 8px; }
.lesson-result-details p { line-height: 1.55; }
.lesson-result-actions { flex-wrap: wrap; }

@media (max-width: 1120px) {
  .lesson-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .lesson-grid { grid-template-columns: 1fr; }
  .lesson-grid-scroll { max-height: 58vh; padding: 12px; }
}


/* Free student passages */
.passage-summary-grid { margin-bottom: 14px; }
.passage-metric--pass { color: var(--success); }
.passage-metric--fail { color: var(--danger); }
.passage-metric--unattempted { color: #111827; }

.passage-status-guide {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.passage-status-guide span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.passage-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #111827;
}
.passage-status-dot--failed { background: var(--danger); }
.passage-status-dot--passed { background: var(--success); }
.passage-status-dot--locked { background: #9aa4b2; }

.passage-access-card { margin-bottom: 16px; }
.passage-toolbar { margin-bottom: 16px; }
.passage-library-card { min-height: 460px; }
.passage-grid-scroll {
  max-height: 64vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.passage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.passage-grid-empty {
  grid-column: 1 / -1;
  padding: 42px 18px;
  text-align: center;
  color: var(--muted);
}
.passage-tile {
  min-height: 185px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 16px;
  border: 2px solid #111827;
  border-radius: 14px;
  background: white;
  color: #111827;
  text-align: left;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.passage-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(16,24,40,.08);
}
.passage-tile--failed {
  border-color: var(--danger);
  color: #8f1f1f;
  background: #fff8f7;
}
.passage-tile--passed {
  border-color: var(--success);
  color: #076a40;
  background: #f5fcf8;
}
.passage-tile--locked {
  border-color: #cbd3df;
  background: #f5f7fa;
  color: #697386;
  cursor: pointer;
}
.passage-tile--locked:hover {
  transform: none;
  border-color: #adb8c7;
  box-shadow: 0 4px 14px rgba(16,24,40,.06);
}
.passage-tile--locked .passage-tile__status {
  color: #5d6878;
}
.passage-tile__number {
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.passage-tile strong {
  color: inherit;
  font-size: 14px;
  line-height: 1.35;
}
.passage-tile small {
  margin-top: auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.passage-tile__marks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 1px;
}
.passage-tile__mark {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 7px;
  border: 1px solid #dfe4ec;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #344054;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.passage-tile__mark b {
  color: var(--brand);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.passage-tile--failed .passage-tile__mark {
  border-color: #f1c7c2;
  background: #fff;
}
.passage-tile--passed .passage-tile__mark {
  border-color: #bfe5d2;
  background: #fff;
}
.passage-tile--locked .passage-tile__marks {
  display: none;
}
.passage-tile__status {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 850;
}
.passage-tile--failed .passage-tile__status { color: var(--danger); }
.passage-tile--passed .passage-tile__status { color: var(--success); }

.passage-start-card { max-width: 620px; }
.passage-start-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}
.passage-start-options fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.passage-start-options legend {
  padding: 0 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
}
.passage-start-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #354052;
  font-size: 13px;
  font-weight: 700;
}
.passage-start-options input { accent-color: var(--accent); }

body.passage-practice-active { overflow: hidden; }
.passage-practice-takeover[hidden] { display: none !important; }
.passage-practice-takeover {
  --passage-practice-font-size: 19px;
  position: fixed;
  inset: 0;
  z-index: 920;
  display: grid;
  grid-template-rows: 68px auto minmax(0, 1fr) 56px;
  gap: 9px;
  padding: 0 12px 10px;
  overflow: hidden;
  background: #eef3f7;
}

.passage-practice-topbar {
  margin: 0 -12px;
  padding: 7px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: white;
  border-top: 3px solid #ff5a1f;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(16,24,40,.05);
}
.passage-practice-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}
.passage-practice-brand img {
  width: auto;
  height: 34px;
  flex: 0 0 auto;
}
.passage-practice-brand > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.passage-practice-brand span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.passage-practice-brand strong {
  max-width: min(800px, 56vw);
  overflow: hidden;
  color: var(--brand);
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passage-practice-top-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
}
.passage-timer-card {
  min-width: 150px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0 8px;
  padding: 6px 11px;
  border: 1px solid #d4dee6;
  border-radius: 9px;
  background: white;
}
.passage-timer-card span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.passage-timer-card strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--brand);
  font-size: 21px;
  line-height: 1.05;
}
.passage-timer-card small {
  max-width: 100px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passage-practice-info {
  min-height: 50px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #d9e2ea;
  border-radius: 9px;
  background: white;
}
.passage-practice-info__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}
.passage-practice-hint {
  margin: 0;
  overflow: hidden;
  color: #445b6d;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passage-practice-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.passage-practice-meta .code-chip {
  padding: 3px 7px;
  font-size: 10px;
}
.passage-practice-mode-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid #cbd8e2;
  border-radius: 999px;
  background: #f7f9fb;
  color: #34556d;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.passage-practice-workspace {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  gap: 10px;
}
.passage-practice-workspace.passage-layout-vertical {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
}
.passage-practice-workspace.passage-layout-horizontal {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
}

.passage-typing-panel {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #ccd9e2;
  border-radius: 10px;
  background: white;
  box-shadow: 0 1px 3px rgba(16,24,40,.05);
}
.passage-panel-title {
  min-height: 46px;
  padding: 7px 9px 7px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #d6e0e8;
  background: #e8eef3;
  color: #314f66;
  font-size: 12px;
  font-weight: 850;
}
.passage-font-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}
.passage-font-controls button {
  width: 31px;
  min-width: 31px;
  height: 29px;
  padding: 0;
  border: 1px solid #a9b7c4;
  border-radius: 6px;
  background: white;
  color: #19334a;
  font: 700 13px Arial, sans-serif;
  cursor: pointer;
}
.passage-font-controls button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.passage-font-controls span {
  min-width: 43px;
  color: #17344e;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.passage-question-box,
.passage-answer-box {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 22px;
  font-family: Arial, sans-serif !important;
  font-size: var(--passage-practice-font-size) !important;
  line-height: 1.58 !important;
  tab-size: 8;
  -moz-tab-size: 8;
  color: #111827;
}
.passage-question-box {
  overflow: auto;
  white-space: pre-wrap;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  user-select: none;
}
.passage-answer-box {
  overflow-y: auto;
  border: 0;
  resize: none;
  outline: none;
  background: white;
  scrollbar-gutter: stable;
}
.passage-answer-box:focus { box-shadow: none; }

.passage-practice-footer {
  min-height: 56px;
  height: 56px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d6e0e8;
  border-radius: 9px;
  background: white;
  overflow: hidden;
}
.passage-practice-footer [data-passage-typing-status] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passage-practice-footer [data-submit-passage] {
  min-width: 150px;
  flex: 0 0 auto;
}

/* Passage results reuse the same detailed presentation as mock-test results. */
.passage-result-dialog {
  width: 100vw !important;
  max-width: none !important;
  height: 100vh !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0;
  border-radius: 0;
  background: #f5f7fb;
  overflow: hidden;
}
.passage-result-dialog::backdrop {
  background: #f5f7fb;
  backdrop-filter: none;
}
.passage-result-card {
  --mst-navy: var(--brand);
  --mst-navy-strong: var(--brand);
  --mst-success: var(--success);
  --mst-danger: var(--danger);
  width: 100% !important;
  max-width: none !important;
  height: 100vh;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0;
  padding: 26px clamp(18px, 3vw, 42px) 0;
  border: 0;
  border-radius: 0;
  background: #f5f7fb;
  box-shadow: none;
  scrollbar-gutter: stable;
}
.passage-result-card > .dialog-head,
.passage-result-card > .passage-result-banner,
.passage-result-card > .passage-full-result,
.passage-result-card > .passage-result-actions {
  width: min(1500px, 100%);
  margin-left: auto;
  margin-right: auto;
}
.passage-result-card > .dialog-head {
  margin-bottom: 18px;
}
.passage-result-card > .passage-result-actions {
  padding-left: 0;
  padding-right: 0;
}
.passage-result-banner {
  margin-bottom: 16px;
  padding: 13px 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.4;
}
.passage-result-banner--pass { background: #eaf8f1; color: var(--success); }
.passage-result-banner--fail { background: #fff0ee; color: var(--danger); }
.passage-full-result { min-width: 0; }
.passage-result-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin: 18px -2px -2px;
  padding: 14px 2px 2px;
  flex-wrap: wrap;
  background: linear-gradient(to bottom, rgba(245,247,251,0), #f5f7fb 24%);
}

.passage-result-card .mst-overall-grid,
.passage-result-card .mst-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 11px;
}
.passage-result-card .mst-summary {
  border: 1px solid #dfe3eb;
  border-radius: 12px;
  padding: 13px;
  background: #fff;
}
.passage-result-card .mst-summary span {
  display: block;
  font-size: 10px;
  font-weight: 850;
  color: #697386;
  text-transform: uppercase;
  letter-spacing: .45px;
}
.passage-result-card .mst-summary strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  color: var(--brand);
}
.passage-result-card .mst-summary.pass {
  background: #edf9f3;
  border-color: #bde2cd;
}
.passage-result-card .mst-summary.pass strong,
.passage-result-card .mst-result-ok {
  color: var(--success) !important;
}
.passage-result-card .mst-summary.fail {
  background: #fff1ef;
  border-color: #f0c7c0;
}
.passage-result-card .mst-summary.fail strong,
.passage-result-card .mst-result-bad {
  color: var(--danger) !important;
}
.passage-result-card .mst-result-section {
  margin-top: 18px;
  border: 1px solid #dfe3eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.passage-result-card .mst-result-section > h3 {
  margin: 0;
  padding: 13px 16px;
  background: var(--brand);
  color: #fff;
}
.passage-result-card .mst-result-section .mst-summary-grid { padding: 14px; }
.passage-result-card .mst-result-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #f3f5f9;
  border-top: 1px solid #e1e5ec;
  border-bottom: 1px solid #e1e5ec;
  font-size: 12px;
}
.passage-result-card .mst-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}
.passage-result-card .mst-compare-grid > div { min-width: 0; }
.passage-result-card .mst-compare-grid h4 {
  margin: 0;
  padding: 8px 10px;
  background: #f7f8fb;
  border: 1px solid #dfe3eb;
  border-bottom: 0;
}
.passage-result-card .mst-review-text {
  height: 320px;
  overflow: auto;
  border: 1px solid #dfe3eb;
  padding: 15px 17px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 17px/1.55 Arial, sans-serif;
  user-select: text;
  tab-size: 8;
}
.passage-result-card .mst-wrong {
  background: #ffd8d2;
  color: #9f2419;
  border-radius: 2px;
}
.passage-result-card .mst-missing {
  background: #dfe8ff;
  color: #234d9b;
  border-radius: 2px;
}
.passage-result-card .mst-tab-marker,
.passage-result-card .mst-enter-marker {
  color: var(--success);
  font-weight: 900;
  font-size: 11px;
}
.passage-result-card .mst-legend-red,
.passage-result-card .mst-legend-blue {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.passage-result-card .mst-legend-red { background: #d84a4a; }
.passage-result-card .mst-legend-blue { background: #4d83d8; }
.passage-result-card .mst-result-table-wrap { overflow: auto; }
.passage-result-card .mst-result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}
.passage-result-card .mst-result-table th,
.passage-result-card .mst-result-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e8ebf0;
  text-align: left;
  vertical-align: top;
}
.passage-result-card .mst-result-table th {
  background: #fafbfc;
  color: #556176;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .35px;
}
.passage-result-card .mst-clean {
  padding: 14px;
  color: var(--success);
  font-weight: 750;
}

.passage-correction-card { max-width: 620px; }
.passage-correction-word {
  margin: 8px 0 16px;
  padding: 24px 18px;
  border: 1px solid #d7dfea;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--brand);
  font-family: Arial, sans-serif;
  font-size: clamp(26px, 5vw, 42px);
  font-weight: 850;
  text-align: center;
  overflow-wrap: anywhere;
}
.passage-correction-progress {
  height: 8px;
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf3;
}
.passage-correction-progress > div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .15s ease;
}
.passage-correction-input-wrap input {
  font-family: Arial, sans-serif;
  font-size: 20px;
  text-align: center;
}

@media (max-width: 1120px) {
  .passage-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .passage-practice-brand strong { max-width: 44vw; }
}
@media (max-width: 900px) {
  .passage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .passage-result-card .mst-compare-grid { grid-template-columns: 1fr; }
  .passage-result-card .mst-review-text { height: 260px; }
}
@media (max-width: 760px) {
  body.passage-practice-active { overflow: auto; }
  .passage-practice-takeover {
    overflow-y: auto;
    grid-template-rows: auto auto auto auto;
    padding-bottom: 8px;
  }
  .passage-practice-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .passage-practice-brand strong {
    max-width: 86vw;
    white-space: normal;
  }
  .passage-practice-top-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .passage-timer-card { flex: 1; }
  .passage-practice-info {
    align-items: flex-start;
    flex-direction: column;
  }
  .passage-practice-hint { white-space: normal; }
  .passage-practice-workspace.passage-layout-vertical,
  .passage-practice-workspace.passage-layout-horizontal {
    height: auto;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .passage-typing-panel { height: 390px; }
  .passage-practice-footer {
    position: sticky;
    bottom: 6px;
    height: auto;
    min-height: 56px;
    z-index: 2;
    box-shadow: 0 3px 18px rgba(17,39,59,.14);
  }
}
@media (max-width: 620px) {
  .passage-grid { grid-template-columns: 1fr; }
  .passage-grid-scroll { max-height: 58vh; padding: 12px; }
  .passage-start-options { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .passage-practice-top-actions .btn { flex: 1 1 auto; }
  .passage-question-box,
  .passage-answer-box { padding: 16px; }
  .passage-practice-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .passage-practice-footer [data-submit-passage] { width: 100%; }
  .passage-result-card {
    width: 100% !important;
    max-width: none !important;
    height: 100vh;
    max-height: none;
    padding: 18px 12px 0;
  }
}



/* Student Help & Feedback */
.help-feedback-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 18px;
  align-items: start;
}
.help-feedback-card,
.help-feedback-info {
  min-width: 0;
}
.help-feedback-card h3,
.help-feedback-info h3 {
  margin-bottom: 8px;
}
.help-feedback-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.help-feedback-form textarea {
  min-height: 190px;
  resize: vertical;
  line-height: 1.55;
}
.help-feedback-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid #dfe3eb;
  border-radius: 10px;
  background: #f8fafc;
}
.help-feedback-status strong {
  color: var(--brand);
  font-size: 13px;
}
.help-feedback-status span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.help-feedback-success {
  padding: 11px 13px;
  border: 1px solid #bee3cf;
  border-radius: 10px;
  background: #eef9f3;
  color: #08764a;
  font-size: 13px;
  font-weight: 750;
}
.help-feedback-submit {
  justify-self: start;
  min-width: 190px;
}
.help-feedback-topics {
  display: grid;
  gap: 0;
  margin-top: 10px;
}
.help-feedback-topics > div {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.help-feedback-topics > div:first-child {
  border-top: 0;
  padding-top: 4px;
}
.help-feedback-topics strong {
  color: var(--brand);
  font-size: 13px;
}
.help-feedback-topics span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.help-feedback-note {
  margin: 10px 0 0;
  padding: 12px 13px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: #714024;
  font-size: 12px;
  line-height: 1.5;
}

/* Platform-admin Help & Feedback */
.help-admin-metrics {
  margin-bottom: 18px;
}
.help-admin-table-wrap {
  max-height: 66vh;
  overflow: auto;
  scrollbar-gutter: stable;
}
.help-admin-table {
  min-width: 1120px;
}
.help-admin-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8f9fc;
}
.help-admin-table td {
  vertical-align: top;
}
.help-message-cell {
  min-width: 320px;
  max-width: 520px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}
.help-status-select {
  min-width: 116px;
  border: 1px solid #d8dce6;
  border-radius: 9px;
  padding: 8px 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 900px) {
  .help-feedback-layout {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .help-feedback-status {
    align-items: flex-start;
    flex-direction: column;
  }
  .help-feedback-status span {
    text-align: left;
  }
  .help-feedback-submit {
    width: 100%;
  }
}
