/* Test and Prep Zone — unified UI system */
:root {
  --navy-950: #071b3a;
  --navy-900: #0b2f68;
  --navy-800: #123f82;
  --navy-700: #1952a0;
  --blue-600: #2368d8;
  --blue-100: #eaf2ff;
  --blue-50: #f5f8ff;
  --green-700: #15803d;
  --green-600: #20a34a;
  --green-500: #2ebd59;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;
  --violet-600: #6d3fe5;
  --violet-50: #f5f1ff;
  --amber-700: #a15c00;
  --amber-100: #fef3c7;
  --amber-50: #fffbeb;
  --red-700: #b42318;
  --red-100: #fee4e2;
  --red-50: #fff5f4;
  --ink-900: #11223d;
  --ink-800: #1d3352;
  --ink-700: #314867;
  --ink-600: #526782;
  --ink-500: #6b7c93;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --surface-tint: #f0f5fb;
  --page: #f4f7fb;
  --line: #dce5ef;
  --line-strong: #c9d5e3;
  --shadow-xs: 0 1px 2px rgba(7, 27, 58, .05);
  --shadow-sm: 0 8px 24px rgba(7, 27, 58, .07);
  --shadow-md: 0 18px 50px rgba(7, 27, 58, .10);
  --shadow-lg: 0 28px 80px rgba(7, 27, 58, .14);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --content-width: 1220px;
  --header-height: 76px;
  --focus: 0 0 0 4px rgba(35, 104, 216, .18);
  --brand: var(--navy-900);
  --brand2: var(--green-500);
  --brand3: var(--navy-950);
  --bg: var(--page);
  --fg: var(--ink-900);
  --muted: var(--ink-600);
  --card: var(--surface);
  --danger: var(--red-700);
  --ok: var(--green-700);
  --warn: var(--amber-700);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 10% -10%, rgba(35, 104, 216, .08), transparent 28rem),
    radial-gradient(circle at 95% 5%, rgba(46, 189, 89, .07), transparent 24rem),
    var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: var(--navy-800); text-decoration: none; }
a:hover { color: var(--blue-600); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
[hidden], .hidden { display: none !important; }
::selection { color: #fff; background: var(--navy-800); }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--navy-950);
  line-height: 1.15;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.65rem); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2.15rem); }
h3 { font-size: clamp(1.08rem, 1.6vw, 1.32rem); }
p { margin: 0; }
ul, ol { margin-top: 0; }
strong { font-weight: 800; }
.small { font-size: .9rem; }
.muted { color: var(--ink-600); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .72rem;
  color: var(--green-700);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.eyebrow::before {
  width: 1.8rem;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
  content: "";
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 9999;
  padding: .7rem 1rem;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--navy-950);
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Header and navigation */
.site-header,
.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-height);
  border-bottom: 1px solid rgba(201, 213, 227, .8);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 rgba(7, 27, 58, .02);
  backdrop-filter: blur(18px) saturate(130%);
}
.header-inner {
  width: min(var(--content-width), calc(100% - 2rem));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  min-width: max-content;
  color: var(--navy-950);
}
.brand-link:hover { color: var(--navy-950); }
.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.brand-text { display: grid; gap: .1rem; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; letter-spacing: -.015em; }
.brand-text small { color: var(--ink-500); font-size: .78rem; font-weight: 650; }
.header-controls { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.role-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .3rem .72rem;
  border: 1px solid #cfe0f7;
  border-radius: 999px;
  color: var(--navy-800);
  background: var(--blue-50);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.admin-role-badge { border-color: #ccebd5; color: var(--green-700); background: var(--green-50); }
.primary-nav { margin-left: auto; display: flex; align-items: center; gap: .2rem; }
.primary-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .58rem .78rem;
  border-radius: 11px;
  color: var(--ink-700);
  font-size: .9rem;
  font-weight: 750;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.primary-nav a:hover { color: var(--navy-900); background: var(--surface-tint); }
.primary-nav a.active { color: var(--navy-900); background: var(--blue-100); }
.primary-nav a.active::after {
  position: absolute;
  right: .75rem;
  bottom: .35rem;
  left: .75rem;
  height: 2px;
  border-radius: 99px;
  background: var(--blue-600);
  content: "";
}
.primary-nav .nav-cta,
.nav-trial-blink {
  margin-left: .3rem;
  color: #fff !important;
  background: linear-gradient(135deg, var(--green-600), var(--green-500));
  box-shadow: 0 8px 18px rgba(32, 163, 74, .2);
  animation: none !important;
}
.primary-nav .nav-cta:hover { color: #fff; background: linear-gradient(135deg, var(--green-700), var(--green-600)); transform: translateY(-1px); }
.primary-nav .nav-login { color: var(--navy-900); border: 1px solid var(--line-strong); background: #fff; }
.primary-nav .nav-logout { color: var(--red-700); }
.primary-nav .nav-logout:hover { background: var(--red-50); }
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--navy-950);
  background: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
}
.nav-toggle-lines { width: 20px; display: grid; gap: 4px; }
.nav-toggle-lines i { height: 2px; border-radius: 99px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
.nav-open .nav-toggle-lines i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-lines i:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle-lines i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.site-main { min-height: calc(100vh - var(--header-height) - 180px); }
.container { width: min(var(--content-width), calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 5rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-600); background: #fff; }
.footer-inner {
  width: min(var(--content-width), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.35rem 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 2rem;
}
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.footer-brand div { display: grid; }
.footer-brand strong { color: var(--navy-950); font-size: .92rem; }
.footer-brand span { font-size: .8rem; }
.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: var(--ink-700); font-size: .86rem; font-weight: 700; }
.footer-inner > small { white-space: nowrap; }

/* Layout primitives */
.card {
  position: relative;
  margin-bottom: 1.25rem;
  padding: clamp(1.1rem, 2.1vw, 1.55rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; gap: 1rem; }
.between { justify-content: space-between; }
.center { align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.cards3,
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.hero,
.page-hero {
  margin-bottom: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.page-hero > div:first-child { max-width: 790px; }
.hero p,
.page-hero p { margin-top: .55rem; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.compact-hero { margin-bottom: 1.2rem; }
.section-head { margin-bottom: 1.15rem; }
.section-head h2 { margin-bottom: .45rem; }
.section-head-with-action { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
.centered-section-head { max-width: 760px; margin-right: auto; margin-left: auto; text-align: center; }
.centered-section-head .eyebrow::before { display: none; }
.landing-section { padding: clamp(2.2rem, 5vw, 4.5rem) 0; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--navy-800);
  font-weight: 800;
  white-space: nowrap;
}
.text-link span { transition: transform .18s ease; }
.text-link:hover span { transform: translateX(3px); }

/* Buttons */
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1rem;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-950));
  box-shadow: 0 8px 18px rgba(11, 47, 104, .15);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, opacity .16s ease;
}
.btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(11, 47, 104, .2); }
.btn:active { transform: translateY(0); }
.btn.secondary { color: #fff; background: linear-gradient(135deg, var(--green-700), var(--green-500)); box-shadow: 0 8px 18px rgba(21, 128, 61, .16); }
.btn.secondary:hover { color: #fff; box-shadow: 0 12px 24px rgba(21, 128, 61, .22); }
.btn.ghost {
  color: var(--navy-900);
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: none;
}
.btn.ghost:hover { color: var(--navy-900); border-color: #adc2da; background: var(--blue-50); box-shadow: none; }
.btn.danger { color: #fff; background: linear-gradient(135deg, #c4322a, #a61b14); }
.btn.warning { color: #fff; background: linear-gradient(135deg, #e28a0a, #b96000); }
.btn.small { min-height: 40px; padding: .58rem .85rem; font-size: .88rem; }
.inline-btn { width: auto; min-height: 40px; padding: .58rem .82rem; font-size: .86rem; }
.btn:disabled,
.btn[disabled] { opacity: .46; filter: grayscale(.25); cursor: not-allowed; transform: none; box-shadow: none; }
.experience-blink,
.nav-trial-blink { animation: none !important; }

/* Forms */
form { margin: 0; }
label { display: flex; flex-direction: column; gap: .42rem; color: var(--ink-800); font-size: .9rem; font-weight: 750; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: .72rem .82rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink-900);
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #95a2b4; }
input:hover, select:hover, textarea:hover { border-color: #aebfd3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: var(--focus); }
input:disabled, select:disabled, textarea:disabled { color: #8b98a9; background: #f1f4f8; cursor: not-allowed; }
.checkbox, .option { flex-direction: row; }
.checkbox { align-items: center; gap: .55rem; }
.checkbox input, .option input, .agent-check { width: 18px; height: 18px; min-height: auto; accent-color: var(--blue-600); }
.switch-control { flex-direction: row; align-items: center; gap: .7rem; cursor: pointer; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 46px; height: 26px; flex: 0 0 46px; border-radius: 999px; background: #cbd5e1; transition: background .2s ease; }
.switch-ui::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); content: ""; transition: transform .2s ease; }
.switch-control input:checked + .switch-ui { background: var(--green-500); }
.switch-control input:checked + .switch-ui::after { transform: translateX(20px); }
.form-message { min-height: 1.4rem; color: var(--ink-600); font-size: .9rem; }
.form-message.error { color: var(--red-700); font-weight: 700; }
.form-message.success { color: var(--green-700); font-weight: 700; }

/* Feedback */
.alert,
.notice,
.success-box {
  padding: .9rem 1rem;
  border: 1px solid var(--red-100);
  border-radius: 14px;
  color: var(--red-700);
  background: var(--red-50);
  line-height: 1.5;
}
.alert.success,
.success-box { color: var(--green-700); border-color: #bce9ca; background: var(--green-50); }
.notice-info { color: var(--navy-800); border-color: #cbdcf4; background: var(--blue-50); }
.notice-warning,
.copy-alert { color: var(--amber-700); border-color: #f4d28e; background: var(--amber-50); }
.copy-alert { margin-bottom: 1rem; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: .25rem .65rem;
  border: 1px solid #bce9ca;
  border-radius: 999px;
  color: var(--green-700);
  background: var(--green-50);
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .03em;
}
.pill.inactive { color: var(--ink-600); border-color: var(--line); background: var(--surface-soft); }
.account-pill { color: var(--navy-800); border-color: #cbdcf4; background: var(--blue-50); }
.ok-text { color: var(--green-700); font-weight: 800; }
.danger-text { color: var(--red-700); font-weight: 800; }

/* Metrics */
.metric { min-height: 132px; overflow: hidden; }
.metric::after { position: absolute; right: -24px; bottom: -34px; width: 105px; height: 105px; border-radius: 50%; background: rgba(35,104,216,.06); content: ""; }
.metric span { display: block; margin-bottom: .4rem; color: var(--ink-600); font-size: .88rem; font-weight: 700; }
.metric strong { display: block; color: var(--navy-950); font-size: clamp(1.7rem, 3vw, 2.35rem); letter-spacing: -.04em; }
.metric small { display: block; margin-top: .4rem; color: var(--ink-500); font-size: .78rem; }

/* Tables */
.table-wrap {
  position: relative;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
th, td { padding: .82rem .9rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--navy-900);
  background: #f5f8fc;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}
td { color: var(--ink-700); font-size: .9rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfe; }
.table-actions, .mini-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.my-rank td { background: var(--green-50) !important; }
pre {
  max-height: 320px;
  margin: .5rem 0 0;
  padding: .9rem;
  overflow: auto;
  border-radius: 12px;
  color: #d9e8ff;
  background: #0b1830;
  font-size: .82rem;
  white-space: pre-wrap;
}

/* Landing */
.landing-hero {
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 4.5rem);
  overflow: hidden;
  border-color: #cfdceb;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(245,249,255,.96)),
    radial-gradient(circle at 80% 20%, rgba(46,189,89,.15), transparent 18rem);
  box-shadow: var(--shadow-md);
}
.landing-hero::before { position: absolute; top: -160px; right: -140px; width: 430px; height: 430px; border-radius: 50%; background: linear-gradient(145deg, rgba(35,104,216,.09), rgba(46,189,89,.08)); content: ""; }
.landing-copy { position: relative; z-index: 1; max-width: 720px; }
.landing-copy h1 { max-width: 700px; }
.landing-subtitle { margin-top: 1.15rem; color: var(--ink-600); font-size: clamp(1.02rem, 1.7vw, 1.2rem); line-height: 1.7; }
.landing-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.65rem; }
.hero-trust-row { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; margin-top: 1.4rem; color: var(--ink-600); font-size: .84rem; font-weight: 700; }
.hero-trust-row span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust-row span::before { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); content: ""; box-shadow: 0 0 0 4px rgba(46,189,89,.12); }
.landing-visual { position: relative; z-index: 1; display: grid; justify-items: center; gap: 1rem; }
.logo-stage { width: min(260px, 75%); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #d7e3ef; border-radius: 32px; background: rgba(255,255,255,.82); box-shadow: var(--shadow-md); }
.landing-logo-img { width: min(190px, 78%) !important; height: auto !important; max-height: 190px !important; object-fit: contain !important; border-radius: 20px; }
.hero-preview-card { width: min(350px, 100%); padding: 1rem; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-sm); }
.preview-label { display: block; margin-bottom: .7rem; color: var(--ink-500); font-size: .72rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.preview-step { display: flex; align-items: center; gap: .7rem; padding: .58rem 0; color: var(--ink-700); font-size: .88rem; font-weight: 700; }
.preview-step + .preview-step { border-top: 1px solid #edf1f5; }
.preview-step b { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border-radius: 9px; color: #fff; background: var(--navy-800); font-size: .75rem; }
.plan-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.landing-plan-cards { width: 100%; }
.mini-plan {
  position: relative;
  min-height: 310px;
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.mini-plan.featured-plan { border-color: #a5dfb7; box-shadow: 0 18px 42px rgba(21,128,61,.13); transform: translateY(-8px); }
.plan-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.plan-topline span { color: var(--navy-950); font-size: 1.08rem; font-weight: 850; }
.plan-topline small { padding: .28rem .55rem; border-radius: 999px; color: var(--ink-600); background: var(--surface-soft); font-size: .7rem; font-weight: 800; }
.mini-plan > strong { color: var(--navy-950); font-size: 2rem; letter-spacing: -.04em; }
.mini-plan > strong em { color: var(--ink-500); font-size: .78rem; font-style: normal; letter-spacing: 0; }
.mini-plan p { margin: .85rem 0 1.25rem; color: var(--ink-600); }
.mini-plan .btn { margin-top: auto; }
.free-plan { border-top: 4px solid var(--blue-600); }
.monthly-plan { border-top: 4px solid var(--green-500); }
.pro-plan { border-top: 4px solid var(--navy-950); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.feature-card { min-height: 250px; display: flex; flex-direction: column; margin-bottom: 0; transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 1.2rem; border-radius: 14px; color: #fff; background: var(--navy-800); font-size: .8rem; font-weight: 900; }
.feature-card h3 { margin-bottom: .65rem; }
.feature-card p { color: var(--ink-600); }
.feature-custom .feature-icon { background: var(--green-600); }
.feature-report .feature-icon { background: var(--violet-600); }
.exam-pathways { padding-top: 1.5rem; }
.landing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 2.7rem);
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  box-shadow: var(--shadow-md);
}
.landing-cta h2, .landing-cta .eyebrow { color: #fff; }
.landing-cta p { max-width: 720px; margin-top: .55rem; color: #d9e6f7; }
.landing-cta-actions { display: flex; gap: .65rem; flex-shrink: 0; }
.landing-cta .btn:first-child { color: var(--navy-950); background: #fff; }
.landing-cta .btn:first-child:hover { color: var(--navy-950); }

/* Public category cards and SEO resource links */
.public-category-grid,
.fast-category-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.public-category-button,
.fast-category-button {
  position: relative;
  min-height: 132px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .15rem .75rem;
  padding: 1.15rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink-900);
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.public-category-button::before { position: absolute; top: 0; right: 0; width: 80px; height: 80px; border-radius: 0 0 0 80px; background: rgba(35,104,216,.055); content: ""; }
.public-category-button:hover { color: var(--ink-900); border-color: #b9cbe0; transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.category-index { grid-row: 1 / 3; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--navy-800); background: var(--blue-100); font-size: .73rem; font-weight: 900; }
.public-category-button .category-name,
.public-category-button > span:not(.category-index) { align-self: end; color: var(--navy-950); font-size: 1rem; font-weight: 850; }
.public-category-button small { align-self: start; color: var(--ink-500); font-size: .78rem; font-weight: 650; }
.public-category-button i { grid-row: 1 / 3; font-style: normal; color: var(--blue-600); font-size: 1.2rem; transition: transform .18s ease; }
.public-category-button:hover i { transform: translateX(3px); }
.public-category-button.active { border-color: #9ed6af; background: var(--green-50); }
.compact-public-category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.compact-public-category-grid .public-category-button { min-height: 96px; }
.seo-related-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; }
.seo-related-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: .58rem .82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-700);
  background: #fff;
  font-size: .84rem;
  font-weight: 750;
  box-shadow: var(--shadow-xs);
}
.seo-related-links a:hover { color: var(--navy-900); border-color: #b9cbe0; background: var(--blue-50); }
.resource-pathways { margin-top: 2rem; }
.resource-pathways .section-head { max-width: 700px; margin-right: auto; margin-left: auto; text-align: center; }
.seo-keyword-chips { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.seo-keyword-chips span { padding: .42rem .7rem; border: 1px solid #d5e0ec; border-radius: 999px; color: var(--ink-600); background: #fff; font-size: .78rem; font-weight: 750; }
.seo-exam-hero { padding: clamp(1.4rem, 3vw, 2.3rem); }
.seo-content-section { margin-top: 1.5rem; }

/* Dashboard */
.dashboard-welcome { padding: 1rem 0 .4rem; }
.account-summary-card { min-width: 220px; padding: 1rem 1.15rem; border: 1px solid #cfdcf0; border-radius: 17px; background: #fff; box-shadow: var(--shadow-xs); }
.account-summary-card span, .account-summary-card small { display: block; color: var(--ink-500); font-size: .76rem; font-weight: 700; }
.account-summary-card strong { display: block; margin: .15rem 0; color: var(--navy-950); font-size: 1.28rem; }
.dashboard-metrics .metric:nth-child(2)::after { background: rgba(46,189,89,.08); }
.dashboard-metrics .metric:nth-child(3)::after { background: rgba(109,63,229,.07); }
.paper-launch-section { padding: clamp(1.25rem, 3vw, 2rem); }
.paper-option-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.paper-option {
  min-height: 310px;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.paper-option:hover { transform: translateY(-2px); border-color: #c5d4e5; box-shadow: var(--shadow-sm); }
.paper-option-top { display: flex; align-items: center; justify-content: space-between; }
.paper-option-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--navy-800); font-size: .8rem; font-weight: 900; }
.paper-option-green .paper-option-icon { background: var(--green-600); }
.paper-option-violet .paper-option-icon { background: var(--violet-600); }
.paper-option-custom .paper-option-icon { color: var(--navy-800); background: var(--blue-100); font-size: 1.2rem; }
.status-dot { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-500); font-size: .7rem; font-weight: 800; }
.status-dot::before { width: 7px; height: 7px; border-radius: 50%; content: ""; }
.available-status::before { background: var(--green-500); box-shadow: 0 0 0 3px rgba(46,189,89,.13); }
.unavailable-status::before { background: #9aa7b6; }
.paper-option h3 { margin-top: .2rem; }
.paper-option p { color: var(--ink-600); font-size: .88rem; line-height: 1.55; }
.paper-meta { display: flex; flex-wrap: wrap; gap: .35rem; }
.paper-meta span { padding: .3rem .5rem; border-radius: 999px; color: var(--ink-600); background: var(--surface-soft); font-size: .68rem; font-weight: 750; }
.paper-option .btn { width: 100%; margin-top: auto; }
.paper-composition { margin-top: 1rem; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.paper-composition summary { padding: .9rem 1rem; color: var(--navy-900); font-weight: 800; cursor: pointer; list-style: none; }
.paper-composition summary::-webkit-details-marker { display: none; }
.paper-composition summary::after { float: right; content: "+"; font-size: 1.2rem; }
.paper-composition[open] summary::after { content: "−"; }
.paper-composition .table-wrap { margin: 0 .75rem .75rem; }
.paper-launch-section > .notice { margin-top: 1rem; }
.builder-card { padding: 0; overflow: hidden; }
.builder-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; border-bottom: 1px solid var(--line); }
.builder-head p { margin-top: .45rem; }
.builder-wrap { border: 0; border-radius: 0; }
.builder-table th:nth-child(1) { width: 32%; }
.builder-table th:nth-child(2) { width: 46%; }
.builder-table th:nth-child(3) { width: 22%; }
.builder-table td { vertical-align: middle; }
.builder-table .available { display: block; margin-top: .2rem; color: var(--ink-500); font-size: .75rem; }
.builder-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem 1.35rem; border-top: 1px solid var(--line); background: var(--surface-soft); }
.recent-results-section { margin-top: 1.5rem; }
.empty-state { padding: 3rem 1.5rem; text-align: center; }
.empty-state p { max-width: 560px; margin: .65rem auto 1.2rem; color: var(--ink-600); }
.empty-state-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 1rem; border-radius: 18px; color: var(--navy-800); background: var(--blue-100); font-size: 1.3rem; font-weight: 900; }
.compact-empty-state { padding: 2rem 1rem; border: 1px dashed var(--line-strong); border-radius: 16px; background: var(--surface-soft); }

/* Test experience */
.test-header h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.test-progress-card { position: sticky; top: calc(var(--header-height) + .75rem); z-index: 20; padding: .9rem 1rem; border-radius: 16px; box-shadow: var(--shadow-sm); }
.test-progress-copy { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; color: var(--ink-600); font-size: .82rem; }
.test-progress-copy strong { color: var(--navy-950); }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: #e5ebf2; }
.progress-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-500), var(--blue-600)); transition: width .25s ease; }
.test-question-list { gap: 1rem; }
.question-card { padding: clamp(1.1rem, 2.5vw, 1.65rem); content-visibility: auto; contain-intrinsic-size: 380px; }
.question-card.answered { border-color: #b9d7c2; box-shadow: 0 10px 28px rgba(21,128,61,.07); }
.question-head { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: .85rem; align-items: start; margin-bottom: 1rem; }
.question-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #fff; background: var(--navy-800); font-size: .85rem; font-weight: 900; }
.question-head h2, .question-card h3 { color: var(--ink-900); font-size: clamp(1.03rem, 1.6vw, 1.2rem); line-height: 1.5; letter-spacing: -.01em; }
.question-topic { margin-top: .4rem; color: var(--ink-500); font-size: .78rem; font-weight: 650; }
.question-options { display: grid; gap: .62rem; }
.option {
  min-height: 58px;
  display: grid;
  grid-template-columns: 20px 34px minmax(0, 1fr);
  align-items: center;
  gap: .7rem;
  margin: 0;
  padding: .72rem .85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-800);
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.option:hover { border-color: #b8cbe1; background: var(--blue-50); }
.option.selected { border-color: #8bb2e8; background: #edf5ff; box-shadow: 0 0 0 3px rgba(35,104,216,.1); }
.option input { margin: 0; }
.option-letter { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; color: var(--navy-800); background: var(--blue-100); font-size: .78rem; font-weight: 900; }
.option.selected .option-letter { color: #fff; background: var(--blue-600); }
.option-text { line-height: 1.45; }
.test-submit-bar {
  position: sticky;
  bottom: .75rem;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem;
  border: 1px solid #cbd8e8;
  border-radius: 17px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}
.test-submit-bar div { display: grid; }
.test-submit-bar span { color: var(--ink-500); font-size: .78rem; }
.submit-sticky { position: sticky; bottom: 1rem; align-self: flex-end; }
.no-copy, .secure-test, .secure-review { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Results and reports */
.report-cards .metric { min-height: 150px; }
.accuracy-card { display: flex; align-items: center; justify-content: space-between; }
.donut { --pct: 0; width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green-500) calc(var(--pct) * 1%), #e6ecf3 0); }
.donut::before { grid-area: 1 / 1; width: 68px; height: 68px; border-radius: 50%; background: #fff; content: ""; }
.donut strong { position: relative; z-index: 1; font-size: 1rem; }
.visual-report-toggle-card { background: linear-gradient(135deg, #fff, var(--blue-50)); }
.visual-report-panel { margin-bottom: 1.5rem; }
.visual-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-area-grid { margin-top: 1rem; }
.bar-chart { display: grid; gap: 1rem; }
.bar-row { display: grid; gap: .45rem; }
.bar-label { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; }
.bar-label span { color: var(--ink-600); font-size: .82rem; }
.bar-label small { grid-column: 1 / -1; color: var(--ink-500); }
.bar-track { height: 10px; overflow: hidden; border-radius: 999px; background: #e8edf3; }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--blue-600), var(--green-500)); }
.weak-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.weak-grid.single-col { grid-template-columns: 1fr; }
.weak-item, .strong-item { padding: .9rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.weak-item { border-left: 4px solid #dd7a73; }
.strong-item { border-left: 4px solid var(--green-500); }
.weak-item strong, .strong-item strong, .weak-item span, .strong-item span { display: block; }
.weak-item span, .strong-item span { margin-top: .3rem; color: var(--ink-600); font-size: .82rem; }
.question-card.correct { border-left: 5px solid var(--green-500); }
.question-card.wrong { border-left: 5px solid #dc5147; }
.options-review, .question-card > ul { display: grid; gap: .45rem; padding-left: 1.2rem; }
.explanation { margin-top: .8rem; padding: .85rem; border-left: 4px solid var(--green-500); border-radius: 0 12px 12px 0; color: var(--ink-700); background: var(--green-50); }

/* Public MCQ reading */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-bottom: 1rem; color: var(--ink-500); font-size: .82rem; }
.breadcrumb a { color: var(--ink-600); font-weight: 700; }
.public-library-hero,
.public-mcq-hero { padding: clamp(1.4rem, 3vw, 2.25rem); }
.public-mcq-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.public-mcq-meta span { min-width: 105px; padding: .62rem .75rem; border: 1px solid #d3e0ef; border-radius: 13px; color: var(--ink-600); background: var(--blue-50); font-size: .76rem; text-align: center; }
.public-mcq-meta strong { color: var(--navy-950); font-size: 1rem; }
.public-mcq-list { display: grid; gap: 1rem; }
.readable-mcq-card { margin-bottom: 0; content-visibility: auto; contain-intrinsic-size: 440px; }
.readable-mcq-head { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; }
.mcq-number, .mcq-topic { display: inline-flex; align-items: center; min-height: 30px; padding: .35rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 850; }
.mcq-number { color: var(--green-700); background: var(--green-50); }
.mcq-topic { color: var(--navy-800); background: var(--blue-50); }
.readable-mcq-card h2 { color: var(--ink-900); font-size: clamp(1.03rem, 1.6vw, 1.18rem); line-height: 1.5; }
.readable-options { display: grid; gap: .55rem; margin: 1rem 0; padding: 0; list-style: none; counter-reset: option-counter; }
.readable-options li { position: relative; min-height: 50px; display: flex; align-items: center; padding: .68rem .75rem .68rem 3.2rem; border: 1px solid var(--line); border-radius: 13px; color: var(--ink-700); background: var(--surface-soft); counter-increment: option-counter; }
.readable-options li::before { position: absolute; left: .72rem; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--navy-800); background: var(--blue-100); font-size: .75rem; font-weight: 900; content: counter(option-counter, upper-alpha); }
.reveal-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.reveal-box { margin-top: .8rem; padding: .9rem 1rem; border: 1px solid #bbe4c7; border-radius: 14px; color: var(--ink-800); background: var(--green-50); }
.reveal-box[hidden] { display: none !important; }
.reveal-label { display: block; margin-bottom: .3rem; color: var(--green-700); font-size: .7rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.explanation-box { border-color: #cbdcf4; background: var(--blue-50); }
.explanation-box .reveal-label { color: var(--navy-800); }
.explanation-box p { color: var(--ink-700); line-height: 1.7; }
.mcq-pagination { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .75rem; margin: 2rem 0; }
.page-number-list { display: flex; justify-content: center; flex-wrap: wrap; gap: .35rem; }
.page-chip, .page-nav-link { min-width: 42px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-700); background: #fff; font-size: .82rem; font-weight: 800; }
.page-chip.active { color: #fff; border-color: var(--navy-800); background: var(--navy-800); }
.page-nav-link.next-page { justify-self: end; }
.other-categories-section { padding-bottom: 0; }

/* FAQ */
.faq-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 2rem; align-items: center; padding: clamp(1.5rem, 4vw, 2.6rem); }
.faq-hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.faq-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.faq-summary-card { display: grid; gap: .35rem; margin-bottom: 0; }
.faq-summary-card span { color: var(--ink-600); }
.faq-section { margin: 2.5rem 0; }
.faq-list { display: grid; gap: .7rem; }
.faq-item { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-xs); }
.faq-item summary { position: relative; padding: 1rem 3rem 1rem 1rem; color: var(--navy-950); font-weight: 800; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { position: absolute; top: 50%; right: 1rem; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; color: var(--navy-800); background: var(--blue-100); content: "+"; transform: translateY(-50%); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 1rem 1rem; color: var(--ink-600); }

/* Authentication */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 1.25rem; background: radial-gradient(circle at 15% 10%, rgba(35,104,216,.14), transparent 27rem), radial-gradient(circle at 90% 90%, rgba(46,189,89,.12), transparent 24rem), #f3f7fc; }
.auth-shell { width: min(520px, 100%); }
.auth-back-link { display: inline-flex; margin-bottom: .8rem; color: var(--ink-600); font-size: .86rem; font-weight: 750; }
.auth-card { width: 100%; padding: clamp(1.3rem, 4vw, 2rem); border: 1px solid var(--line); border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg); }
.auth-branding { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.35rem; }
.auth-logo { width: 76px; height: 76px; flex: 0 0 76px; object-fit: contain; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.auth-branding h1 { font-size: clamp(1.65rem, 4vw, 2.25rem); }
.auth-branding p { margin-top: .35rem; color: var(--ink-600); font-size: .9rem; }
.auth-form { gap: .9rem; }
.auth-form .btn { width: 100%; margin-top: .2rem; }
.auth-footer-note { display: flex; justify-content: center; gap: .35rem; margin-top: 1.2rem; color: var(--ink-600); font-size: .86rem; }
.auth-footer-note a { font-weight: 800; }
.auth-security-note { margin-top: 1rem; color: var(--ink-500); font-size: .78rem; text-align: center; }
.trial-request-card { max-width: 680px; margin: 1rem auto 2rem; }
.auth-form-card { max-width: 700px; margin-right: auto; margin-left: auto; }

/* Admin */
.role-admin .container { width: min(1420px, calc(100% - 2rem)); }
.admin-heading { display: flex; align-items: center; gap: 1rem; }
.admin-logo { width: 66px; height: 66px; object-fit: contain; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.security-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.security-strip span { padding: .35rem .6rem; border: 1px solid #cce8d4; border-radius: 999px; color: var(--green-700); background: var(--green-50); font-size: .72rem; font-weight: 800; }
.admin-tabs { position: sticky; top: calc(var(--header-height) + .5rem); z-index: 15; display: flex; flex-wrap: wrap; gap: .45rem; padding: .65rem; border-radius: 16px; box-shadow: var(--shadow-sm); }
.admin-tabs .btn { min-height: 38px; }
.admin-tabs .active { color: #fff; border-color: var(--navy-800); background: var(--navy-800); }
.admin-searchbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.admin-searchbar label { flex: 1; }
.search-count { color: var(--ink-500); font-size: .82rem; white-space: nowrap; }
.admin-search-row { align-items: end; }
.admin-search-row input { flex: 1; }
.credential-output:empty { display: none; }
.credential-card { padding: .9rem; border: 1px solid #bde6c8; border-radius: 14px; background: var(--green-50); }
.credential-message { color: var(--green-700); }
.copy-credential { cursor: pointer; }
.category-summary-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.category-summary-strip span { padding: .8rem; border: 1px solid var(--line); border-radius: 14px; color: var(--ink-700); background: var(--surface-soft); }
.merge-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); }
.inline-manage-form { display: grid; grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) auto; gap: .55rem; align-items: center; }
.inline-form { display: inline; }
.link-danger { padding: 0; color: var(--red-700); background: transparent; text-decoration: underline; cursor: pointer; }
.compact-list { margin: 0; padding-left: 1.1rem; }
.compact-list li { margin: .25rem 0; }

/* Admin review agent */
.agent-hero { display: grid; grid-template-columns: 1fr auto; }
.agent-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.agent-batch-box { padding: 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.agent-question-text { max-width: 540px; line-height: 1.5; }
.agent-current, .agent-suggested { display: block; color: var(--navy-950); font-weight: 800; }
.agent-suggested { color: var(--green-700); }
.agent-reason { display: block; margin-top: .25rem; color: var(--ink-500); font-size: .8rem; }
.confidence-pill { display: inline-flex; padding: .35rem .55rem; border: 1px solid #bde6c8; border-radius: 999px; color: var(--green-700); background: var(--green-50); font-size: .75rem; font-weight: 900; white-space: nowrap; }

/* Experience/demo */
.experience-hero { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; }
.experience-hero-side { min-width: 220px; display: grid; gap: .4rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-soft); text-align: center; }
.experience-hero-side strong { color: var(--navy-950); font-size: 1.8rem; }
.experience-hero-side small { color: var(--ink-500); }
.experience-strip { margin-top: 1rem; }
.style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.style-section { display: grid; gap: .2rem; padding: .75rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.style-section.ok { border-color: #bde6c8; background: var(--green-50); }
.style-section.missing { border-color: #efd69a; background: var(--amber-50); }
.style-section span { color: var(--ink-600); font-size: .8rem; }

/* Legacy tooltip support: compact and non-obstructive */
.quick-paper-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.tooltip-action { position: relative; }
.button-tip-row { display: flex; gap: .4rem; }
.button-tip-row .btn { flex: 1; }
.tip-toggle { width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--navy-800); background: #fff; font-weight: 900; cursor: pointer; }
.button-tooltip { display: none; margin-top: .4rem; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-600); background: var(--surface-soft); font-size: .78rem; }
.tooltip-action.tip-open .button-tooltip { display: block; }

/* Focus and motion */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .secure-test, .secure-review, .no-copy { display: none !important; }
  body::before { display: block; padding: 2rem; content: "Printing protected question content is disabled."; font-size: 1.2rem; }
}

/* Responsive */
@media (max-width: 1120px) {
  .primary-nav a { padding-right: .58rem; padding-left: .58rem; font-size: .84rem; }
  .paper-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-category-grid, .fast-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-public-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  :root { --header-height: 68px; }
  .header-inner { min-height: var(--header-height); }
  .brand-logo { width: 44px; height: 44px; flex-basis: 44px; }
  .brand-text strong { font-size: .98rem; }
  .brand-text small { font-size: .72rem; }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--header-height));
    display: grid;
    gap: .35rem;
    margin: 0;
    padding: .85rem 1rem 1.2rem;
    overflow-y: auto;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
  }
  .nav-open .primary-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .primary-nav a { justify-content: flex-start; min-height: 48px; padding: .75rem .9rem; border: 1px solid transparent; background: var(--surface-soft); }
  .primary-nav a.active { border-color: #cedced; }
  .primary-nav a.active::after { display: none; }
  .primary-nav .nav-cta { margin-left: 0; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr auto; }
  .footer-links { grid-column: 1 / -1; grid-row: 2; }
  .landing-hero { min-height: auto; grid-template-columns: 1fr; padding: 2rem; }
  .landing-copy { text-align: center; }
  .landing-copy .eyebrow::before { display: none; }
  .landing-actions, .hero-trust-row { justify-content: center; }
  .landing-visual { grid-template-columns: auto minmax(240px, 360px); align-items: center; justify-content: center; }
  .logo-stage { width: 180px; }
  .landing-logo-img { max-height: 130px !important; }
  .plan-cards { grid-template-columns: 1fr; }
  .mini-plan { min-height: 0; }
  .mini-plan.featured-plan { transform: none; }
  .feature-grid, .faq-summary-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .page-hero, .hero { align-items: flex-start; }
  .cards3, .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .public-category-grid, .fast-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-public-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .faq-hero { grid-template-columns: 1fr; }
  .visual-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-hero { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-tabs { position: static; }
  .agent-hero { grid-template-columns: 1fr; }
  .agent-toolbar { align-items: stretch; flex-direction: column; }
}

@media (max-width: 700px) {
  body { background: var(--page); }
  .header-inner, .container, .footer-inner, .role-admin .container { width: min(100% - 1.1rem, var(--content-width)); }
  .container { padding-top: 1rem; padding-bottom: 3.5rem; }
  .header-controls .role-badge { display: none; }
  .card { padding: 1rem; border-radius: 17px; box-shadow: 0 6px 18px rgba(7,27,58,.055); }
  h1 { font-size: clamp(1.8rem, 9vw, 2.5rem); }
  h2 { font-size: clamp(1.3rem, 6vw, 1.7rem); }
  .page-hero, .hero, .section-head-with-action, .landing-cta, .builder-head, .builder-actions, .test-submit-bar { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .page-hero > form .btn, .hero-actions .btn, .landing-cta-actions .btn { width: 100%; }
  .section-head-with-action .text-link { justify-self: start; }
  .landing-hero { padding: 1.25rem; border-radius: 20px; }
  .landing-copy { text-align: left; }
  .landing-copy .eyebrow::before { display: block; }
  .landing-actions { display: grid; grid-template-columns: 1fr; }
  .hero-trust-row { justify-content: flex-start; }
  .landing-visual { grid-template-columns: 1fr; }
  .logo-stage { width: 145px; border-radius: 24px; }
  .landing-logo-img { width: 105px !important; max-height: 105px !important; }
  .hero-preview-card { width: 100%; }
  .landing-section { padding: 2.3rem 0; }
  .centered-section-head { text-align: left; }
  .centered-section-head .eyebrow::before { display: block; }
  .cards3, .metrics-grid { grid-template-columns: 1fr; }
  .metric { min-height: 112px; }
  .paper-option-grid { grid-template-columns: 1fr; }
  .paper-option { min-height: 0; }
  .paper-option p { min-height: 0; }
  .paper-option .btn { margin-top: .5rem; }
  .public-category-grid, .fast-category-grid, .compact-public-category-grid { grid-template-columns: 1fr; }
  .public-category-button, .fast-category-button { min-height: 98px; }
  .seo-related-links { justify-content: flex-start; }
  .seo-related-links a { width: 100%; justify-content: center; border-radius: 13px; }
  .landing-cta-actions { display: grid; gap: .55rem; }
  .account-summary-card { min-width: 0; }
  .builder-table, .builder-table thead, .builder-table tbody, .builder-table th, .builder-table td, .builder-table tr { display: block; width: 100%; }
  .builder-table thead { display: none; }
  .builder-table tr { padding: .9rem; border-bottom: 1px solid var(--line); }
  .builder-table tr:last-child { border-bottom: 0; }
  .builder-table td { padding: .35rem 0; border: 0; }
  .builder-table td::before { display: block; margin-bottom: .25rem; color: var(--ink-500); font-size: .7rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; content: attr(data-label); }
  .builder-head, .builder-actions { padding: 1rem; }
  .switch-control { justify-content: space-between; flex-direction: row-reverse; }
  .builder-actions .btn { width: 100%; }
  .responsive-data-table, .responsive-data-table thead, .responsive-data-table tbody, .responsive-data-table th, .responsive-data-table td, .responsive-data-table tr { display: block; width: 100%; }
  .responsive-data-table thead { display: none; }
  .responsive-data-table tr { padding: .75rem; border-bottom: 1px solid var(--line); }
  .responsive-data-table tr:last-child { border-bottom: 0; }
  .responsive-data-table td { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: .7rem; padding: .42rem 0; border: 0; }
  .responsive-data-table td::before { color: var(--ink-500); font-size: .72rem; font-weight: 800; content: attr(data-label); }
  .test-progress-card { top: calc(var(--header-height) + .4rem); }
  .test-progress-copy { font-size: .76rem; }
  .question-head { grid-template-columns: 36px minmax(0,1fr); gap: .65rem; }
  .question-number { width: 36px; height: 36px; }
  .option { grid-template-columns: 18px 30px minmax(0,1fr); padding: .7rem; }
  .option-letter { width: 30px; height: 30px; }
  .test-submit-bar { position: static; }
  .test-submit-bar .btn { width: 100%; }
  .accuracy-card { display: flex; }
  .visual-kpi-grid { grid-template-columns: 1fr; }
  .weak-grid { grid-template-columns: 1fr; }
  .public-mcq-hero { display: grid; }
  .public-mcq-meta { justify-content: flex-start; }
  .public-mcq-meta span { flex: 1; min-width: 92px; }
  .mcq-pagination { grid-template-columns: 1fr 1fr; }
  .page-number-list { grid-column: 1 / -1; grid-row: 1; }
  .page-nav-link.previous-page { grid-column: 1; grid-row: 2; }
  .page-nav-link.next-page { grid-column: 2; grid-row: 2; }
  .auth-body { padding: .75rem; }
  .auth-branding { align-items: flex-start; }
  .auth-logo { width: 64px; height: 64px; flex-basis: 64px; }
  .footer-inner { grid-template-columns: 1fr; gap: .85rem; }
  .footer-links { grid-column: auto; grid-row: auto; flex-wrap: wrap; }
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .admin-tabs .btn { width: 100%; }
  .admin-searchbar { align-items: stretch; flex-direction: column; }
  .category-summary-strip { grid-template-columns: 1fr; }
  .inline-manage-form { grid-template-columns: 1fr; }
  .agent-table table, .agent-table thead, .agent-table tbody, .agent-table th, .agent-table td, .agent-table tr { display: block; width: 100%; }
  .agent-table thead { display: none; }
  .agent-table tr { margin-bottom: .75rem; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
  .agent-table td { border-bottom: 1px solid var(--line); }
  .agent-table td:last-child { border-bottom: 0; }
  .agent-table td::before { display: block; margin-bottom: .25rem; color: var(--ink-500); font-size: .7rem; font-weight: 850; content: attr(data-label); text-transform: uppercase; }
}

@media (max-width: 430px) {
  .brand-text small { display: none; }
  .brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
  .header-inner { gap: .55rem; }
  .landing-hero { padding: 1rem; }
  .hero-trust-row { display: grid; }
  .paper-option { padding: 1rem; }
  .readable-mcq-head { align-items: flex-start; flex-direction: column; }
  .reveal-actions .btn { width: 100%; }
  .public-mcq-meta { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .public-mcq-meta span { min-width: 0; padding: .55rem .35rem; }
  .auth-branding { flex-direction: column; }
  .admin-tabs { grid-template-columns: 1fr; }
  th, td { padding: .7rem .75rem; }
}

/* Page-specific finishing touches */
.option > input + span:last-child { grid-column: 2 / -1; }
.leaderboard-tabs { display: flex; flex-wrap: wrap; gap: .55rem; }
.leaderboard-tabs .btn { flex: 1 1 120px; }
.trial-request-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr); gap: 1.25rem; align-items: stretch; max-width: 980px; margin: 1rem auto 2rem; }
.trial-info-panel { position: relative; overflow: hidden; padding: clamp(1.4rem, 4vw, 2.4rem); border-radius: var(--radius-lg); color: #fff; background: linear-gradient(145deg, var(--navy-950), var(--navy-800)); box-shadow: var(--shadow-md); }
.trial-info-panel::after { position: absolute; right: -80px; bottom: -90px; width: 230px; height: 230px; border-radius: 50%; background: rgba(46,189,89,.15); content: ""; }
.trial-info-panel h1, .trial-info-panel .eyebrow { color: #fff; }
.trial-info-panel > p { margin-top: .8rem; color: #d9e6f7; }
.trial-benefits { position: relative; z-index: 1; display: grid; gap: .75rem; margin-top: 2rem; }
.trial-benefits div { padding: .8rem; border: 1px solid rgba(255,255,255,.14); border-radius: 14px; background: rgba(255,255,255,.07); }
.trial-benefits strong, .trial-benefits span { display: block; }
.trial-benefits span { margin-top: .15rem; color: #c7d7eb; font-size: .8rem; }
.trial-request-layout .trial-request-card { max-width: none; margin: 0; }
.form-privacy-note { margin-top: 1rem; color: var(--ink-500); font-size: .76rem; text-align: center; }

@media (max-width: 760px) {
  .trial-request-layout { grid-template-columns: 1fr; }
  .trial-info-panel { padding: 1.25rem; }
  .trial-benefits { margin-top: 1.25rem; }
  .leaderboard-tabs { display: grid; grid-template-columns: 1fr 1fr; }
}
.actions-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0 0; }
.admin-compact-table th, .admin-compact-table td { vertical-align: middle; }
.compact-paper-table td, .compact-paper-table th { vertical-align: middle; }
.score-only-cards .metric { min-height: 125px; }
.public-mcq-section { margin-top: .25rem; }
.seo-related-panel { margin-top: 1.5rem; }
.report-visuals { margin-top: 1rem; }
.answer-box strong { color: var(--green-700); }
.experience-ratio-card { margin-top: 1rem; }
@media (max-width: 700px) { .actions-row { display: grid; grid-template-columns: 1fr; } }


/* Package requests, compact admin lists, and rendering performance */
.plan-request-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: .8rem;
}
.plan-request-actions form { margin: 0; }
.plan-request-actions .btn { min-height: 38px; padding: .55rem .8rem; font-size: .82rem; }
.plan-request-note { display: block; margin-top: .55rem; color: var(--muted, #61708a); }
.package-request-notice { margin-top: -.5rem; margin-bottom: 1rem; }
.notice-success { border-color: #9fe0ba; background: #effcf4; color: #116235; }
.notice-info { border-color: #b9d3f6; background: #f1f7ff; color: #174a83; }
.pending-pill { background: #fff5d8; color: #7d5700; border-color: #f3d178; }

.admin-five-row-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--border, #dce4ef);
  border-radius: 14px;
  max-height: calc(52px + (5 * var(--admin-row-height, 74px)));
}
.admin-five-row-scroll table { margin: 0; border: 0; }
.admin-five-row-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7f9fc;
  box-shadow: 0 1px 0 var(--border, #dce4ef);
}
.admin-five-row-scroll tbody tr { height: var(--admin-row-height, 74px); }
.trial-request-scroll { --admin-row-height: 74px; }
.package-request-scroll { --admin-row-height: 86px; }
.student-account-scroll { --admin-row-height: 104px; }

/* Defer rendering of content below the first viewport without changing layout. */
@supports (content-visibility: auto) {
  .landing-section,
  .recent-results-section,
  .builder-card,
  .paper-launch-section,
  .role-admin .site-main .card {
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
  }
}

@media (max-width: 720px) {
  .dashboard-welcome .account-summary-card { width: 100%; }
  .plan-request-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-request-actions .btn { width: 100%; }
  .admin-five-row-scroll { max-height: 430px; }
  .student-account-scroll { max-height: 560px; }
}

@media (max-width: 430px) {
  .plan-request-actions { grid-template-columns: 1fr; }
}

/* Commercial platform modules ------------------------------------------------ */
.honeypot {
  position: fixed !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.optional { color: var(--ink-500); font-size: .78rem; font-weight: 600; }
.full-width { width: 100%; justify-content: center; }
.span-2 { grid-column: 1 / -1; }
.two-col-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.single-auth-shell { max-width: 620px; margin-inline: auto; grid-template-columns: 1fr; }
.commercial-auth-shell { grid-template-columns: minmax(280px, .85fr) minmax(480px, 1.15fr); }
.wide-auth-card { max-width: none; }
.auth-side-panel {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  padding: clamp(1.5rem, 4vw, 2.6rem);
  border-radius: var(--radius-lg);
  color: #fff;
  background: linear-gradient(145deg, var(--navy-950), var(--navy-800));
  box-shadow: var(--shadow-md);
}
.auth-side-panel::after {
  position: absolute;
  right: -6rem;
  bottom: -7rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: rgba(46,189,89,.16);
  content: "";
}
.auth-side-panel > * { position: relative; z-index: 1; }
.auth-side-panel h1, .auth-side-panel .eyebrow { color: #fff; }
.auth-side-panel p { max-width: 42rem; margin-top: .8rem; color: #dbe7f6; }
.checkbox-row { display: flex !important; align-items: flex-start; gap: .65rem; }
.checkbox-row input { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .22rem; }

.check-list { display: grid; gap: .72rem; padding: 0; margin: 1.25rem 0 0; list-style: none; }
.check-list li { position: relative; padding-left: 1.75rem; color: var(--ink-700); }
.check-list li::before {
  position: absolute;
  left: 0;
  top: .08rem;
  display: grid;
  width: 1.2rem;
  height: 1.2rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-600);
  font-size: .72rem;
  font-weight: 900;
  content: "✓";
}
.auth-side-panel .check-list li { color: #edf5ff; }
.compact-list { gap: .6rem; }

.commercial-hero { align-items: end; }
.commercial-pricing-grid,
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.5rem;
}
.pricing-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .9rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.pricing-card h2 { font-size: 1.35rem; }
.pricing-card > p { min-height: 4.6em; color: var(--ink-600); font-size: .91rem; }
.pricing-card .check-list { flex: 1; margin-top: .15rem; }
.pricing-card .check-list li { font-size: .88rem; }
.featured-plan {
  border: 2px solid var(--green-500);
  transform: translateY(-8px);
  box-shadow: 0 22px 55px rgba(21,128,61,.16);
}
.plan-badge {
  position: absolute;
  top: -.8rem;
  right: 1rem;
  padding: .35rem .72rem;
  border-radius: 999px;
  color: #fff;
  background: var(--green-700);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.price-line { display: flex; align-items: baseline; gap: .35rem; min-height: 3.2rem; color: var(--navy-950); }
.price-line span { color: var(--ink-500); font-weight: 750; }
.price-line strong { font-size: clamp(1.9rem, 3vw, 2.65rem); line-height: 1; }
.trust-panel { margin-bottom: 1.5rem; }
.trust-panel .cards3 { margin-top: 1rem; }

.checkout-grid { align-items: start; }
.payment-instructions { position: sticky; top: calc(var(--header-height) + 1rem); }
.payment-instructions > p { padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.success-panel { max-width: 760px; margin: 2rem auto; padding: clamp(1.4rem, 4vw, 2.4rem); text-align: center; }
.success-panel .row { justify-content: center; margin-top: 1rem; }
.account-summary-card {
  min-width: 190px;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.account-summary-card span, .account-summary-card strong { display: block; }
.account-summary-card span { color: var(--ink-500); font-size: .76rem; text-transform: uppercase; }
.account-summary-card strong { margin-top: .15rem; font-size: 1.45rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: .22rem .58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-pending, .status-open, .status-unreviewed { border-color: #f1d487; color: #795500; background: var(--amber-50); }
.status-approved, .status-resolved, .status-verified, .status-published { border-color: #a9dfbc; color: var(--green-700); background: var(--green-50); }
.status-rejected, .status-closed { border-color: #f2b8b2; color: var(--red-700); background: var(--red-50); }
.status-in_progress, .status-review, .status-needs_review, .status-draft { border-color: #bcd2f4; color: var(--navy-800); background: var(--blue-50); }
.status-archived, .status-dismissed { color: var(--ink-600); background: var(--surface-soft); }

.content-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.content-card { display: flex; min-height: 250px; flex-direction: column; gap: .8rem; }
.content-card h2 { font-size: 1.28rem; }
.content-card h2 a { color: var(--navy-950); }
.content-card p { flex: 1; color: var(--ink-600); }
.content-card-meta, .content-byline, .question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem .7rem;
  color: var(--ink-500);
  font-size: .76rem;
  font-weight: 700;
}
.content-card-meta span, .question-meta span {
  padding: .25rem .52rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}
.content-detail { max-width: 980px; margin-inline: auto; }
.content-detail .page-hero { padding-inline: 0; box-shadow: none; background: transparent; }
.article-body { font-size: 1.03rem; line-height: 1.8; }
.article-body p + p { margin-top: 1rem; }
.source-links { margin: 1rem 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0; color: var(--ink-500); font-size: .82rem; }

.support-layout { align-items: start; }
.support-layout aside { position: sticky; top: calc(var(--header-height) + 1rem); }
.form-status { min-height: 1.4rem; color: var(--ink-600); font-size: .86rem; }

.dashboard-commercial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}
.commercial-action-card { display: flex; min-height: 210px; flex-direction: column; gap: .75rem; }
.commercial-action-card .btn, .commercial-action-card form { margin-top: auto; }
.profile-card-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(250px,.7fr); gap: 1rem; }
.referral-card { overflow-wrap: anywhere; background: linear-gradient(145deg,var(--blue-50),#fff); }
.referral-code { display: inline-flex; padding: .55rem .75rem; border: 1px dashed var(--blue-600); border-radius: 10px; color: var(--navy-900); background: #fff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .08em; }

.admin-editor-grid { grid-template-columns: minmax(520px,1.3fr) minmax(320px,.7fr); align-items: start; }
.content-editor { position: sticky; top: calc(var(--header-height) + 1rem); }
.admin-content-list { display: grid; gap: .75rem; max-height: 72vh; overflow: auto; padding-right: .25rem; }
.admin-content-list article { padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.admin-content-list article h3 { margin: .45rem 0; }
.admin-content-list article p { color: var(--ink-600); }
.compact-form { gap: .5rem; min-width: 190px; }
.compact-options { margin: .65rem 0; padding-left: 1.35rem; color: var(--ink-700); font-size: .88rem; }
.compact-stack { gap: .5rem; }
.plan-admin-row { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.plan-admin-row:last-child { border-bottom: 0; }
.plan-admin-row small { display: block; margin-top: .2rem; color: var(--ink-500); }
.commercial-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.simple-revenue-chart { display: grid; gap: .8rem; margin-top: 1rem; }
.bar-row { display: grid; gap: .4rem; }
.bar-label { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; }
.bar-track { height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-tint); }
.bar-fill { height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg,var(--navy-800),var(--green-500)); }

.report-dialog {
  width: min(560px, calc(100% - 2rem));
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: var(--shadow-lg);
}
.report-dialog::backdrop { background: rgba(7,27,58,.58); backdrop-filter: blur(4px); }
.report-dialog-card { margin: 0; border: 0; }
.icon-close { width: 38px; height: 38px; border-radius: 50%; color: var(--ink-700); background: var(--surface-soft); font-size: 1.5rem; cursor: pointer; }
.icon-close:hover { color: var(--red-700); background: var(--red-50); }

@media (max-width: 1120px) {
  .commercial-pricing-grid, .pricing-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .commercial-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-editor-grid { grid-template-columns: 1fr; }
  .content-editor { position: static; }
}
@media (max-width: 820px) {
  .commercial-auth-shell, .checkout-grid, .profile-card-grid { grid-template-columns: 1fr; }
  .auth-side-panel { min-height: auto; }
  .two-col-form { grid-template-columns: 1fr; }
  .two-col-form .span-2 { grid-column: auto; }
  .content-card-grid, .dashboard-commercial-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payment-instructions, .support-layout aside { position: static; }
  .featured-plan { transform: none; }
}
@media (max-width: 620px) {
  .commercial-pricing-grid, .pricing-grid, .content-card-grid, .dashboard-commercial-grid, .commercial-metrics { grid-template-columns: 1fr; }
  .pricing-card > p { min-height: 0; }
  .account-summary-card { width: 100%; }
  .admin-content-list { max-height: none; }
  .report-dialog { width: calc(100% - 1rem); }
}
.package-editor-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.package-editor-card { min-width: 0; }
.package-editor-card .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.switch-label { display: inline-flex !important; align-items: center; gap: .45rem; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); font-size: .78rem; }
.switch-label input { width: 16px; height: 16px; }
.commerce-promotion-grid { align-items: start; }
.coupon-list { display: grid; gap: .6rem; }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.coupon-row small { display: block; margin-top: .2rem; color: var(--ink-500); }
.compact-filter-form { flex-wrap: wrap; }
@media (max-width: 1120px) { .package-editor-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .package-editor-grid { grid-template-columns: 1fr; } .package-editor-card .form-grid { grid-template-columns: 1fr; } .coupon-row { align-items: flex-start; flex-direction: column; } }
.quality-review-list { display: grid; gap: 1rem; margin-top: 1rem; }
.quality-review-card { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr) minmax(260px,.65fr); gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface-soft); }
.quality-question-panel, .ai-review-panel, .editorial-decision-panel { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.quality-question-panel h3 { margin: .75rem 0; }
.quality-findings { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .8rem; }
.quality-findings p { flex-basis: 100%; color: var(--ink-600); }
.ai-review-panel { display: grid; align-content: start; gap: .75rem; }
.ai-review-panel.has-ai-review { border-color: #bdd2f4; background: linear-gradient(145deg,#fff,var(--blue-50)); }
.ai-review-panel ul { padding-left: 1.25rem; margin: .4rem 0 0; }
.ai-review-panel details { padding: .6rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.quality-score { display: inline-flex; padding: .35rem .55rem; border-radius: 999px; color: var(--navy-900); background: var(--blue-100); }
.editorial-decision-panel { display: grid; align-content: start; gap: .7rem; }
@media (max-width: 1180px) { .quality-review-card { grid-template-columns: 1fr 1fr; } .editorial-decision-panel { grid-column: 1 / -1; } }
@media (max-width: 760px) { .quality-review-card { grid-template-columns: 1fr; padding: .65rem; } .editorial-decision-panel { grid-column: auto; } }

/* MCQ Card Studio */
.mcq-card-filter-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.3fr auto;
  gap: 1rem;
  align-items: end;
}
.form-actions-inline {
  display: flex;
  align-items: end;
}
.mcq-card-studio {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
  gap: 1.25rem;
  align-items: start;
}
.mcq-card-toolbar { margin-bottom: 1rem; }
.mcq-card-list-panel,
.mcq-card-preview-panel { min-width: 0; }
.mcq-card-list {
  display: grid;
  gap: .85rem;
  max-height: 70vh;
  overflow: auto;
  padding-right: .15rem;
}
.mcq-card-list-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: .9rem;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.mcq-card-list-item:hover { border-color: #b7cbe2; box-shadow: var(--shadow-xs); }
.mcq-card-list-item.is-active { border-color: #0f6cbf; box-shadow: 0 0 0 3px rgba(15,108,191,.12); }
.mcq-card-list-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .7rem; }
.compact-checkbox { font-size: .82rem; gap: .38rem; }
.compact-checkbox input { width: 18px; min-height: 18px; }
.mcq-card-open {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  display: grid;
  gap: .42rem;
  padding: 0;
  cursor: pointer;
}
.mcq-card-open strong { color: var(--navy-950); font-size: 1rem; line-height: 1.5; }
.mcq-card-open span,
.mcq-card-open small { color: var(--ink-600); }
.mcq-card-open small { font-weight: 700; }
.compact-select { width: auto; min-width: 280px; }
.compact-select select { min-width: 100%; }
.mcq-card-preview-panel { position: sticky; top: calc(var(--header-height) + 16px); }
.mcq-card-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1rem 0 1.15rem;
}
.social-card-preview {
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  padding: 1.15rem;
  background: linear-gradient(145deg, #0b2f68, #0f6cbf);
  color: #fff;
  box-shadow: 0 24px 50px rgba(11,47,104,.24);
  display: grid;
  gap: 1rem;
}
.social-card-preview--square { aspect-ratio: 1 / 1; }
.social-card-ribbon {
  justify-self: start;
  padding: .45rem .8rem;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.social-card-meta { color: rgba(255,255,255,.82); font-size: .92rem; font-weight: 700; }
.social-card-question {
  padding: 1.2rem;
  border-radius: 24px;
  background: rgba(255,255,255,.96);
  color: var(--navy-950);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  line-height: 1.65;
  font-weight: 800;
  min-height: 230px;
}
.social-card-options-box {
  display: grid;
  gap: .7rem;
}
.social-card-option {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: .8rem;
  align-items: start;
  padding: .88rem .95rem;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.10));
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.social-card-option span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #22c55e, #0f6cbf);
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
}
.social-card-option strong { color: #fff; font-size: .98rem; line-height: 1.45; font-weight: 700; }
.social-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: .85rem .95rem;
  border-radius: 20px;
  background: rgba(11,47,104,.26);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.94);
}
.social-card-footer strong { display: block; font-size: 1rem; }
.social-card-footer span { display:block; font-size: .82rem; color: rgba(255,255,255,.78); }
.social-card-footer small { font-size: .78rem; line-height: 1.45; color: rgba(255,255,255,.82); text-align: right; }
.mcq-card-download-actions { margin-top: .35rem; }
.small-note { font-size: .84rem; }

@media (max-width: 1100px) {
  .mcq-card-studio { grid-template-columns: 1fr; }
  .mcq-card-preview-panel { position: static; }
}
@media (max-width: 820px) {
  .mcq-card-filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .mcq-card-filter-grid { grid-template-columns: 1fr; }
  .compact-select { min-width: 100%; }
  .social-card-preview { width: 100%; }
  .social-card-brand { grid-template-columns: auto 1fr; }
  .social-card-question { min-height: 190px; }
  .social-card-footer { flex-direction: column; align-items: flex-start; }
  .social-card-footer small { text-align: left; }
}

/* Public demo question selector */
.demo-builder-panel {
  min-width: min(100%, 310px);
  display: grid;
  gap: .55rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.demo-builder-panel > strong {
  color: var(--navy-950);
  font-size: 1.65rem;
}
.demo-count-form {
  display: grid;
  gap: .75rem;
  margin-top: .45rem;
}
.demo-count-form .btn { width: 100%; }
.demo-trial-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-color: rgba(34,197,94,.28);
  background: linear-gradient(135deg, #f5fbff, #f3fff6);
}
.demo-trial-cta > div { max-width: 760px; }
.demo-trial-cta h2 { margin-top: .25rem; }
.demo-trial-cta .btn { flex: 0 0 auto; }
@media (max-width: 760px) {
  .demo-builder-panel { width: 100%; }
  .demo-trial-cta { display: grid; grid-template-columns: 1fr; }
  .demo-trial-cta .btn { width: 100%; }
}

/* MCQ Difficulty Categorizer */
.difficulty-filter-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.15fr auto;
  gap: 1rem;
  align-items: end;
}
.difficulty-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-easy { border-top: 4px solid #22c55e; }
.metric-medium { border-top: 4px solid #f59e0b; }
.metric-hard { border-top: 4px solid #ef4444; }
.difficulty-apply-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem;
}
.difficulty-apply-form label { min-width: 200px; }
.difficulty-preview-table td:first-child { min-width: 420px; }
.difficulty-preview-table p { margin: .4rem 0; line-height: 1.5; }
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: .42rem .7rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  text-transform: capitalize;
}
.difficulty-easy { color: #166534; background: #dcfce7; }
.difficulty-medium { color: #92400e; background: #fef3c7; }
.difficulty-hard { color: #991b1b; background: #fee2e2; }
.difficulty-unset,
.difficulty- { color: #475569; background: #e2e8f0; }

@media (max-width: 1050px) {
  .difficulty-filter-grid { grid-template-columns: 1fr 1fr; }
  .difficulty-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .difficulty-filter-grid,
  .difficulty-metrics { grid-template-columns: 1fr; }
  .difficulty-apply-form { display: grid; grid-template-columns: 1fr; }
  .difficulty-apply-form label,
  .difficulty-apply-form .btn { width: 100%; }
}

/* Public Test Builder and no-login test experience */
.public-test-builder-card { overflow: visible; }
.public-test-main-fields { grid-template-columns: repeat(4,minmax(0,1fr)); }
.public-test-mode-note {
  padding: 1rem 1.1rem;
  border: 1px solid #c7dcf3;
  border-radius: 16px;
  color: var(--navy-900);
  background: linear-gradient(135deg,#f4f8ff,#eef7ff);
}
.public-test-category-section { padding-top: .25rem; }
.public-test-category-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.85rem; }
.public-test-category-allocation {
  min-width:0;
  display:grid;
  grid-template-columns:1fr 90px;
  align-items:center;
  gap:.8rem;
  padding:.9rem;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface-muted);
}
.public-test-category-allocation > span { display:grid; gap:.18rem; }
.public-test-category-allocation small { color:var(--ink-600); font-weight:600; }
.public-test-category-allocation input { text-align:center; }
.allocation-match { color:var(--green-700)!important; border-color:#9ee3b2!important; background:#edfff2!important; }
.allocation-mismatch { color:var(--red-700)!important; border-color:#f4b3ae!important; background:var(--red-50)!important; }
.public-test-admin-list { display:grid; gap:1rem; }
.public-test-admin-card { padding:1.1rem; border:1px solid var(--line); border-radius:18px; background:#fff; }
.public-test-admin-card h3 { margin:.45rem 0 .2rem; }
.public-test-result-mini { display:grid; grid-template-columns:auto auto; gap:.15rem .65rem; align-items:baseline; min-width:150px; }
.public-test-result-mini strong { color:var(--navy-950); font-size:1.2rem; }
.public-test-result-mini span { color:var(--ink-600); font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; }
.public-test-control-grid { align-items:start; }
.copy-field { display:grid; grid-template-columns:1fr auto; gap:.55rem; }
.public-test-composition-list { display:grid; gap:.65rem; }
.public-test-composition-list > div { display:flex; justify-content:space-between; gap:1rem; padding:.75rem .85rem; border-radius:12px; background:var(--surface-muted); }
.public-test-question-review-list { display:grid; gap:1rem; }
.public-test-question-review { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:1rem; align-items:start; padding:1rem; border:1px solid var(--line); border-radius:18px; background:#fff; }
.public-test-question-number { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:14px; color:#fff; background:linear-gradient(135deg,var(--navy-800),#0f6cbf); font-weight:800; }
.public-test-question-content h3 { margin:.45rem 0 .75rem; line-height:1.55; }
.danger-zone-card { border-color:#f2b9b5; background:#fffafa; }

.public-test-entry-shell { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(360px,.9fr); gap:clamp(1.2rem,4vw,3rem); align-items:center; min-height:68vh; }
.public-test-entry-summary { padding:clamp(.4rem,2vw,1.2rem); }
.public-test-entry-summary h1 { max-width:780px; margin:.45rem 0 .8rem; font-size:clamp(2rem,4.8vw,4rem); }
.public-test-entry-summary > p { max-width:650px; font-size:1.08rem; }
.public-test-entry-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.85rem; margin:1.5rem 0; }
.public-test-entry-metrics > div { padding:1rem; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:var(--shadow-xs); display:grid; gap:.2rem; }
.public-test-entry-metrics strong { color:var(--navy-950); font-size:1.5rem; }
.public-test-entry-metrics span { color:var(--ink-600); font-size:.82rem; }
.public-test-registration-card { display:grid; gap:1rem; margin:0; }
.compact-feature-list { margin-top:1.2rem; }

.public-test-attempt-header { display:flex; justify-content:space-between; gap:1.2rem; align-items:center; }
.public-test-attempt-stats { display:flex; flex-wrap:wrap; gap:.65rem; justify-content:flex-end; }
.public-test-attempt-stats span { display:grid; min-width:100px; padding:.7rem .85rem; border-radius:14px; background:var(--surface-muted); text-align:center; }
.public-test-attempt-stats strong { color:var(--navy-950); font-size:1.05rem; }
.public-test-progress-card { position:sticky; top:calc(var(--header-height) + 10px); z-index:20; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:1rem; margin-bottom:1rem; padding:.8rem 1rem; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.96); box-shadow:var(--shadow-sm); backdrop-filter:blur(8px); }
.public-test-progress-card progress { width:100%; height:12px; accent-color:var(--green-600); }
.public-question-card { scroll-margin-top:150px; }
.public-test-submit-bar { position:sticky; bottom:12px; z-index:20; display:flex; justify-content:space-between; align-items:center; gap:1rem; margin-top:1.2rem; padding:1rem 1.1rem; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.97); box-shadow:0 16px 40px rgba(11,47,104,.16); }
.public-test-submit-bar > div { display:grid; gap:.2rem; }

.public-result-hero { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; padding:clamp(1.2rem,4vw,2.2rem); border-radius:24px; color:#fff; background:linear-gradient(135deg,var(--navy-950),#0f6cbf 65%,#22c55e); box-shadow:var(--shadow-md); margin-bottom:1.2rem; }
.public-result-hero h1,.public-result-hero p,.public-result-hero .eyebrow { color:#fff; }
.result-score-ring { width:170px; height:170px; flex:0 0 auto; display:flex; flex-direction:column; align-items:center; justify-content:center; border:8px solid rgba(255,255,255,.22); border-radius:50%; background:rgba(255,255,255,.12); text-align:center; }
.result-score-ring strong { font-size:2.2rem; }
.result-score-ring span { font-size:.82rem; color:rgba(255,255,255,.85); }
.result-review-list { display:grid; gap:1rem; }
.result-question-card { padding:1.1rem; border:1px solid var(--line); border-left:5px solid var(--line-strong); border-radius:17px; background:#fff; }
.result-question-card.result-correct { border-left-color:var(--green-600); }
.result-question-card.result-incorrect { border-left-color:var(--red-600); }
.result-answer-lines { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem; margin:.8rem 0; }
.result-answer-lines p { margin:0; padding:.75rem; border-radius:12px; background:var(--surface-muted); }
.explanation-box { padding:.9rem 1rem; border-radius:14px; color:var(--ink-800); background:#fff9e9; border:1px solid #f1dfac; }
.explanation-box p { margin:.4rem 0 0; }
.compact-result-review .result-question-card { padding:.9rem; }

@media (max-width:1050px) {
  .public-test-main-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .public-test-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .public-test-entry-shell { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .public-test-main-fields,.public-test-category-grid { grid-template-columns:1fr; }
  .public-test-category-allocation { grid-template-columns:1fr 82px; }
  .public-test-question-review { grid-template-columns:42px minmax(0,1fr); }
  .public-test-question-review > form { grid-column:1/-1; }
  .public-test-question-review > form .btn { width:100%; }
  .public-test-attempt-header,.public-result-hero,.public-test-submit-bar { flex-direction:column; align-items:stretch; }
  .public-test-attempt-stats { justify-content:stretch; display:grid; grid-template-columns:repeat(3,1fr); }
  .public-test-entry-metrics { grid-template-columns:1fr; }
  .public-test-progress-card { grid-template-columns:1fr; }
  .result-score-ring { align-self:center; }
  .result-answer-lines { grid-template-columns:1fr; }
  .copy-field { grid-template-columns:1fr; }
  .copy-field .btn { width:100%; }
}
@media (max-width:480px) {
  .public-test-attempt-stats { grid-template-columns:1fr; }
  .public-test-entry-summary h1 { font-size:2.2rem; }
}

/* Public Test Builder: category and subcategory allocation */
.public-test-taxonomy-allocation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.public-test-taxonomy-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.public-test-taxonomy-head {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 150px);
  gap: 1rem;
  align-items: end;
}
.public-test-taxonomy-head > div,
.public-test-subcategory-allocation > span {
  display: grid;
  gap: .2rem;
}
.public-test-taxonomy-head small,
.public-test-subcategory-allocation small {
  color: var(--ink-600);
  font-weight: 600;
}
.public-test-any-topic-input {
  gap: .32rem;
}
.public-test-subcategory-details {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: .8rem;
}
.public-test-subcategory-details summary {
  color: var(--navy-900);
  font-weight: 800;
  cursor: pointer;
}
.public-test-subcategory-grid {
  display: grid;
  gap: .65rem;
  margin-top: .8rem;
}
.public-test-subcategory-allocation {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: .75rem;
  align-items: center;
  padding: .72rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-50);
}
.public-test-subcategory-allocation input,
.public-test-any-topic-input input {
  min-height: 42px;
}
@media (max-width: 920px) {
  .public-test-taxonomy-allocation-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .public-test-taxonomy-head,
  .public-test-subcategory-allocation { grid-template-columns: 1fr; }
}

/* Rejected Questions editorial queue */
.rejected-summary-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rejected-filter-grid { display:grid; grid-template-columns: .8fr 1fr 1.5fr auto; gap:1rem; align-items:end; }
.rejected-filter-grid .form-actions-inline { display:flex; gap:.65rem; align-items:end; }
.rejected-editor-card { border-color:#f1c7c2; box-shadow:0 18px 42px rgba(165,39,31,.08); }
.rejection-reason-panel { margin:1rem 0 1.25rem; padding:1rem 1.1rem; border:1px solid #f1c7c2; border-radius:16px; background:#fff6f5; }
.rejection-reason-panel strong { color:#a61b14; }
.rejection-reason-panel p { margin:.35rem 0; color:var(--ink-800); }
.rejected-question-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.rejected-question-form .span-2 { grid-column:1 / -1; }
.rejected-editor-actions { padding-top:.35rem; }
.rejected-delete-form { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--line); }
.rejected-question-list { display:grid; gap:.85rem; }
.rejected-question-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1rem; align-items:center; padding:1rem; border:1px solid var(--line); border-radius:18px; background:#fff; }
.rejected-question-row.is-selected { border-color:#0f6cbf; box-shadow:0 0 0 3px rgba(15,108,191,.1); }
.rejected-question-main h3 { margin:.45rem 0; font-size:1rem; line-height:1.5; }
.rejected-reason-text { margin:.2rem 0 .45rem; color:#9a2a23; font-size:.9rem; }
.rejected-question-actions { display:flex; align-items:center; }
.status-badge.status-pending { color:#8a4b00; background:#fff4d7; }
.status-badge.status-restored { color:#176b34; background:#eaf9ef; }
@media (max-width:1000px) { .rejected-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .rejected-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:680px) { .rejected-summary-grid,.rejected-filter-grid,.rejected-question-form { grid-template-columns:1fr; } .rejected-question-form .span-2 { grid-column:auto; } .rejected-question-row { grid-template-columns:1fr; } .rejected-question-actions .btn { width:100%; } .rejected-filter-grid .form-actions-inline { display:grid; grid-template-columns:1fr 1fr; } }

/* Public test timer and mobile-resume controls */
.public-test-entry-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.public-test-timer-pill {
  min-width: 150px !important;
  background: linear-gradient(135deg, #eef6ff, #f5f0ff) !important;
  border: 1px solid #c8d8ef;
}
.public-test-timer-pill strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.public-test-timer-pill.timer-warning {
  background: linear-gradient(135deg, #fff5ed, #fff0f0) !important;
  border-color: #f1b9ae;
  animation: public-timer-pulse 1.8s ease-in-out infinite;
}
.public-test-timer-pill.timer-warning strong { color: var(--red-700); }
.public-timer-guidance { margin-bottom: 1rem; }
@keyframes public-timer-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(196,50,42,0); }
  50% { box-shadow: 0 0 0 5px rgba(196,50,42,.08); }
}
@media (max-width: 900px) {
  .public-test-entry-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .public-test-entry-metrics { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .public-test-timer-pill.timer-warning { animation: none; }
}

/* Academy / Institute portal */
.academy-role-badge { background: #ede9fe; color: #5b21b6; }
.academy-page-hero { align-items: center; }
.academy-page-logo,
.academy-profile-logo {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  padding: .55rem;
  box-shadow: var(--shadow-sm);
}
.academy-list-logo { width: 48px; height: 48px; object-fit: contain; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.academy-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.academy-action-grid .action-card { text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.academy-action-grid .action-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.academy-question-tools { align-items: start; }
.academy-allocation-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; margin: 1rem 0; }
.academy-selection-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--blue-50); }
.academy-manual-question-list { display: grid; gap: .65rem; max-height: 520px; overflow: auto; padding-right: .25rem; }
.academy-manual-question { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .75rem; padding: .8rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.academy-manual-question input { width: 20px; min-height: 20px; margin-top: .15rem; }
.academy-manual-question span { display: grid; gap: .28rem; }
.academy-manual-question small { color: var(--ink-600); }
.public-test-brand-banner { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg,#f7fbff,#f2fff7); box-shadow: var(--shadow-xs); }
.public-test-brand-banner img { width: 64px; height: 64px; object-fit: contain; border-radius: 16px; background: #fff; border: 1px solid var(--line); padding: .3rem; }
.public-test-brand-banner div { display: grid; }
.public-test-brand-banner strong { color: var(--navy-950); font-size: 1.1rem; }
.public-test-brand-banner span { color: var(--ink-600); font-size: .84rem; }
.academy-auth .auth-card { border-top: 5px solid #7c3aed; }

@media (max-width: 980px) {
  .academy-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .academy-allocation-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .academy-page-hero { align-items: flex-start; }
  .academy-page-logo { width: 84px; height: 84px; }
  .academy-metrics,
  .academy-allocation-grid { grid-template-columns: 1fr; }
  .public-test-brand-banner { align-items: flex-start; }
}

/* Admin navigation containment: use a compact menu instead of overflowing the header. */
.role-admin .header-inner { min-width: 0; }
.role-admin .brand-link { min-width: 0; }
.role-admin .brand-text { min-width: 0; }
.role-admin .brand-text strong,
.role-admin .brand-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-admin .header-controls { margin-left: auto; }
.role-admin .nav-toggle { display: inline-flex; }
.role-admin .primary-nav {
  position: fixed;
  top: calc(var(--header-height) + .65rem);
  right: max(1rem, calc((100vw - var(--content-width)) / 2));
  left: auto;
  width: min(440px, calc(100vw - 2rem));
  max-height: calc(100vh - var(--header-height) - 1.3rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .45rem;
  margin: 0;
  padding: .85rem;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,.99);
  box-shadow: 0 22px 58px rgba(7,27,58,.18);
  transform: translateY(-10px) scale(.98);
  transform-origin: top right;
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .16s ease;
}
.role-admin.nav-open .primary-nav {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.role-admin .primary-nav a {
  min-width: 0;
  min-height: 46px;
  justify-content: flex-start;
  padding: .68rem .78rem;
  border: 1px solid transparent;
  background: var(--surface-soft);
  white-space: normal;
  line-height: 1.25;
}
.role-admin .primary-nav a:hover { border-color: var(--line-strong); }
.role-admin .primary-nav a.active { border-color: #bfd3ec; }
.role-admin .primary-nav a.active::after { display: none; }
.role-admin .primary-nav .nav-logout { grid-column: 1 / -1; justify-content: center; }

/* Public-test question heading: prevent the question label from escaping its box. */
.public-question-card .public-question-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem;
  margin-bottom: .9rem;
}
.public-question-index {
  min-width: 0;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .52rem .82rem;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--navy-800), #0f6cbf);
  box-shadow: 0 7px 16px rgba(11,47,104,.14);
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}
.public-question-category { max-width: 100%; overflow-wrap: anywhere; }

/* Simplified Public Test Builder: mirrors the student category/topic/count table. */
.public-test-category-section {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
}
.public-builder-head { padding: 1.15rem 1.25rem; }
.public-builder-head h3 { margin: .2rem 0 .35rem; }
.public-allocation-wrap { margin: 0; border: 0; border-radius: 0; }
.public-allocation-table th:nth-child(1) { width: 29%; }
.public-allocation-table th:nth-child(2) { width: 41%; }
.public-allocation-table th:nth-child(3) { width: 17%; }
.public-allocation-table th:nth-child(4) { width: 13%; }
.public-allocation-table td { vertical-align: middle; }
.public-allocation-table select,
.public-allocation-table input { min-width: 0; }
.public-allocation-remove { width: 100%; color: var(--red-700); }
.public-allocation-actions {
  padding: .9rem 1.25rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}
.public-allocation-actions .form-message { flex: 1; }
.public-test-create-actions { align-items: center; }

@media (max-width: 700px) {
  .role-admin .primary-nav {
    top: var(--header-height);
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--header-height));
    grid-template-columns: 1fr;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0 0 18px 18px;
    transform: translateY(-110%);
    transform-origin: top center;
  }
  .role-admin.nav-open .primary-nav { transform: translateY(0); }
  .role-admin .primary-nav .nav-logout { grid-column: auto; }
  .public-question-card .public-question-heading { align-items: flex-start; }
  .public-question-index { font-size: .78rem; }
  .public-question-category { white-space: normal; }
  .public-builder-head { padding: 1rem; }
  .public-builder-head .btn { width: 100%; }
  .public-allocation-table,
  .public-allocation-table thead,
  .public-allocation-table tbody,
  .public-allocation-table th,
  .public-allocation-table td,
  .public-allocation-table tr { display: block; width: 100%; }
  .public-allocation-table thead { display: none; }
  .public-allocation-table tr { padding: .9rem; border-bottom: 1px solid var(--line); }
  .public-allocation-table tr:last-child { border-bottom: 0; }
  .public-allocation-table td { padding: .35rem 0; border: 0; }
  .public-allocation-table td::before {
    display: block;
    margin-bottom: .25rem;
    color: var(--ink-500);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
    content: attr(data-label);
  }
  .public-allocation-actions { display: grid; grid-template-columns: 1fr; padding: 1rem; }
  .public-allocation-actions .btn { width: 100%; }
}

/* Institute Google Forms importer */
.academy-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.25rem;
}
.academy-import-card { margin-bottom: 0; }
.google-form-import-card {
  border-color: #c7d9f0;
  background: linear-gradient(145deg, #ffffff, #f5f9ff);
}
.google-form-preview-card { border-color: #b9d7c2; }
.google-form-defaults { grid-template-columns: repeat(2, minmax(0,1fr)); }
.google-form-preview-toolbar { padding: .8rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.google-form-question-list {
  display: grid;
  gap: 1rem;
  max-height: 72vh;
  overflow-y: auto;
  padding: .2rem .25rem .2rem 0;
}
.google-form-question-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
  transition: opacity .16s ease, border-color .16s ease, background .16s ease;
}
.google-form-question-card.is-not-selected { opacity: .55; background: #f7f9fc; }
.google-form-question-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .8rem; }
.google-form-question-card h3 { margin-bottom: .7rem; font-size: 1rem; line-height: 1.55; }
.google-form-options { margin: 0 0 .9rem 1.5rem; display: grid; gap: .4rem; }
.google-form-answer-select { max-width: 240px; }
.google-form-import-actions { align-items: center; }

@media (max-width: 820px) {
  .academy-import-grid, .google-form-defaults { grid-template-columns: 1fr; }
  .google-form-question-head { align-items: flex-start; }
}

/* Google Forms OAuth institute import */
.google-oauth-import-card { border-color: #c9d9ef; background: linear-gradient(145deg, #ffffff, #f6f9ff); }
.google-oauth-heading { align-items: center; }
.oauth-redirect-uri { margin-top: .75rem; display: grid; gap: .35rem; }
.oauth-redirect-uri span { font-size: .84rem; font-weight: 800; }
.oauth-redirect-uri code { display: block; overflow-wrap: anywhere; padding: .65rem .75rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--navy-900); }
.google-oauth-connect-row,
.google-oauth-connected-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.google-oauth-connect-row p,
.google-oauth-connected-row p { margin: .3rem 0 0; }
.google-api-import-form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; }
.google-form-review-fields { margin-top: 1rem; display: grid; grid-template-columns: minmax(180px,.35fr) auto minmax(0,1fr); gap: 1rem; align-items: start; }
.google-form-points { align-self: end; margin-bottom: .55rem; }
.google-form-explanation-field { grid-column: 3; }
@media (max-width: 780px) {
  .google-oauth-connect-row,
  .google-oauth-connected-row { align-items: stretch; flex-direction: column; }
  .google-api-import-form { grid-template-columns: 1fr; }
  .google-form-review-fields { grid-template-columns: 1fr; }
  .google-form-explanation-field { grid-column: auto; }
  .google-form-points { justify-self: start; margin: 0; }
}


.oauth-config-diagnostics {
  margin-top: .85rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem .9rem;
  color: #6d4b00;
  font-size: .88rem;
}
.oauth-config-diagnostics span {
  padding: .55rem .7rem;
  border: 1px solid rgba(180,120,0,.18);
  border-radius: 10px;
  background: rgba(255,255,255,.46);
}
@media (max-width: 680px) {
  .oauth-config-diagnostics { grid-template-columns: 1fr; }
}

/* Institute import-batch public test builder */
.academy-batch-panel { background: linear-gradient(145deg, #f8fbff, #eef5ff); }
.academy-batch-list { display: grid; gap: 1rem; }
.academy-batch-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; transition: border-color .16s ease, box-shadow .16s ease; }
.academy-batch-card.is-selected { border-color: #356fbd; box-shadow: 0 0 0 3px rgba(53,111,189,.1); }
.academy-batch-card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem; }
.academy-batch-selector { flex: 1; align-items: flex-start; }
.academy-batch-selector span { display: grid; gap: .25rem; }
.academy-batch-selector small { color: var(--muted); font-weight: 500; }
.academy-batch-questions { border-top: 1px solid var(--line); }
.academy-batch-questions > summary { cursor: pointer; padding: .8rem 1rem; font-weight: 800; background: #f8fafc; }
.academy-batch-actions { padding: .75rem 1rem 0; }
.academy-batch-question-list { max-height: 430px; overflow: auto; padding: .75rem 1rem 1rem; display: grid; gap: .5rem; }
.academy-batch-question-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: .75rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.academy-batch-question-row span { display: grid; gap: .2rem; }
.academy-batch-question-row strong { font-size: .92rem; line-height: 1.45; }
.academy-batch-question-row small { color: var(--muted); }
.academy-batch-question-row em { font-style: normal; color: #9f1d20; font-size: .8rem; font-weight: 800; }

/* Main-admin Excel-like MCQ workbook */
.admin-workbook-hero { align-items: end; }
.admin-workbook-category { min-width: min(100%, 360px); }
.admin-workbook-shell { overflow: hidden; }
.admin-workbook-toolbar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.admin-workbook-search-row { margin-left: auto; }
.admin-workbook-search-row input { min-width: min(320px, 75vw); }
.admin-workbook-help { margin: 0; }
.admin-workbook-tabs { display: flex; gap: .35rem; overflow-x: auto; padding: .45rem .45rem 0; border-bottom: 1px solid #aebfd6; background: #e9eff7; scrollbar-width: thin; }
.admin-workbook-tab { flex: 0 0 auto; min-width: 145px; max-width: 260px; display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding: .7rem .85rem; border: 1px solid #bdcbe0; border-bottom: 0; border-radius: 10px 10px 0 0; background: #dfe8f4; color: #203c62; font-weight: 800; cursor: pointer; }
.admin-workbook-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-workbook-tab small { padding: .13rem .4rem; border-radius: 999px; background: rgba(255,255,255,.7); }
.admin-workbook-tab.active { position: relative; top: 1px; background: #fff; color: var(--navy-900); border-color: #8fa8c8; }
.admin-workbook-sheet-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-workbook-sheet-head h2 { margin: .15rem 0 0; }
.admin-workbook-loading { padding: .75rem 1rem; border-radius: 10px; background: #eef5ff; font-weight: 800; }
.admin-workbook-grid-wrap { width: 100%; max-height: 72vh; overflow: auto; border: 1px solid #9fb1c8; background: #fff; }
.admin-workbook-grid { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .82rem; }
.admin-workbook-grid th,
.admin-workbook-grid td { border-right: 1px solid #c4cfdd; border-bottom: 1px solid #c4cfdd; padding: .35rem; vertical-align: top; background: #fff; }
.admin-workbook-grid th { position: sticky; top: 0; z-index: 4; background: #dbe7f5; color: #17365e; text-align: center; white-space: nowrap; }
.admin-workbook-grid th:first-child,
.admin-workbook-grid td:first-child { position: sticky; left: 0; z-index: 3; background: #edf3fa; }
.admin-workbook-grid th:first-child { z-index: 6; }
.admin-workbook-grid tr.is-dirty td { background: #fff9dc; }
.admin-workbook-grid tr.is-saving td { opacity: .7; }
.admin-workbook-grid textarea,
.admin-workbook-grid input:not([type="checkbox"]),
.admin-workbook-grid select { width: 100%; min-width: 135px; border: 1px solid transparent; border-radius: 4px; padding: .42rem .48rem; background: transparent; font: inherit; line-height: 1.35; resize: vertical; }
.admin-workbook-grid textarea:focus,
.admin-workbook-grid input:not([type="checkbox"]):focus,
.admin-workbook-grid select:focus { outline: 2px solid #4f82c2; border-color: #4f82c2; background: #fff; }
.admin-workbook-grid .workbook-stem { min-width: 310px; }
.admin-workbook-grid .workbook-explanation { min-width: 280px; }
.workbook-select-col { width: 42px; text-align: center; }
.workbook-id-cell { min-width: 64px; text-align: center; font-weight: 800; }
.workbook-source-cell { min-width: 165px; max-width: 220px; }
.workbook-source-cell strong,
.workbook-source-cell small { display: block; overflow-wrap: anywhere; }
.workbook-source-cell small { margin-top: .25rem; color: var(--muted); }
.workbook-actions-cell { min-width: 125px; display: grid; gap: .4rem; }
.workbook-actions-cell small { min-height: 1.1rem; color: var(--muted); font-weight: 700; }

@media (max-width: 820px) {
  .academy-batch-card-head { align-items: flex-start; }
  .academy-batch-question-row { grid-template-columns: auto minmax(0,1fr); }
  .academy-batch-question-row em { grid-column: 2; }
  .admin-workbook-category { width: 100%; }
  .admin-workbook-toolbar { align-items: stretch; }
  .admin-workbook-search-row { margin-left: 0; width: 100%; }
  .admin-workbook-search-row input { flex: 1; min-width: 0; }
  .admin-workbook-grid-wrap { max-height: 68vh; }
}

/* Academy/public test result answer highlighting */
.result-option-list li{padding:.72rem .9rem;border-radius:12px;margin:.35rem 0;border:1px solid transparent}
.result-option-list .result-option-correct{background:#ecfdf3;border-color:#86efac;color:#14532d}
.result-option-list .result-option-selected-wrong{background:#fff1f2;border-color:#fda4af;color:#881337}
.result-no-explanation{margin-top:1rem;padding:.85rem 1rem;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc}

/* Academy UX refresh: imports and test creation */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.btn:disabled { opacity: .52; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.academy-hero-actions { justify-content: flex-end; }
.academy-help-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: .4rem .72rem;
  border: 1px solid #c9d9ee;
  border-radius: 999px;
  background: #f6f9ff;
  color: #34557c;
  font-size: .8rem;
  font-weight: 800;
  white-space: nowrap;
}

.academy-workflow-strip {
  display: grid;
  grid-template-columns: auto minmax(32px,1fr) auto minmax(32px,1fr) auto;
  align-items: center;
  gap: .75rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.academy-workflow-step { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.academy-workflow-step > span {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border: 1px solid #c6d3e3;
  border-radius: 50%;
  background: #f7f9fc;
  color: #57708f;
  font-size: .82rem;
  font-weight: 900;
}
.academy-workflow-step.is-current > span { border-color: #2f6ec2; background: #2f6ec2; color: #fff; }
.academy-workflow-step div { display: grid; gap: .05rem; min-width: 0; }
.academy-workflow-step strong { color: var(--navy-950); font-size: .9rem; line-height: 1.2; }
.academy-workflow-step small { color: var(--muted); font-size: .75rem; line-height: 1.25; }
.academy-workflow-line { height: 1px; background: #d5dfeb; }

.academy-import-hub { padding: 1.25rem; }
.academy-import-hub-head { align-items: flex-start; }
.academy-import-methods { display: grid; gap: .8rem; }
.academy-import-method {
  border: 1px solid #d2dce8;
  border-radius: 16px;
  background: #fff;
  overflow: clip;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.academy-import-method[open] { border-color: #9ebbe1; box-shadow: 0 8px 28px rgba(29,63,105,.08); }
.academy-import-method > summary {
  list-style: none;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: 1rem;
  cursor: pointer;
  user-select: none;
}
.academy-import-method > summary::-webkit-details-marker { display: none; }
.academy-import-method > summary::after {
  content: '›';
  grid-column: 4;
  color: #587292;
  font-size: 1.55rem;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform .16s ease;
}
.academy-import-method[open] > summary::after { transform: rotate(-90deg); }
.academy-import-method > summary > span:nth-child(2) { display: grid; gap: .18rem; min-width: 0; }
.academy-import-method > summary strong { color: var(--navy-950); font-size: 1rem; }
.academy-import-method > summary small { color: var(--muted); font-weight: 500; }
.academy-method-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eef5ff;
  color: #1f5ca8;
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: -.02em;
}
.academy-method-tag {
  display: inline-flex;
  padding: .32rem .58rem;
  border-radius: 999px;
  background: #e7f7ec;
  color: #166534;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}
.academy-method-tag.is-neutral { background: #edf3fb; color: #34557c; }
.academy-method-tag.is-success { background: #e7f7ec; color: #166534; }
.academy-method-tag.is-warning { background: #fff4d8; color: #8a5b00; }
.academy-import-method-body {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg,#fbfdff,#fff);
}
.academy-method-guidance {
  display: grid;
  gap: .2rem;
  padding: .75rem .85rem;
  border-left: 3px solid #76a5df;
  border-radius: 8px;
  background: #f4f8fd;
}
.academy-method-guidance strong { color: #254b78; font-size: .82rem; }
.academy-method-guidance span { color: #526980; font-size: .86rem; line-height: 1.45; }
.academy-method-actions { align-items: center; }
.academy-file-field input[type="file"] { padding: .55rem; background: #fff; }
.academy-tech-details { margin-top: .8rem; }
.academy-tech-details > summary { cursor: pointer; font-weight: 800; }
.academy-oauth-warning { margin: 0; }

.academy-preview-heading { align-items: flex-start; }
.academy-preview-defaults {
  display: grid;
  grid-template-columns: minmax(220px,.7fr) minmax(0,1.3fr);
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.academy-preview-defaults p { margin: .25rem 0 0; }
.academy-preview-toolbar {
  position: sticky;
  top: calc(var(--header-height) + .5rem);
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem;
  border: 1px solid #d6e0ec;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 22px rgba(31,55,84,.08);
  backdrop-filter: blur(8px);
}
.academy-preview-status { display: flex; gap: .5rem; flex-wrap: wrap; }
.academy-preview-status > span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .38rem .6rem;
  border-radius: 999px;
  background: #edf7f1;
  color: #225b38;
  font-size: .8rem;
}
.academy-preview-status > span.has-warning { background: #fff2dc; color: #8a5200; }
.academy-preview-controls { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.academy-inline-search input { min-width: min(280px,70vw); margin: 0; }
.google-form-question-card:not(.is-not-selected) { border-color: #c9d9eb; }
.google-form-question-card.is-not-selected { filter: grayscale(.15); }
.google-form-question-card[hidden] { display: none !important; }
.google-form-answer-select { max-width: none; }
.google-form-answer-select select { min-width: 260px; }
.academy-preview-submitbar {
  position: sticky;
  bottom: .75rem;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid #b8cbe2;
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 34px rgba(20,45,78,.14);
  backdrop-filter: blur(8px);
}
.academy-preview-submitbar > div { display: grid; gap: .15rem; }

.academy-single-question { padding: 0; overflow: clip; }
.academy-single-question > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
}
.academy-single-question > summary::-webkit-details-marker { display: none; }
.academy-single-question > summary > span:first-child { display: grid; gap: .18rem; }
.academy-single-question > summary small { color: var(--muted); font-weight: 500; }
.academy-summary-action { color: #2f68ad; font-size: .8rem; font-weight: 900; }
.academy-single-question-form { padding: 1.15rem; border-top: 1px solid var(--line); }
.academy-bank-heading { align-items: center; }
.academy-question-id { display: inline-flex; margin-right: .45rem; color: #56708f; font-size: .78rem; }
.academy-question-stem { font-weight: 650; color: var(--navy-950); }
.academy-option-details { margin-top: .55rem; }
.academy-option-details summary { cursor: pointer; color: #2d619e; font-weight: 800; font-size: .82rem; }
.academy-option-details ol { margin-bottom: .5rem; }
.academy-empty-state { display: grid; justify-items: center; gap: .45rem; text-align: center; }
.academy-empty-state strong { color: var(--navy-950); font-size: 1.05rem; }
.academy-empty-state span { max-width: 620px; color: var(--muted); }

.academy-test-builder-card { padding: 0; overflow: clip; }
.academy-builder-heading { padding: 1.25rem 1.25rem 0; align-items: flex-start; }
.academy-test-form { display: grid; }
.academy-builder-step { padding: 1.25rem; border-top: 1px solid #e1e8f0; }
.academy-builder-step:first-of-type { border-top: 0; }
.academy-builder-step-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.academy-builder-step-head h3 { margin: 0; font-size: 1.12rem; }
.academy-builder-step-head p { margin: .2rem 0 0; }
.academy-builder-step-number {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9f2ff;
  color: #1f5da9;
  font-size: .8rem;
  font-weight: 900;
}
.academy-builder-basics { grid-template-columns: repeat(2,minmax(0,1fr)); }
.academy-builder-basics label { align-self: start; }
.academy-selection-panel { padding: 1.05rem; border-radius: 16px; }
.academy-selection-count {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: .42rem .72rem;
  border-radius: 999px;
  background: #e9f2ff;
  color: #1d579d;
  font-size: .8rem;
  font-weight: 900;
  white-space: nowrap;
}
.academy-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .9rem;
  padding: .65rem;
  border: 1px solid #d8e2ee;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
}
.academy-batch-card[hidden], .academy-manual-question[hidden], .academy-selected-question[hidden] { display: none !important; }
.academy-batch-card-head { padding: .9rem 1rem; }
.academy-batch-selector input { margin-top: .18rem; }
.academy-batch-meta { display: grid; justify-items: end; gap: .25rem; }
.academy-batch-included { color: #526a83; font-size: .75rem; font-weight: 800; }
.academy-batch-card:not(.is-selected) .academy-batch-included { opacity: .55; }
.academy-batch-questions > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
}
.academy-batch-questions > summary::-webkit-details-marker { display: none; }
.academy-batch-questions > summary::after { content: 'Review'; color: #315f97; font-size: .75rem; font-weight: 800; }
.academy-batch-questions[open] > summary::after { content: 'Hide'; }
.academy-batch-questions > summary span { font-weight: 850; }
.academy-batch-questions > summary small { margin-left: auto; color: var(--muted); font-weight: 500; }
.academy-batch-actions { align-items: center; }
.academy-batch-question-row:has(input:checked) { border-color: #f1b4b8; background: #fff8f8; }
.academy-allocation-head, .academy-manual-head { align-items: flex-start; }
.academy-allocation-grid label {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .12rem .6rem;
  align-items: center;
  padding: .72rem;
  border: 1px solid #d6e0eb;
  border-radius: 12px;
  background: #fff;
}
.academy-allocation-grid label > span { font-weight: 800; color: var(--navy-950); }
.academy-allocation-grid label > small { grid-column: 1; color: var(--muted); }
.academy-allocation-grid label > input { grid-column: 2; grid-row: 1 / span 2; width: 88px; margin: 0; }
.academy-subcategory-allocation { margin-top: .8rem; border-top: 1px solid #dce5ef; padding-top: .8rem; }
.academy-subcategory-allocation > summary { cursor: pointer; font-weight: 850; color: #2f5887; }
.academy-subcategory-allocation > summary small { color: var(--muted); font-weight: 500; margin-left: .3rem; }
.academy-allocation-feedback {
  margin-top: .8rem;
  padding: .7rem .8rem;
  border-radius: 10px;
  background: #f4f7fb;
  color: #526a83;
  font-size: .84rem;
  font-weight: 750;
}
.academy-allocation-feedback.is-good { background: #edf9f1; color: #176534; }
.academy-allocation-feedback.is-warning { background: #fff6e4; color: #8a5a00; }
.academy-manual-question { transition: border-color .15s ease, background .15s ease; }
.academy-manual-question:has(input:checked) { border-color: #8eb4e4; background: #f5f9ff; }
.academy-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.academy-setting-card {
  display: grid;
  gap: .75rem;
  padding: .9rem;
  border: 1px solid #d8e2ee;
  border-radius: 14px;
  background: #fbfcfe;
}
.academy-setting-toggle { align-items: flex-start; margin: 0; }
.academy-setting-toggle input { margin-top: .2rem; }
.academy-setting-toggle span { display: grid; gap: .15rem; }
.academy-setting-toggle small { color: var(--muted); font-weight: 500; }
.academy-setting-input { margin: 0; padding-left: 2rem; }
.academy-setting-input[hidden] { display: none !important; }
.academy-create-summary {
  position: sticky;
  bottom: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.25rem;
  border-top: 1px solid #bccde1;
  background: rgba(255,255,255,.97);
  box-shadow: 0 -8px 28px rgba(24,55,94,.09);
  backdrop-filter: blur(9px);
}
.academy-create-summary-text { display: grid; gap: .15rem; min-width: 0; }
.academy-create-summary-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy-950); }
.academy-create-summary-text span { color: var(--muted); font-size: .84rem; }
.academy-create-summary-text b { color: #315d93; }
.academy-create-test-button { min-width: 170px; }
.academy-tests-list-card { margin-top: 1.25rem; }
.academy-test-row-actions { align-items: center; }

.academy-test-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding: .85rem 1rem;
  border: 1px solid #d3deea;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.academy-test-status-bar > div { display: flex; align-items: center; gap: .8rem; }
.academy-test-status-bar > div > div { display: grid; gap: .1rem; }
.academy-test-status-bar small { color: var(--muted); }
.academy-test-management-grid { align-items: start; }
.academy-settings-card { align-content: start; }
.academy-publish-card { position: sticky; top: calc(var(--header-height) + 1rem); }
.academy-share-link-box { padding: .85rem; border: 1px solid #c8d8ea; border-radius: 14px; background: #f7fbff; }
.academy-copy-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .5rem; align-items: center; }
.academy-copy-field input { margin: 0; }
.academy-status-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.academy-status-actions form { margin: 0; }
.academy-danger-zone { margin-top: .35rem; border-top: 1px solid #ead1d1; padding-top: .7rem; }
.academy-danger-zone > summary { cursor: pointer; color: #a32727; font-weight: 850; }
.academy-danger-zone > div { margin-top: .75rem; padding: .8rem; border: 1px solid #f0caca; border-radius: 12px; background: #fff7f7; }
.academy-danger-zone p { margin-top: 0; }
.academy-selected-questions-card .academy-inline-search { margin-left: auto; }
.academy-selected-question { scroll-margin-top: calc(var(--header-height) + 1rem); }
.academy-question-review-footer { align-items: center; }

@media (max-width: 980px) {
  .academy-preview-defaults { grid-template-columns: 1fr; }
  .academy-settings-grid { grid-template-columns: 1fr; }
  .academy-publish-card { position: static; }
}

@media (max-width: 760px) {
  .academy-workflow-strip { grid-template-columns: 1fr; gap: .55rem; }
  .academy-workflow-line { display: none; }
  .academy-workflow-step { padding: .2rem 0; }
  .academy-workflow-step small { display: none; }
  .academy-import-method > summary { grid-template-columns: auto minmax(0,1fr) auto; gap: .65rem; }
  .academy-import-method > summary::after { grid-column: 3; grid-row: 1; }
  .academy-method-tag { grid-column: 2 / 4; justify-self: start; }
  .academy-preview-toolbar { position: static; align-items: stretch; flex-direction: column; }
  .academy-preview-controls { justify-content: stretch; }
  .academy-inline-search { width: 100%; }
  .academy-inline-search input { width: 100%; min-width: 0; }
  .academy-preview-submitbar { bottom: .4rem; align-items: stretch; flex-direction: column; }
  .academy-preview-submitbar .btn { width: 100%; }
  .google-form-answer-select select { min-width: 0; }
  .academy-builder-basics { grid-template-columns: 1fr; }
  .academy-builder-basics .span-2 { grid-column: 1; }
  .academy-selection-toolbar { align-items: stretch; flex-direction: column; }
  .academy-selection-toolbar > .row { width: 100%; }
  .academy-selection-toolbar .btn { flex: 1; }
  .academy-batch-card-head { display: grid; grid-template-columns: 1fr; }
  .academy-batch-meta { grid-template-columns: auto 1fr; align-items: center; justify-items: start; padding-left: 2rem; }
  .academy-batch-questions > summary { align-items: flex-start; flex-direction: column; gap: .2rem; }
  .academy-batch-questions > summary small { margin-left: 0; }
  .academy-batch-questions > summary::after { position: absolute; right: 1rem; }
  .academy-create-summary { align-items: stretch; flex-direction: column; }
  .academy-create-test-button { width: 100%; }
  .academy-test-status-bar { align-items: stretch; flex-direction: column; }
  .academy-copy-field { grid-template-columns: 1fr; }
  .academy-status-actions { display: grid; grid-template-columns: 1fr; }
  .academy-status-actions form, .academy-status-actions .btn { width: 100%; }
  .academy-bank-heading { align-items: stretch; flex-direction: column; }
  .academy-bank-heading > .row { width: 100%; }
  .academy-bank-heading form { flex: 1; }
}

@media (max-width: 560px) {
  .academy-hero-actions { width: 100%; }
  .academy-hero-actions .btn { flex: 1; text-align: center; justify-content: center; }
  .academy-import-hub { padding: .9rem; }
  .academy-import-method > summary { padding: .85rem; }
  .academy-import-method-body { padding: .85rem; }
  .academy-method-icon { width: 36px; height: 36px; }
  .academy-builder-heading, .academy-builder-step, .academy-create-summary { padding-left: .9rem; padding-right: .9rem; }
  .academy-allocation-grid { grid-template-columns: 1fr; }
  .academy-batch-question-list { padding-left: .65rem; padding-right: .65rem; }
}

/* Academy banner branding */
.academy-banner-settings-card { margin-bottom: 1rem; overflow: hidden; }
.academy-banner-settings-head { align-items: flex-start; }
.academy-banner-editor-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.75fr); gap: 1.25rem; align-items: start; }
.academy-banner-preview-shell {
  position: relative;
  aspect-ratio: 4 / 1;
  overflow: hidden;
  border: 1px solid #d5e0ec;
  border-radius: 16px;
  background: linear-gradient(135deg,#eef4fb,#f7fafc);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.academy-banner-preview { width: 100%; height: 100%; display: block; object-fit: cover; }
.academy-banner-placeholder { width: 100%; height: 100%; display: grid; place-content: center; gap: .35rem; padding: 1.25rem; text-align: center; color: #5f748c; }
.academy-banner-placeholder strong { color: var(--navy-950); font-size: 1.05rem; }
.academy-banner-placeholder span { max-width: 620px; font-size: .86rem; }
.academy-banner-controls { min-width: 0; }
.academy-banner-guidance { display: grid; gap: .3rem; padding: .85rem; border: 1px solid #d8e5f2; border-radius: 12px; background: #f5f9ff; }
.academy-banner-guidance strong { color: #174f8d; }
.academy-banner-guidance span { color: #58708a; font-size: .84rem; line-height: 1.5; }
.academy-banner-process-status { min-height: 42px; padding: .65rem .75rem; border-radius: 10px; background: #f5f7fa; color: #60758a; font-size: .82rem; line-height: 1.45; }
.academy-banner-process-status.is-processing { background: #fff7e5; color: #855900; }
.academy-banner-process-status.is-ready { background: #edf9f1; color: #176534; }
.academy-banner-process-status.is-error { background: #fff0f0; color: #9b2424; }

.public-test-academy-banner {
  width: 100%;
  aspect-ratio: 4 / 1;
  margin-bottom: .8rem;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #eef3f8;
  box-shadow: var(--shadow-xs);
}
.public-test-academy-banner img { width: 100%; height: 100%; display: block; object-fit: cover; }

@media (max-width: 900px) {
  .academy-banner-editor-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .academy-banner-settings-card { padding: 1rem; }
  .academy-banner-settings-head { gap: .65rem; }
  .academy-banner-settings-head .pill { align-self: flex-start; }
  .academy-banner-preview-shell,
  .public-test-academy-banner { border-radius: 12px; }
}

/* Newspaper-to-job publishing workflow */
.job-newspaper-publisher { margin-bottom: 1.25rem; overflow: hidden; }
.job-publisher-head { align-items: flex-start; gap: 1rem; }
.job-publisher-form { gap: 0; border-top: 1px solid #e5edf5; margin-top: 1rem; }
.job-publisher-step { display: grid; grid-template-columns: 46px minmax(0,1fr); gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid #e5edf5; }
.job-publisher-step:last-child { border-bottom: 0; padding-bottom: 0; }
.job-publisher-step .step-number { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #0b2f68; color: #fff; font-weight: 800; box-shadow: 0 6px 18px rgba(11,47,104,.18); }
.job-publisher-step .step-body { min-width: 0; }
.job-publisher-step h3 { margin: 0 0 .25rem; }
.job-upload-grid { display: grid; grid-template-columns: minmax(260px,.72fr) minmax(300px,1.28fr); gap: 1rem; margin-top: 1rem; }
.job-drop-zone { min-height: 210px; border: 2px dashed #9fb7cf; border-radius: 16px; display: grid; place-content: center; gap: .5rem; text-align: center; padding: 1.25rem; background: #f7fbff; cursor: pointer; transition: .2s ease; }
.job-drop-zone:hover { border-color: #2b69a8; background: #f0f7ff; transform: translateY(-1px); }
.job-drop-zone input { width: 100%; }
.job-drop-zone strong { color: var(--navy-950); font-size: 1.05rem; }
.job-drop-zone span { color: #61778f; font-size: .86rem; }
.job-image-preview-shell { min-height: 260px; max-height: 420px; border: 1px solid #d9e4ef; border-radius: 16px; overflow: hidden; background: #f1f5f8; display: grid; place-items: center; }
.job-image-preview-shell img { width: 100%; height: 100%; max-height: 420px; object-fit: contain; display: block; background: #fff; }
.job-image-placeholder { color: #6b7f94; text-align: center; padding: 1rem; }
.job-upload-tools { display: grid; grid-template-columns: minmax(180px,240px) auto minmax(240px,1fr); gap: .85rem; align-items: end; margin-top: 1rem; }
.job-upload-tools label { margin: 0; }
.job-processing-status { min-height: 44px; display: flex; align-items: center; padding: .7rem .85rem; border-radius: 11px; background: #f4f7fa; color: #5f7489; font-size: .84rem; line-height: 1.45; }
.job-processing-status.is-processing { background: #fff7e6; color: #7a5500; }
.job-processing-status.is-ready { background: #edf9f1; color: #176534; }
.job-processing-status.is-error { background: #fff0f0; color: #9b2424; }
.job-ocr-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e6edf4; margin-top: .7rem; }
.job-ocr-progress span { display: block; width: 0; height: 100%; background: #1f65aa; border-radius: inherit; transition: width .18s ease; }
.job-review-step { scroll-margin-top: 90px; }
.job-review-grid { margin-top: .25rem; }
.job-review-grid textarea { resize: vertical; }
.job-review-actions { justify-content: flex-end; padding-top: .25rem; }
.job-review-note { padding: .7rem .8rem; border-radius: 10px; background: #f7f9fb; color: #63778b; font-size: .82rem; }
.content-job-details { border: 1px solid #dde7f1; border-radius: 12px; padding: .8rem; background: #f9fbfd; }
.content-job-details summary { cursor: pointer; font-weight: 750; color: var(--navy-950); }
.content-job-details-grid { margin-top: .9rem; }
.admin-job-image-preview { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; border: 1px solid #dbe5ee; background: #fff; }

/* Date-wise public jobs */
.job-date-list { gap: 1.5rem; }
.job-date-group { display: grid; gap: .8rem; }
.job-date-heading { display: flex; align-items: baseline; gap: .65rem; padding: 0 .15rem; flex-wrap: wrap; }
.job-date-heading span { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: #2a69a8; }
.job-date-heading h2 { margin: 0; font-size: 1.28rem; color: var(--navy-950); }
.job-date-heading small { margin-left: auto; color: #718398; }
.job-public-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.job-public-card { padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(180px,.72fr) minmax(0,1.28fr); min-height: 250px; }
.job-public-image { display: block; background: #eef3f7; min-height: 100%; }
.job-public-image img { width: 100%; height: 100%; min-height: 250px; object-fit: cover; display: block; transition: transform .2s ease; }
.job-public-image:hover img { transform: scale(1.015); }
.job-public-content { padding: 1rem; min-width: 0; }
.job-public-content h3 { margin: .45rem 0 .55rem; line-height: 1.3; }
.job-public-content h3 a { color: var(--navy-950); text-decoration: none; }
.job-public-content h3 a:hover { text-decoration: underline; }
.job-public-content p { color: #51677e; line-height: 1.55; }
.job-position-line { margin-bottom: .45rem; }
.job-card-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .8rem; }
.job-detail-newspaper { margin-bottom: 1rem; }
.job-detail-image-link { display: block; margin-top: .8rem; border-radius: 14px; overflow: hidden; border: 1px solid #dce6ef; background: #f3f6f9; }
.job-detail-image-link img { width: 100%; max-height: 1050px; object-fit: contain; display: block; background: #fff; }
.job-facts-card { margin-bottom: 1rem; }
.job-facts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; }
.job-fact { padding: .85rem; border: 1px solid #e0e8f0; border-radius: 12px; background: #fbfcfd; }
.job-fact span { display: block; color: #687c91; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: .25rem; }
.job-fact strong { display: block; color: #1b334d; font-size: .96rem; line-height: 1.5; }
.job-fact.important { background: #fff8e8; border-color: #f1d79a; }

@media (max-width: 1050px) {
  .job-public-grid { grid-template-columns: 1fr; }
  .job-upload-tools { grid-template-columns: 1fr 1fr; }
  .job-processing-status { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .job-publisher-step { grid-template-columns: 1fr; gap: .65rem; }
  .job-publisher-step .step-number { width: 34px; height: 34px; }
  .job-upload-grid { grid-template-columns: 1fr; }
  .job-upload-tools { grid-template-columns: 1fr; }
  .job-processing-status { grid-column: auto; }
  .job-public-card { grid-template-columns: 1fr; }
  .job-public-image img { min-height: 0; max-height: 360px; object-fit: contain; }
  .job-facts-grid { grid-template-columns: 1fr; }
  .job-date-heading small { width: 100%; margin-left: 0; }
}
.job-ocr-source-details { border: 1px solid #dde6ef; border-radius: 11px; padding: .75rem; background: #fbfcfd; }
.job-ocr-source-details summary { cursor: pointer; font-weight: 700; color: #294966; }
.job-ocr-source-details textarea { width: 100%; margin-top: .75rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.45; background: #fff; }

/* ==========================================================================\n   Student Experience v8 — evidence-led preparation UX\n   ========================================================================== */
.role-student .site-main { padding-bottom: 1rem; }
.student-home-hero,
.student-progress-hero,
.student-test-hero,
.student-result-hero {
  display: grid;
  grid-template-columns: minmax(0,1.35fr) minmax(300px,.65fr);
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1rem;
}
.student-home-copy,
.student-progress-hero > div,
.student-test-hero > div:first-child,
.student-result-hero > div:first-child {
  padding: clamp(1.4rem,3vw,2.35rem);
  border: 1px solid #cedbea;
  border-radius: 24px;
  background: linear-gradient(135deg,#fff 15%,#f5f9ff 68%,#f3fff7);
  box-shadow: var(--shadow-sm);
}
.student-home-copy h1,
.student-progress-hero h1,
.student-test-hero h1,
.student-result-hero h1 { max-width: 780px; font-size: clamp(2rem,4vw,3.35rem); }
.student-home-copy > p,
.student-progress-hero p,
.student-test-hero p,
.student-result-hero p { max-width: 720px; margin-top: .8rem; color: var(--ink-600); font-size: 1.02rem; }
.student-home-hero-actions,
.student-result-actions,
.student-next-step-buttons { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.25rem; }
.student-home-hero-actions form,
.student-result-actions form,
.student-next-step-buttons form { margin: 0; }
.student-next-step-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .7rem;
  padding: clamp(1.25rem,2.5vw,1.8rem);
  border: 1px solid #b9d6c3;
  border-radius: 24px;
  background: linear-gradient(145deg,#f5fff8,#fff);
  box-shadow: var(--shadow-sm);
}
.student-next-label,
.student-goal-kicker,
.student-insight-title > span {
  color: var(--green-700);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.student-next-step-card > strong { color: var(--navy-950); font-size: clamp(1.25rem,2vw,1.65rem); line-height: 1.3; }
.student-next-step-card p { color: var(--ink-600); }
.student-next-meta { display: flex; flex-wrap: wrap; gap: .4rem; }
.student-next-meta span { padding: .38rem .58rem; border-radius: 999px; color: var(--ink-600); background: #fff; border: 1px solid #d6e8dc; font-size: .75rem; font-weight: 750; }

.student-progress-strip,
.student-result-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .75rem;
  margin: 1rem 0 1.5rem;
}
.student-progress-strip > article,
.student-result-kpis > article {
  position: relative;
  min-height: 118px;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}
.student-progress-strip > article::after,
.student-result-kpis > article::after { position:absolute;right:-24px;bottom:-36px;width:100px;height:100px;border-radius:50%;background:rgba(35,104,216,.055);content:""; }
.student-progress-strip span,
.student-result-kpis span { display:block;color:var(--ink-600);font-size:.78rem;font-weight:750; }
.student-progress-strip strong,
.student-result-kpis strong { position:relative;z-index:1;display:block;margin:.25rem 0;color:var(--navy-950);font-size:clamp(1.5rem,2.6vw,2rem);letter-spacing:-.035em; }
.student-progress-strip small,
.student-result-kpis small { position:relative;z-index:1;color:var(--ink-500);font-size:.75rem; }

.student-decision-section,
.student-performance-card,
.student-tools-section,
.student-history-section { margin: 1.5rem 0; }
.student-section-heading { display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1rem; }
.student-section-heading p { max-width: 760px; margin-top:.45rem;color:var(--ink-600); }
.student-goal-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem; }
.student-goal-card {
  position: relative;
  display:flex;
  flex-direction:column;
  gap:.7rem;
  min-height: 330px;
  padding: 1.25rem;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--shadow-xs);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.student-goal-card:hover { transform:translateY(-2px);border-color:#b9cbe0;box-shadow:var(--shadow-sm); }
.student-goal-card.recommended { border-color:#aed6ba;background:linear-gradient(160deg,#fff,#f5fff8); }
.student-goal-card.recommended::before { position:absolute;top:-1px;right:1.1rem;padding:.28rem .58rem;border-radius:0 0 9px 9px;color:#fff;background:var(--green-700);content:"Recommended";font-size:.65rem;font-weight:850;letter-spacing:.04em;text-transform:uppercase; }
.student-goal-card h3 { margin-top:.2rem;font-size:1.35rem; }
.student-goal-card p { color:var(--ink-600); }
.student-goal-card form { margin-top:auto; }
.student-goal-card form + form { margin-top:0; }
.student-goal-card .btn { width:100%; }
.student-paper-details { margin-top:1rem; }

.student-performance-card {
  padding: clamp(1.25rem,3vw,2rem);
  border:1px solid #cad9e9;
  border-radius:24px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  box-shadow:var(--shadow-sm);
  scroll-margin-top: calc(var(--header-height) + 1rem);
}
.student-performance-heading { align-items:flex-start; }
.student-performance-heading p strong { color:var(--navy-900); }
.student-insight-columns { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:1rem;margin-top:1.2rem; }
.student-insight-panel { padding:1rem;border:1px solid var(--line);border-radius:18px;background:#fff; }
.student-insight-panel.weak-panel { border-color:#efd1cf;background:linear-gradient(180deg,#fff,#fffafa); }
.student-insight-title { display:grid;gap:.2rem;margin-bottom:.8rem; }
.student-insight-title h3 { font-size:1.12rem; }
.student-insight-title.strong-title { margin-top:1.2rem;padding-top:1rem;border-top:1px solid var(--line); }
.student-area-list { display:grid;gap:.65rem; }
.student-area-row { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem;padding:.85rem;border:1px solid #eadbda;border-radius:14px;background:#fff; }
.student-area-main { min-width:0; }
.student-area-main > strong { display:block;color:var(--ink-800);font-size:.9rem; }
.student-area-main > strong span { color:var(--ink-400,#8a9aad); }
.student-area-main small { display:block;margin-top:.35rem;color:var(--ink-500);font-size:.74rem; }
.student-area-meter { height:6px;margin-top:.5rem;overflow:hidden;border-radius:999px;background:#edf1f5; }
.student-area-meter i { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#d95d54,#e6a34d); }
.student-no-fresh { color:var(--ink-500);font-size:.72rem;font-weight:750; }
.student-compact-area-list { display:grid;gap:.55rem; }
.student-compact-area-list > div { padding:.72rem .8rem;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft); }
.student-compact-area-list strong,.student-compact-area-list span { display:block; }
.student-compact-area-list strong { color:var(--ink-800);font-size:.85rem; }
.student-compact-area-list span { margin-top:.18rem;color:var(--ink-500);font-size:.74rem; }
.student-compact-area-list.strong-list > div { border-color:#cfe7d6;background:var(--green-50); }
.student-positive-state,.student-insight-empty { padding:1rem;border:1px dashed #b9cce1;border-radius:14px;background:#f8fbff; }
.student-positive-state p,.student-insight-empty p { margin:.35rem 0 .9rem;color:var(--ink-600); }
.student-insight-empty { text-align:center;padding:2rem; }
.student-insight-empty form { display:inline-block; }

/* Student focused-test builder */
.student-builder {
  margin:1.5rem 0;
  overflow:hidden;
  border:1px solid #bdcee1;
  border-radius:24px;
  background:#fff;
  box-shadow:var(--shadow-md);
  scroll-margin-top:calc(var(--header-height) + 1rem);
}
.student-builder-header { display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.35rem 1.5rem;border-bottom:1px solid var(--line);background:linear-gradient(135deg,#f7faff,#f8fff9); }
.student-builder-header p { margin-top:.45rem;color:var(--ink-600); }
.student-builder-layout { display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.5fr); }
.student-builder-main { padding:1.25rem; }
.student-builder-summary { position:relative;padding:1.25rem;border-left:1px solid var(--line);background:#f8fafc; }
.student-builder-step-head { display:flex;align-items:flex-start;gap:.7rem;margin-bottom:1rem; }
.student-builder-step-head > span { width:32px;height:32px;display:grid;place-items:center;flex:0 0 32px;border-radius:10px;color:#fff;background:var(--navy-800);font-size:.78rem;font-weight:900; }
.student-builder-step-head h3 { font-size:1.08rem; }
.student-builder-step-head p { margin-top:.25rem;color:var(--ink-600);font-size:.82rem; }
.student-builder-search { max-width:520px;margin-bottom:1rem; }
.student-builder-topic-list { display:grid;gap:.65rem;max-height:690px;overflow:auto;padding-right:.2rem; }
.student-builder-topic-card { display:grid;grid-template-columns:minmax(170px,1fr) minmax(220px,1.25fr) 120px auto;align-items:end;gap:.75rem;padding:.85rem;border:1px solid var(--line);border-radius:15px;background:#fff;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease; }
.student-builder-topic-card.is-selected { border-color:#8bb2e8;background:#f8fbff;box-shadow:0 0 0 3px rgba(35,104,216,.06); }
.student-builder-topic-card label { margin:0;font-size:.74rem; }
.student-builder-topic-name { align-self:center; }
.student-builder-topic-name strong,.student-builder-topic-name span { display:block; }
.student-builder-topic-name strong { color:var(--navy-950); }
.student-builder-topic-name span { margin-top:.2rem;color:var(--ink-500);font-size:.72rem; }
.student-count-presets { display:flex;gap:.3rem;align-self:center; }
.student-count-presets button { min-width:38px;padding:.42rem .45rem;border:1px solid var(--line);border-radius:9px;color:var(--navy-800);background:#fff;font-size:.7rem;font-weight:850;cursor:pointer; }
.student-count-presets button:hover { border-color:#9eb9d9;background:var(--blue-50); }
.student-builder-live-stats { display:grid;grid-template-columns:1fr 1fr;gap:.55rem;margin-bottom:.8rem; }
.student-builder-live-stats > div { padding:.8rem;border:1px solid var(--line);border-radius:13px;background:#fff; }
.student-builder-live-stats span,.student-builder-live-stats strong { display:block; }
.student-builder-live-stats span { color:var(--ink-500);font-size:.7rem;font-weight:750; }
.student-builder-live-stats strong { margin-top:.2rem;color:var(--navy-950);font-size:1.45rem; }
.student-negative-toggle { margin:.8rem 0;padding:.8rem;border:1px solid var(--line);border-radius:13px;background:#fff; }
.student-negative-toggle span:last-child { display:grid; }
.student-negative-toggle small { color:var(--ink-500);font-size:.7rem; }
.student-builder-preview { display:grid;gap:.35rem;max-height:190px;margin:.75rem 0;padding:.75rem;overflow:auto;border:1px dashed #c6d4e4;border-radius:12px;background:#fff; }
.student-builder-preview span { color:var(--ink-600);font-size:.76rem; }
.student-builder-preview small { color:var(--navy-800);font-weight:800; }
.student-builder-summary .btn { width:100%;margin-top:.5rem; }
.student-builder-reassurance { margin-top:.75rem;color:var(--ink-500);font-size:.72rem;text-align:center; }

.student-tools-section { padding-top:.25rem; }
.student-tool-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.85rem; }
.student-tool-grid > article { display:flex;flex-direction:column;gap:.6rem;padding:1.1rem;border:1px solid var(--line);border-radius:17px;background:#fff; }
.student-tool-grid strong { color:var(--navy-950);font-size:1rem; }
.student-tool-grid p { color:var(--ink-600);font-size:.85rem; }
.student-tool-grid .btn,.student-tool-grid .row { margin-top:auto; }
.student-recent-results { padding:clamp(1.1rem,2vw,1.45rem); }
.student-history-cards { display:grid;gap:.55rem; }
.student-history-card { display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem .9rem;border:1px solid var(--line);border-radius:14px;background:#fff; }
.student-history-card > div:first-child { display:grid;gap:.1rem; }
.student-history-card span { color:var(--ink-500);font-size:.72rem;font-weight:750; }
.student-history-card strong { color:var(--ink-800); }
.student-history-card small { color:var(--ink-500); }
.student-history-actions { display:flex;gap:.4rem;flex-wrap:wrap; }
.student-history-actions form { margin:0; }

.student-account-settings { display:grid;gap:.65rem;margin:1.5rem 0; }
.student-account-settings > details { overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff; }
.student-account-settings > details > summary { display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.1rem;cursor:pointer;list-style:none; }
.student-account-settings > details > summary::-webkit-details-marker { display:none; }
.student-account-settings summary span { display:grid; }
.student-account-settings summary small { margin-top:.15rem;color:var(--ink-500);font-size:.75rem; }
.student-account-settings summary b { color:var(--navy-800);font-size:.78rem; }
.student-account-settings details[open] summary { border-bottom:1px solid var(--line);background:var(--surface-soft); }
.student-settings-body { padding:1rem 1.1rem; }
.student-plan-actions { display:flex;flex-wrap:wrap;gap:.55rem; }
.student-plan-actions form { margin:0; }
.student-order-list { margin-top:.8rem; }

/* Student test-taking experience */
.student-test-hero { grid-template-columns:minmax(0,1fr) auto;align-items:center; }
.student-test-hero > div:first-child { padding:1.3rem 1.5rem; }
.student-test-hero-actions { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.45rem; }
.student-test-hero-actions form { margin:0; }
.student-test-controlbar {
  position:sticky;
  top:calc(var(--header-height) + .55rem);
  z-index:40;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:1rem;
  margin-bottom:.75rem;
  padding:.8rem .9rem;
  border:1px solid #cbd8e7;
  border-radius:16px;
  background:rgba(255,255,255,.97);
  box-shadow:var(--shadow-sm);
  backdrop-filter:blur(14px);
}
.student-test-progress-copy { display:flex;justify-content:space-between;gap:1rem;margin-bottom:.45rem;color:var(--ink-600);font-size:.78rem; }
.student-test-progress-copy strong { color:var(--navy-950); }
.student-question-navigator { margin-bottom:.75rem;border:1px solid var(--line);border-radius:15px;background:#fff; }
.student-question-navigator > summary { display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.8rem 1rem;cursor:pointer;list-style:none; }
.student-question-navigator > summary::-webkit-details-marker { display:none; }
.student-question-navigator summary > span:first-child { display:grid; }
.student-question-navigator summary small { color:var(--ink-500);font-size:.72rem; }
.navigator-legend { display:inline-flex!important;align-items:center;gap:.35rem;color:var(--ink-500);font-size:.72rem;font-weight:750; }
.navigator-legend i { width:9px;height:9px;border-radius:50%;background:var(--green-500); }
.student-question-grid { display:flex;flex-wrap:wrap;gap:.38rem;padding:0 1rem 1rem; }
.student-question-jump { width:36px;height:36px;border:1px solid var(--line);border-radius:10px;color:var(--ink-700);background:#fff;font-size:.72rem;font-weight:850;cursor:pointer; }
.student-question-jump.answered { color:var(--green-700);border-color:#b6ddc1;background:var(--green-50); }
.student-question-jump.current { box-shadow:0 0 0 3px rgba(35,104,216,.14);border-color:var(--blue-600); }
.student-test-guidance { display:flex;gap:.5rem;margin-bottom:.85rem;padding:.75rem .9rem;border:1px solid #d6e1ee;border-radius:13px;color:var(--ink-600);background:#f8fbff;font-size:.8rem; }
.student-test-guidance strong { color:var(--navy-900); }
.student-test-list { gap:.85rem; }
.student-question-card { scroll-margin-top:155px; }
.student-question-card .question-head { margin-bottom:1.05rem; }
.student-question-status { display:inline-flex;margin-bottom:.35rem;padding:.22rem .48rem;border-radius:999px;color:var(--ink-500);background:var(--surface-soft);font-size:.66rem;font-weight:800; }
.student-question-card.answered .student-question-status { color:var(--green-700);background:var(--green-50); }
.student-question-footer { display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-top:.8rem;padding-top:.7rem;border-top:1px solid #edf1f5; }
.student-clear-answer { padding:.35rem .45rem;color:var(--ink-500);background:transparent;font-size:.74rem;font-weight:750;cursor:pointer; }
.student-clear-answer:hover { color:var(--red-700); }
.student-question-footer > span { color:var(--ink-500);font-size:.72rem; }
.student-question-card.attention-pulse { animation:studentPulse .8s ease; }
@keyframes studentPulse { 0%,100%{box-shadow:var(--shadow-xs)}50%{box-shadow:0 0 0 5px rgba(35,104,216,.13),var(--shadow-sm)} }
.student-submit-dialog { max-width:500px;padding:0;border:0;border-radius:22px;background:transparent; }
.student-submit-dialog::backdrop { background:rgba(7,27,58,.5);backdrop-filter:blur(3px); }
.student-dialog-card { padding:1.4rem;border-radius:22px;background:#fff;box-shadow:var(--shadow-lg); }
.student-dialog-card p { margin:.65rem 0 1rem;color:var(--ink-600); }
.student-dialog-actions { display:grid;grid-template-columns:1fr 1fr;gap:.55rem; }
.student-dialog-cancel { width:100%;margin-top:.55rem;padding:.6rem;color:var(--ink-500);background:transparent;font-weight:750;cursor:pointer; }

/* Student result and learning review */
.student-result-hero { grid-template-columns:minmax(0,1fr) 260px;align-items:center; }
.student-result-score-ring { display:grid;place-items:center;min-height:100%;padding:1rem;border:1px solid #cbd9e8;border-radius:24px;background:#fff;box-shadow:var(--shadow-sm); }
.student-result-score-ring::before { grid-area:1/1;width:170px;height:170px;border-radius:50%;background:conic-gradient(var(--green-500) calc(var(--pct)*1%),#e5ebf2 0);content:""; }
.student-result-score-ring::after { grid-area:1/1;width:132px;height:132px;border-radius:50%;background:#fff;content:""; }
.student-result-score-ring > div { grid-area:1/1;z-index:1;display:grid;text-align:center; }
.student-result-score-ring strong { color:var(--navy-950);font-size:2rem;letter-spacing:-.04em; }
.student-result-score-ring span { color:var(--ink-500);font-size:.72rem;font-weight:750; }
.student-result-next-step { display:grid;grid-template-columns:minmax(0,1.25fr) minmax(280px,.75fr);gap:1rem;margin:1.25rem 0; }
.student-next-step-copy,.student-method-card { padding:1.2rem;border:1px solid var(--line);border-radius:19px;background:#fff; }
.student-next-step-copy { background:linear-gradient(135deg,#fff,#f6fbff); }
.student-next-step-copy p { margin-top:.5rem;color:var(--ink-600); }
.student-method-card { display:flex;flex-direction:column;justify-content:center;gap:.5rem;border-color:#d7e3ef;background:var(--surface-soft); }
.student-method-card p,.student-method-card span { color:var(--ink-600);font-size:.82rem; }
.student-method-card span { padding-top:.55rem;border-top:1px solid var(--line); }
.student-performance-details { margin:1rem 0 1.5rem;overflow:hidden;border:1px solid var(--line);border-radius:19px;background:#fff; }
.student-performance-details > summary { display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.15rem;cursor:pointer;list-style:none; }
.student-performance-details > summary::-webkit-details-marker { display:none; }
.student-performance-details summary span { display:grid; }
.student-performance-details summary small { margin-top:.2rem;color:var(--ink-500);font-size:.74rem; }
.student-performance-details summary b { color:var(--navy-800);font-size:.78rem; }
.student-performance-details[open] > summary { border-bottom:1px solid var(--line);background:var(--surface-soft); }
.student-performance-details-body { padding:1rem; }
.student-result-area-columns { display:grid;grid-template-columns:1fr 1fr;gap:.8rem; }
.student-result-area-panel { padding:.9rem;border:1px solid var(--line);border-radius:15px; }
.student-result-area-row { display:grid;gap:.18rem;padding:.65rem 0;border-top:1px solid #edf1f5; }
.student-result-area-row:first-of-type { border-top:0; }
.student-result-area-row strong { color:var(--ink-800);font-size:.84rem; }
.student-result-area-row span { color:var(--ink-500);font-size:.73rem; }
.student-result-area-row.weak strong { color:#9f312b; }
.student-result-area-row.attention strong { color:var(--amber-700); }
.student-evidence-details { margin-top:.6rem;padding-top:.6rem;border-top:1px solid var(--line); }
.student-evidence-details summary { color:var(--navy-800);font-size:.78rem;font-weight:800;cursor:pointer; }
.student-result-strong-strip { display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-top:.8rem;padding:.85rem;border:1px solid #cfe5d6;border-radius:14px;background:var(--green-50); }
.student-strong-chips { display:flex;flex-wrap:wrap;gap:.4rem;justify-content:flex-end; }
.student-strong-chips span { padding:.38rem .55rem;border:1px solid #c6dfce;border-radius:999px;color:var(--green-700);background:#fff;font-size:.72rem; }
.student-category-report { margin-top:1rem; }
.student-category-report-list { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;margin-top:.65rem; }
.student-category-report-list article { padding:.8rem;border:1px solid var(--line);border-radius:14px;background:#fff; }
.student-category-report-head { display:flex;justify-content:space-between;gap:.7rem;align-items:flex-start; }
.student-category-report-head div { display:grid; }
.student-category-report-head span { color:var(--ink-500);font-size:.72rem; }
.student-category-report-head b { color:var(--navy-900); }
.student-dual-meter { height:7px;margin:.55rem 0;overflow:hidden;border-radius:999px;background:#e8edf3; }
.student-dual-meter i { display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--blue-600),var(--green-500)); }
.student-category-meta { display:flex;flex-wrap:wrap;gap:.3rem .65rem;color:var(--ink-500);font-size:.68rem;font-weight:700; }
.student-review-section { margin-top:1.5rem;scroll-margin-top:calc(var(--header-height) + 1rem); }
.student-review-heading { align-items:flex-end; }
.student-review-count { color:var(--ink-500);font-size:.8rem;font-weight:800; }
.student-review-toolbar { position:sticky;top:calc(var(--header-height) + .55rem);z-index:35;display:flex;gap:.35rem;margin-bottom:.8rem;padding:.45rem;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.96);box-shadow:var(--shadow-xs);backdrop-filter:blur(12px); }
.student-review-toolbar button,.student-history-filter button { padding:.48rem .7rem;border-radius:9px;color:var(--ink-600);background:transparent;font-size:.75rem;font-weight:800;cursor:pointer; }
.student-review-toolbar button.active,.student-history-filter button.active { color:#fff;background:var(--navy-800); }
.student-answer-review-list { gap:.8rem; }
.student-review-card { padding:1rem; }
.student-review-card.correct { border-left:4px solid var(--green-500); }
.student-review-card.wrong { border-left:4px solid #db5b52; }
.student-review-card.unanswered { border-left:4px solid #d5a248; }
.student-review-question-head { display:grid;grid-template-columns:38px minmax(0,1fr);gap:.75rem;margin-bottom:.85rem; }
.student-review-question-head > span { width:38px;height:38px;display:grid;place-items:center;border-radius:11px;color:#fff;background:var(--navy-800);font-size:.78rem;font-weight:900; }
.student-review-question-head h3 { margin-top:.3rem;color:var(--ink-900);font-size:1.02rem;line-height:1.45; }
.student-review-question-head small { display:block;margin-top:.3rem;color:var(--ink-500); }
.student-review-state-badge { display:inline-flex;width:max-content;padding:.22rem .5rem;border-radius:999px;font-size:.65rem;font-weight:850; }
.student-review-state-badge.correct { color:var(--green-700);background:var(--green-50); }
.student-review-state-badge.wrong { color:var(--red-700);background:var(--red-50); }
.student-review-state-badge.unanswered { color:var(--amber-700);background:var(--amber-50); }
.student-review-options { display:grid;gap:.45rem; }
.student-review-option { display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:.6rem;padding:.65rem .7rem;border:1px solid var(--line);border-radius:12px;background:#fff; }
.student-review-option.is-correct { border-color:#a9d6b6;background:var(--green-50); }
.student-review-option.is-wrong-selected { border-color:#e9b7b2;background:var(--red-50); }
.student-review-letter { width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:var(--navy-800);background:var(--blue-100);font-size:.72rem;font-weight:900; }
.student-review-option.is-correct .student-review-letter { color:#fff;background:var(--green-600); }
.student-review-option.is-wrong-selected .student-review-letter { color:#fff;background:#c94e45; }
.student-review-option-text { color:var(--ink-800);font-size:.86rem; }
.student-review-option-badges { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.3rem; }
.student-review-option-badges b,.student-review-option-badges i { padding:.24rem .38rem;border-radius:7px;font-size:.62rem;font-style:normal;font-weight:850;white-space:nowrap; }
.student-review-option-badges b { color:var(--green-700);background:#fff;border:1px solid #b9dec3; }
.student-review-option-badges i { color:var(--navy-800);background:var(--blue-50);border:1px solid #c9dbf1; }
.student-explanation-details { margin-top:.7rem;border:1px solid #d8e6dc;border-radius:12px;background:#fbfffc; }
.student-explanation-details summary { padding:.65rem .75rem;color:var(--green-700);font-size:.78rem;font-weight:850;cursor:pointer; }
.student-explanation-details > div { padding:0 .75rem .75rem;color:var(--ink-700);font-size:.86rem;line-height:1.65; }
.question-review-actions { display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.7rem; }

/* Student history */
.student-progress-hero { grid-template-columns:minmax(0,1fr) auto;align-items:center; }
.student-progress-hero > div { padding:1.35rem 1.5rem; }
.student-history-heading { align-items:flex-end; }
.student-history-filter { display:flex;gap:.25rem;padding:.3rem;border:1px solid var(--line);border-radius:11px;background:#fff; }
.student-history-list { display:grid;gap:.65rem; }
.student-history-detail-card { display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr) auto;align-items:center;gap:1rem;padding:1rem;border:1px solid var(--line);border-radius:17px;background:#fff;box-shadow:var(--shadow-xs); }
.student-history-detail-main { display:flex;align-items:center;gap:.9rem;min-width:0; }
.student-history-test-id { width:62px;height:62px;display:grid;place-items:center;align-content:center;flex:0 0 62px;border-radius:15px;color:var(--navy-800);background:var(--blue-50); }
.student-history-test-id span { font-size:.62rem;font-weight:800;text-transform:uppercase; }
.student-history-test-id strong { font-size:1.05rem; }
.student-history-detail-main h3 { margin-top:.25rem;font-size:.98rem; }
.student-history-detail-main p { margin-top:.18rem;color:var(--ink-500);font-size:.73rem; }
.student-history-status { display:inline-flex;padding:.2rem .45rem;border-radius:999px;font-size:.64rem;font-weight:850; }
.student-history-status.complete { color:var(--green-700);background:var(--green-50); }
.student-history-status.progress { color:var(--navy-800);background:var(--blue-50); }
.student-history-detail-stats { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem; }
.student-history-detail-stats > div { padding:.55rem;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);text-align:center; }
.student-history-detail-stats span,.student-history-detail-stats strong { display:block; }
.student-history-detail-stats span { color:var(--ink-500);font-size:.62rem;font-weight:750; }
.student-history-detail-stats strong { color:var(--navy-950);font-size:.95rem; }
.student-history-detail-actions { display:grid;gap:.35rem; }
.student-history-detail-actions form { margin:0; }
.student-history-detail-actions .btn { width:100%;white-space:nowrap; }
.student-history-empty-filter { padding:2rem;text-align:center;color:var(--ink-500); }

/* Mobile student bottom navigation */
.student-bottom-nav { display:none; }

@media (max-width: 1000px) {
  .student-progress-strip,.student-result-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .student-goal-grid,.student-tool-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .student-tool-grid > article:last-child { grid-column:1/-1; }
  .student-insight-columns,.student-result-next-step { grid-template-columns:1fr; }
  .student-builder-layout { grid-template-columns:1fr; }
  .student-builder-summary { border-left:0;border-top:1px solid var(--line); }
  .student-builder-topic-card { grid-template-columns:minmax(160px,1fr) minmax(200px,1.2fr) 110px; }
  .student-count-presets { grid-column:1/-1;justify-content:flex-end; }
  .student-history-detail-card { grid-template-columns:1fr; }
  .student-history-detail-actions { display:flex; }
  .student-history-detail-actions .btn { width:auto; }
}

@media (max-width: 760px) {
  .role-student .site-main { padding-bottom:5.6rem; }
  .role-student .site-footer { padding-bottom:5rem; }
  .student-home-hero,.student-progress-hero,.student-test-hero,.student-result-hero { grid-template-columns:1fr;gap:.75rem; }
  .student-home-copy,.student-progress-hero > div,.student-test-hero > div:first-child,.student-result-hero > div:first-child { padding:1.15rem;border-radius:19px; }
  .student-home-copy h1,.student-progress-hero h1,.student-test-hero h1,.student-result-hero h1 { font-size:clamp(1.8rem,9vw,2.55rem); }
  .student-home-copy > p,.student-progress-hero p,.student-test-hero p,.student-result-hero p { font-size:.92rem; }
  .student-home-hero-actions,.student-result-actions,.student-next-step-buttons { display:grid;grid-template-columns:1fr; }
  .student-home-hero-actions .btn,.student-result-actions .btn,.student-next-step-buttons .btn { width:100%; }
  .student-next-step-card { padding:1rem;border-radius:18px; }
  .student-progress-strip,.student-result-kpis { grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem; }
  .student-progress-strip > article,.student-result-kpis > article { min-height:105px;padding:.8rem;border-radius:15px; }
  .student-progress-strip strong,.student-result-kpis strong { font-size:1.45rem; }
  .student-section-heading,.student-performance-heading,.student-review-heading,.student-history-heading { display:grid;align-items:start; }
  .student-goal-grid,.student-tool-grid { grid-template-columns:1fr; }
  .student-tool-grid > article:last-child { grid-column:auto; }
  .student-goal-card { min-height:0;padding:1rem; }
  .student-performance-card { padding:1rem;border-radius:19px; }
  .student-area-row { grid-template-columns:1fr; }
  .student-area-row form .btn { width:100%; }
  .student-builder { border-radius:18px; }
  .student-builder-header { display:grid;padding:1rem; }
  .student-builder-header .btn { width:100%; }
  .student-builder-main,.student-builder-summary { padding:.9rem; }
  .student-builder-topic-list { max-height:none; }
  .student-builder-topic-card { grid-template-columns:1fr;align-items:stretch; }
  .student-count-presets { grid-column:auto;justify-content:flex-start; }
  .student-count-presets button { min-width:52px; }
  .student-history-card { display:grid; }
  .student-history-actions { display:grid;grid-template-columns:1fr 1fr; }
  .student-history-actions .btn { width:100%; }
  .student-test-hero-actions { justify-content:stretch;display:grid;grid-template-columns:1fr 1fr; }
  .student-test-hero-actions .btn { width:100%; }
  .student-test-controlbar { top:calc(var(--header-height) + .3rem);grid-template-columns:1fr;padding:.7rem; }
  .student-test-controlbar .btn { width:100%; }
  .student-test-progress-copy { font-size:.72rem; }
  .student-question-navigator > summary { align-items:flex-start; }
  .navigator-legend { display:none!important; }
  .student-test-guidance { display:grid; }
  .student-question-card { padding:1rem;scroll-margin-top:190px; }
  .student-question-footer { align-items:flex-start; }
  .student-question-footer > span { text-align:right; }
  .student-test-submit-bar { bottom:4.8rem;display:grid; }
  .student-test-submit-bar .btn { width:100%; }
  .student-dialog-actions { grid-template-columns:1fr; }
  .student-result-score-ring { min-height:205px;border-radius:19px; }
  .student-result-score-ring::before { width:150px;height:150px; }
  .student-result-score-ring::after { width:116px;height:116px; }
  .student-result-area-columns,.student-category-report-list { grid-template-columns:1fr; }
  .student-result-strong-strip { display:grid; }
  .student-strong-chips { justify-content:flex-start; }
  .student-review-toolbar { top:calc(var(--header-height) + .3rem);overflow-x:auto; }
  .student-review-toolbar button { flex:0 0 auto; }
  .student-review-option { grid-template-columns:32px minmax(0,1fr); }
  .student-review-option-badges { grid-column:2;justify-content:flex-start; }
  .student-history-filter { overflow-x:auto; }
  .student-history-detail-main { align-items:flex-start; }
  .student-history-detail-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .student-history-detail-actions { display:grid;grid-template-columns:1fr 1fr; }
  .student-history-detail-actions .btn { width:100%; }
  .student-account-settings > details > summary { align-items:flex-start; }
  .student-plan-actions { display:grid; }
  .student-plan-actions .btn { width:100%; }

  .student-bottom-nav {
    position:fixed;
    right:.55rem;
    bottom:calc(.55rem + env(safe-area-inset-bottom));
    left:.55rem;
    z-index:950;
    display:grid;
    grid-template-columns:repeat(5,1fr);
    min-height:64px;
    padding:.35rem;
    border:1px solid rgba(190,205,222,.95);
    border-radius:18px;
    background:rgba(255,255,255,.97);
    box-shadow:0 18px 50px rgba(7,27,58,.2);
    backdrop-filter:blur(16px);
  }
  .student-bottom-nav a { display:grid;place-items:center;align-content:center;gap:.2rem;min-width:0;padding:.35rem .15rem;border-radius:12px;color:var(--ink-500);font-size:.62rem;font-weight:800; }
  .student-bottom-nav a.active { color:var(--navy-900);background:var(--blue-50); }
  .student-bottom-icon { position:relative;width:20px;height:20px;display:block; }
  .student-bottom-icon::before,.student-bottom-icon::after { position:absolute;content:""; }
  .icon-home::before { left:4px;top:7px;width:12px;height:10px;border:2px solid currentColor;border-top:0;border-radius:2px; }
  .icon-home::after { left:5px;top:2px;width:10px;height:10px;border-left:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg);border-radius:2px 0 0 0; }
  .icon-practice::before { inset:2px 4px;border:2px solid currentColor;border-radius:3px; }
  .icon-practice::after { left:7px;top:6px;width:6px;height:2px;background:currentColor;box-shadow:0 4px 0 currentColor,0 8px 0 currentColor; }
  .icon-progress::before { inset:2px;border:2px solid currentColor;border-radius:50%; }
  .icon-progress::after { left:9px;top:5px;width:2px;height:7px;background:currentColor;box-shadow:3px 5px 0 -0.2px currentColor;transform-origin:bottom; }
  .icon-saved::before { left:4px;top:2px;width:12px;height:16px;border:2px solid currentColor;border-radius:2px; }
  .icon-saved::after { left:7px;bottom:2px;width:6px;height:6px;background:#fff;border-left:2px solid currentColor;border-top:2px solid currentColor;transform:rotate(45deg); }
  .icon-account::before { left:6px;top:2px;width:8px;height:8px;border:2px solid currentColor;border-radius:50%; }
  .icon-account::after { left:3px;bottom:1px;width:14px;height:7px;border:2px solid currentColor;border-radius:9px 9px 3px 3px; }
}

@media (max-width: 430px) {
  .student-progress-strip,.student-result-kpis { grid-template-columns:1fr 1fr; }
  .student-progress-strip > article,.student-result-kpis > article { min-height:98px; }
  .student-progress-strip strong,.student-result-kpis strong { font-size:1.25rem; }
  .student-history-actions,.student-history-detail-actions { grid-template-columns:1fr; }
  .student-test-hero-actions { grid-template-columns:1fr; }
  .student-review-option { padding:.58rem; }
  .student-bottom-nav a { font-size:.58rem; }
}

/* Student Experience v8 — saved questions, rankings and account security */
.student-saved-hero,.student-leaderboard-hero,.student-security-hero{margin-bottom:18px}
.student-saved-toolbar{display:grid;grid-template-columns:minmax(150px,.45fr) minmax(260px,1.55fr);gap:16px;align-items:end;margin:0 0 18px;padding:18px 20px;border:1px solid var(--border,#dfe6ee);border-radius:18px;background:var(--surface,#fff);box-shadow:0 10px 30px rgba(15,23,42,.05)}
.student-saved-toolbar>div{display:flex;flex-direction:column;gap:4px}.student-saved-toolbar>div span{font-size:.82rem;color:var(--muted,#64748b)}.student-saved-toolbar>div strong{font-size:1.8rem;line-height:1}.student-saved-toolbar label{margin:0}
.student-saved-list{gap:16px}.student-saved-card{padding:22px}.student-saved-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.student-saved-tags{display:flex;gap:8px;flex-wrap:wrap}.student-saved-tags span{display:inline-flex;padding:6px 10px;border-radius:999px;background:#f1f5f9;color:#475569;font-size:.78rem;font-weight:700}.student-saved-card h2{font-size:1.08rem;line-height:1.55;margin:14px 0}
.student-saved-options{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.student-saved-options>span{display:flex;gap:10px;align-items:flex-start;padding:11px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fbfdff}.student-saved-options b{flex:0 0 28px;width:28px;height:28px;display:grid;place-items:center;border-radius:8px;background:#eef2ff;color:#3730a3;font-size:.78rem}.student-saved-empty{margin-top:8px}
.student-leaderboard-context{display:grid;grid-template-columns:180px 220px 1fr;gap:16px;align-items:stretch;margin:0 0 16px}.student-leaderboard-context>div,.student-leaderboard-context>p{margin:0;padding:17px 18px;border-radius:16px;border:1px solid #e2e8f0;background:#fff}.student-leaderboard-context>div{display:flex;flex-direction:column;gap:3px}.student-leaderboard-context span{font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:#64748b;font-weight:700}.student-leaderboard-context strong{font-size:1.45rem}.student-leaderboard-context small{color:#64748b}.student-leaderboard-context p{color:#475569;line-height:1.55}.student-my-rank{background:linear-gradient(135deg,#eef2ff,#f8fafc)!important}.student-my-rank.neutral{background:#f8fafc!important}
.student-period-tabs{display:flex;gap:8px;overflow:auto;padding:6px;margin:0 0 16px;background:#eef2f7;border-radius:14px;width:max-content;max-width:100%}.student-period-tabs a{white-space:nowrap;text-decoration:none;color:#475569;font-weight:800;padding:9px 15px;border-radius:10px}.student-period-tabs a.active{background:#fff;color:#111827;box-shadow:0 4px 12px rgba(15,23,42,.08)}
.student-leaderboard-card{padding:22px}.student-leaderboard-table .my-rank{background:#f0fdf4}.student-leaderboard-table .my-rank td:first-child strong{color:#15803d}.leaderboard-cards{margin-top:16px}
.student-security-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:18px;align-items:start}.student-security-card{max-width:none}.student-security-card label small{display:block;color:#64748b;margin-top:6px;font-weight:500;line-height:1.45}.student-security-card button[type=submit]{align-self:flex-start}.student-security-layout .student-method-card{position:sticky;top:92px}
@media(max-width:800px){.student-saved-toolbar,.student-leaderboard-context,.student-security-layout{grid-template-columns:1fr}.student-saved-options{grid-template-columns:1fr}.student-leaderboard-context{gap:10px}.student-security-layout .student-method-card{position:static}.student-saved-card{padding:17px}.student-saved-card-head{align-items:center}}
@media(max-width:520px){.student-saved-toolbar{padding:15px}.student-period-tabs{width:100%}.student-period-tabs a{flex:1;text-align:center;padding:9px 10px}.student-saved-card-head{align-items:flex-start}.student-saved-tags{max-width:75%}}

/* Registered student read-and-learn MCQ library */
.student-goal-note { display:block;margin-top:auto;color:var(--ink-500);font-size:.72rem;line-height:1.45; }
.student-study-card { background:linear-gradient(160deg,#fff,#f7faff); }
.student-reader-hero { display:grid;grid-template-columns:minmax(0,1.55fr) minmax(280px,.7fr);gap:1rem;margin:0 0 1.1rem; }
.student-reader-hero > div,.student-reader-mode-note { padding:clamp(1.25rem,3vw,2rem);border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:var(--shadow-sm); }
.student-reader-hero > div { background:linear-gradient(150deg,#fff 0%,#f7fbff 100%); }
.student-reader-hero h1 { margin:.25rem 0 .6rem;color:var(--navy-950);font-size:clamp(2rem,4.2vw,3.25rem);letter-spacing:-.045em; }
.student-reader-hero p { max-width:760px;color:var(--ink-600);font-size:1rem;line-height:1.7; }
.student-reader-hero-actions { display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1rem; }
.student-reader-mode-note { display:flex;flex-direction:column;justify-content:center;gap:.55rem;background:linear-gradient(155deg,#f8fbff,#fff); }
.student-reader-mode-note strong { color:var(--navy-950);font-size:1.2rem; }
.student-reader-mode-note p { margin:0;font-size:.88rem;line-height:1.55; }
.student-reader-mode-note span { display:inline-flex;align-self:flex-start;padding:.36rem .62rem;border-radius:999px;background:var(--blue-50);color:var(--navy-800);font-size:.75rem;font-weight:800; }
.student-reader-filter-card { margin-bottom:1rem;padding:1.1rem;border-radius:20px; }
.student-reader-filter-head { display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:.85rem; }
.student-reader-filter-head h2 { margin:.15rem 0 0;font-size:1.25rem; }
.student-reader-filter-form { display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(170px,1fr) minmax(170px,1fr) auto;gap:.7rem;align-items:end; }
.student-reader-filter-form label { display:grid;gap:.35rem;color:var(--ink-700);font-size:.77rem;font-weight:800; }
.student-reader-filter-form input,.student-reader-filter-form select { width:100%;min-height:46px; }
.student-reader-filter-form .btn { min-height:46px;white-space:nowrap; }
.student-reader-filter-hint { margin-top:.7rem;color:var(--ink-500);font-size:.75rem; }
.student-reader-shell { margin-bottom:1.5rem; }
.student-reader-toolbar { display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.35rem .15rem .8rem; }
.student-reader-toolbar > div { display:flex;align-items:baseline;gap:.55rem;flex-wrap:wrap; }
.student-reader-toolbar strong { color:var(--navy-950);font-size:1rem; }
.student-reader-toolbar span { color:var(--ink-500);font-size:.75rem; }
.student-reader-legend { display:flex;align-items:center;gap:.35rem;white-space:nowrap; }
.reader-dot { width:8px;height:8px;border-radius:999px;display:inline-block; }
.reader-dot.correct { background:#159447; }
.reader-dot.wrong { background:#c83d3d; }
.student-readable-mcq-list { display:grid;gap:1rem; }
.student-readable-mcq-card { padding:clamp(1rem,2.5vw,1.5rem);border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow-xs);scroll-margin-top:calc(var(--header-height) + 1rem); }
.student-readable-mcq-card[data-answered="1"] { border-color:#c7d8e8; }
.student-readable-mcq-head { display:flex;align-items:center;justify-content:space-between;gap:.75rem;margin-bottom:.8rem; }
.student-readable-mcq-head .mcq-number { display:inline-flex;padding:.28rem .52rem;border-radius:999px;background:var(--blue-50);color:var(--navy-800);font-size:.7rem;font-weight:850; }
.student-readable-topic { display:flex;align-items:center;gap:.45rem;min-width:0; }
.student-readable-topic span,.student-readable-topic small { display:inline-flex;padding:.25rem .48rem;border-radius:999px;background:var(--surface-soft);color:var(--ink-600);font-size:.67rem;font-weight:750;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px; }
.student-readable-topic small { background:#f7f8fa;color:var(--ink-500); }
.student-readable-mcq-card h2 { margin:0 0 1rem;color:var(--ink-900);font-size:clamp(1.05rem,2.2vw,1.28rem);line-height:1.55;font-weight:800; }
.student-reader-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem; }
.student-reader-option { position:relative;display:grid;grid-template-columns:38px minmax(0,1fr) 20px;align-items:center;gap:.65rem;width:100%;min-height:62px;padding:.7rem .8rem;border:1px solid #d7e0e9;border-radius:14px;background:#fff;color:var(--ink-800);text-align:left;cursor:pointer;transition:border-color .15s ease,background .15s ease,transform .15s ease,box-shadow .15s ease; }
.student-reader-option:hover:not(:disabled) { transform:translateY(-1px);border-color:#9db8d2;box-shadow:var(--shadow-xs); }
.student-reader-option b { display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--surface-soft);color:var(--navy-900);font-size:.85rem; }
.student-reader-option span { line-height:1.45;font-size:.9rem; }
.student-reader-option:disabled { cursor:default;opacity:1; }
.student-reader-option.is-selected { border-color:#8ba9c7;background:#f8fbff; }
.student-reader-option.is-correct { border-color:#71bd8a;background:#f1fbf4; }
.student-reader-option.is-correct b { color:#0d6e35;background:#dff4e6; }
.student-reader-option.is-correct i::before { content:"✓";color:#0d7a3a;font-size:1rem;font-style:normal;font-weight:900; }
.student-reader-option.is-wrong { border-color:#e0a0a0;background:#fff5f5; }
.student-reader-option.is-wrong b { color:#a52424;background:#fde3e3; }
.student-reader-option.is-wrong i::before { content:"×";color:#b72a2a;font-size:1.1rem;font-style:normal;font-weight:900; }
.student-reader-feedback { display:flex;align-items:center;gap:.5rem;min-height:42px;margin-top:.8rem;padding:.65rem .75rem;border-radius:12px;background:var(--surface-soft);color:var(--ink-600);font-size:.8rem; }
.student-reader-feedback strong { color:var(--ink-900); }
.student-reader-feedback.is-correct { background:#eefaf2;color:#226b3d; }
.student-reader-feedback.is-correct strong { color:#11672f; }
.student-reader-feedback.is-wrong { background:#fff2f2;color:#8d3434; }
.student-reader-feedback.is-wrong strong { color:#9b2020; }
.student-reader-feedback.is-error { background:#fff7e8;color:#835b0d; }
.student-reader-explanation-actions { margin-top:.7rem; }
.student-reader-explanation { margin-top:.65rem;padding:.9rem 1rem;border:1px solid #d6e3f0;border-radius:14px;background:#f8fbff; }
.student-reader-explanation .reveal-label { display:block;margin-bottom:.35rem;color:var(--navy-800);font-size:.7rem;font-weight:850;text-transform:uppercase;letter-spacing:.04em; }
.student-reader-explanation p { margin:0;color:var(--ink-700);font-size:.88rem;line-height:1.65;white-space:pre-line; }
.student-reader-pagination { display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:.75rem;margin-top:1rem;padding:.75rem;border:1px solid var(--line);border-radius:16px;background:#fff; }
.student-reader-pagination > a:last-child { justify-self:end; }
.student-reader-page-chips { display:flex;align-items:center;justify-content:center;gap:.3rem; }
.student-reader-page-chips a { display:grid;place-items:center;min-width:34px;height:34px;padding:0 .4rem;border:1px solid var(--line);border-radius:9px;color:var(--ink-700);font-size:.75rem;font-weight:800;text-decoration:none; }
.student-reader-page-chips a.active { border-color:var(--navy-800);background:var(--navy-900);color:#fff; }
.student-reader-page-chips span { color:var(--ink-400); }
.student-reader-empty { margin-top:.5rem; }

@media (max-width: 980px) {
  .student-reader-hero { grid-template-columns:1fr; }
  .student-reader-filter-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .student-reader-filter-form .btn { width:100%; }
}

@media (max-width: 680px) {
  .student-reader-hero > div,.student-reader-mode-note { padding:1rem;border-radius:18px; }
  .student-reader-hero h1 { font-size:2rem; }
  .student-reader-hero-actions { display:grid;grid-template-columns:1fr; }
  .student-reader-hero-actions .btn { width:100%; }
  .student-reader-filter-card { padding:.9rem;border-radius:16px; }
  .student-reader-filter-head { display:grid;align-items:start; }
  .student-reader-filter-form { grid-template-columns:1fr; }
  .student-reader-options { grid-template-columns:1fr; }
  .student-readable-mcq-card { padding:.9rem;border-radius:16px; }
  .student-readable-mcq-head { align-items:flex-start; }
  .student-readable-topic { display:grid;justify-items:end;gap:.25rem; }
  .student-readable-topic span,.student-readable-topic small { max-width:170px; }
  .student-reader-option { min-height:58px;grid-template-columns:34px minmax(0,1fr) 18px;padding:.65rem; }
  .student-reader-toolbar { align-items:flex-start; }
  .student-reader-legend { display:none; }
  .student-reader-feedback { align-items:flex-start;flex-direction:column;gap:.15rem; }
  .student-reader-pagination { grid-template-columns:1fr 1fr; }
  .student-reader-page-chips { grid-column:1/-1;grid-row:1;flex-wrap:wrap; }
  .student-reader-pagination > a:first-child { grid-column:1;grid-row:2;justify-self:start; }
  .student-reader-pagination > a:last-child { grid-column:2;grid-row:2;justify-self:end; }
}

/* ===== MCQ Quality Center v10 ===== */
.quality-v10-hero{align-items:center;gap:28px}.quality-coverage-ring{width:118px;height:118px;min-width:118px;border-radius:50%;display:grid;place-content:center;text-align:center;border:10px solid #dbeafe;background:#fff;box-shadow:0 10px 30px rgba(15,23,42,.08)}.quality-coverage-ring strong{font-size:1.65rem;line-height:1;color:#0b2f68}.quality-coverage-ring span{font-size:.78rem;color:#64748b;margin-top:5px}.quality-kpi-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:18px 0}.quality-kpi{display:flex;flex-direction:column;gap:4px;padding:16px;border:1px solid #e2e8f0;border-radius:16px;background:#fff;text-decoration:none;color:#0f172a;box-shadow:0 4px 18px rgba(15,23,42,.04);transition:.18s ease}.quality-kpi:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(15,23,42,.08)}.quality-kpi span{font-size:.78rem;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}.quality-kpi strong{font-size:1.7rem;line-height:1.15}.quality-kpi small{color:#64748b}.quality-kpi-excellent{border-top:4px solid #16a34a}.quality-kpi-good{border-top:4px solid #0284c7}.quality-kpi-needs{border-top:4px solid #d97706}.quality-kpi-critical{border-top:4px solid #dc2626}.quality-workflow-strip{display:flex;align-items:center;gap:12px;padding:14px 18px;margin:0 0 18px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;overflow:auto}.quality-workflow-strip>div{display:flex;align-items:center;gap:10px;min-width:180px}.quality-workflow-strip b{display:grid;place-content:center;width:30px;height:30px;border-radius:50%;background:#0b2f68;color:#fff;flex:0 0 auto}.quality-workflow-strip span{display:flex;flex-direction:column}.quality-workflow-strip small{color:#64748b;white-space:nowrap}.quality-workflow-strip i{color:#94a3b8;font-style:normal;font-size:1.3rem}.quality-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}.quality-control-card{margin:0}.quality-control-card h2{margin:.2rem 0}.quality-inline-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-top:14px}.quality-inline-form label{min-width:130px;flex:1}.quality-inline-form .quality-rescan{align-self:center;min-width:210px}.quality-config-note{font-size:.88rem;padding:10px 12px;background:#fff7ed;border:1px solid #fed7aa;border-radius:10px;margin-top:12px}.quality-issue-cloud{display:flex;flex-wrap:wrap;gap:9px}.quality-issue-cloud a{display:flex;align-items:center;gap:8px;padding:8px 11px;border:1px solid #dbe3ee;border-radius:999px;text-decoration:none;background:#f8fafc;color:#334155}.quality-issue-cloud a:hover{border-color:#93c5fd;background:#eff6ff}.quality-issue-cloud b{background:#e2e8f0;border-radius:999px;padding:1px 7px;font-size:.78rem}.quality-mode-tabs{display:flex;gap:6px;flex-wrap:wrap}.quality-mode-tabs a{padding:8px 11px;border-radius:10px;text-decoration:none;color:#475569;background:#f1f5f9;font-size:.88rem;font-weight:650}.quality-mode-tabs a.active{background:#0b2f68;color:#fff}.quality-filter-bar{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(150px,.7fr) minmax(180px,1fr) auto auto;gap:10px;margin:16px 0}.quality-results-meta{padding:10px 0 14px;border-top:1px solid #eef2f7}.quality-bulk-bar{position:sticky;top:72px;z-index:12;display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 12px;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border:1px solid #dbe3ee;border-radius:12px;box-shadow:0 5px 18px rgba(15,23,42,.06);margin-bottom:12px}.quality-bulk-bar select{max-width:260px}.quality-question-list{display:grid;gap:14px}.quality-v10-card{display:grid;grid-template-columns:34px minmax(0,1fr) 235px;gap:14px;border:1px solid #e2e8f0;border-radius:16px;padding:16px;background:#fff}.quality-v10-card:hover{border-color:#cbd5e1;box-shadow:0 8px 25px rgba(15,23,42,.05)}.quality-v10-select{padding-top:4px}.quality-v10-select input{width:18px;height:18px}.quality-card-meta{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:7px}.quality-card-meta>span{font-size:.75rem;padding:3px 7px;border-radius:999px;background:#f1f5f9;color:#475569}.quality-v10-main h3{font-size:1.02rem;line-height:1.5;margin:5px 0 12px}.quality-option-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.quality-option-grid>div{display:flex;gap:9px;padding:9px 10px;border:1px solid #e2e8f0;border-radius:10px;background:#fafafa;min-width:0}.quality-option-grid b{display:grid;place-content:center;min-width:25px;height:25px;border-radius:7px;background:#e2e8f0}.quality-option-grid span{overflow-wrap:anywhere}.quality-option-grid>div.is-key{border-color:#86efac;background:#f0fdf4}.quality-option-grid>div.is-key b{background:#16a34a;color:#fff}.quality-explanation{margin-top:10px;padding:8px 10px;background:#f8fafc;border-radius:10px}.quality-explanation summary{cursor:pointer;font-weight:650;color:#334155}.quality-issue-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.quality-issue-tags span{font-size:.72rem;padding:4px 7px;border-radius:999px;background:#fff7ed;border:1px solid #fed7aa;color:#9a3412}.quality-duplicate-note{margin-top:10px;padding:8px 10px;border-radius:9px;background:#fef2f2;color:#991b1b;font-size:.85rem}.quality-score-panel{border-left:1px solid #e2e8f0;padding-left:14px;display:flex;flex-direction:column;gap:11px}.quality-score-circle{width:80px;height:80px;border-radius:50%;display:grid;place-content:center;text-align:center;margin:0 auto;border:8px solid #cbd5e1;background:#fff}.quality-score-circle strong{font-size:1.45rem;line-height:1}.quality-score-circle span{font-size:.72rem;color:#64748b}.quality-score-circle.excellent{border-color:#86efac}.quality-score-circle.good{border-color:#7dd3fc}.quality-score-circle.needs{border-color:#fdba74}.quality-score-circle.critical{border-color:#fca5a5}.quality-score-circle.unscanned{border-color:#e2e8f0}.quality-dimension-list{display:grid;gap:4px}.quality-dimension-list span{display:flex;justify-content:space-between;gap:10px;font-size:.79rem;color:#64748b}.quality-dimension-list b{color:#334155}.quality-psychometric-mini{display:grid;gap:3px;padding:9px;background:#f8fafc;border-radius:10px;font-size:.78rem}.quality-psychometric-mini .warning{color:#b45309;font-weight:700}.quality-card-actions{margin-top:auto;display:grid;gap:7px}.quality-card-actions .btn{width:100%;justify-content:center}.quality-standards-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.quality-standards-grid>div{padding:14px;border:1px solid #e2e8f0;border-radius:12px;background:#fafafa}.quality-standards-grid strong{font-size:1.25rem;display:block}.quality-standards-grid span{font-weight:700;color:#334155}.quality-standards-grid p{font-size:.85rem;color:#64748b;margin-bottom:0}.quality-revision-review{border:2px solid #93c5fd;box-shadow:0 12px 35px rgba(30,64,175,.08)}.quality-compare-head,.quality-compare-row{display:grid;grid-template-columns:1fr 1fr 110px;gap:12px}.quality-compare-head{padding:10px 12px;font-weight:800;color:#475569;background:#f1f5f9;border-radius:10px;margin:14px 0 6px}.quality-compare-row{padding:12px 0;border-bottom:1px solid #e2e8f0;align-items:start}.quality-compare-row label{font-size:.78rem;font-weight:700;color:#64748b}.quality-original-value{padding:10px;border-radius:9px;background:#f8fafc;border:1px solid #e2e8f0;min-height:42px;overflow-wrap:anywhere}.quality-compare-row textarea,.quality-compare-row input,.quality-compare-row select{width:100%}.quality-apply-toggle{display:flex!important;align-items:center;gap:7px;padding-top:26px;color:#0f5132!important}.quality-apply-toggle input{width:18px!important;height:18px}.quality-review-footer{display:grid;gap:12px;padding-top:14px}.quality-reject-form{margin-top:-41px;display:flex;justify-content:flex-end;pointer-events:none}.quality-reject-form button{pointer-events:auto}.btn.danger{background:#b91c1c;color:#fff;border-color:#b91c1c}.btn.danger:hover{background:#991b1b}.status-badge.status-approved{background:#dcfce7;color:#166534}
@media(max-width:1180px){.quality-kpi-grid{grid-template-columns:repeat(3,1fr)}.quality-control-grid{grid-template-columns:1fr}.quality-v10-card{grid-template-columns:30px minmax(0,1fr) 210px}.quality-filter-bar{grid-template-columns:1fr 1fr 1fr}.quality-filter-bar .btn{width:auto}}
@media(max-width:800px){.quality-v10-hero{align-items:flex-start}.quality-coverage-ring{width:92px;height:92px;min-width:92px;border-width:7px}.quality-kpi-grid{grid-template-columns:1fr 1fr}.quality-workflow-strip i{display:none}.quality-workflow-strip{align-items:stretch}.quality-v10-card{grid-template-columns:28px minmax(0,1fr)}.quality-score-panel{grid-column:2;border-left:0;border-top:1px solid #e2e8f0;padding:12px 0 0;display:grid;grid-template-columns:90px 1fr;align-items:start}.quality-card-actions{grid-column:1/-1}.quality-psychometric-mini{grid-column:1/-1}.quality-option-grid{grid-template-columns:1fr}.quality-filter-bar{grid-template-columns:1fr 1fr}.quality-filter-bar input:first-child{grid-column:1/-1}.quality-standards-grid{grid-template-columns:1fr 1fr}.quality-compare-head{display:none}.quality-compare-row{grid-template-columns:1fr}.quality-apply-toggle{padding-top:0!important}.quality-reject-form{margin-top:10px;justify-content:flex-start}.quality-bulk-bar{top:64px}}
@media(max-width:520px){.quality-kpi-grid{grid-template-columns:1fr 1fr}.quality-kpi{padding:12px}.quality-kpi strong{font-size:1.4rem}.quality-filter-bar{grid-template-columns:1fr}.quality-filter-bar input:first-child{grid-column:auto}.quality-standards-grid{grid-template-columns:1fr}.quality-v10-card{padding:12px;gap:8px}.quality-score-panel{grid-template-columns:78px 1fr}.quality-workflow-strip>div{min-width:155px}.quality-inline-form{display:grid;grid-template-columns:1fr}.quality-inline-form label,.quality-inline-form .quality-rescan{min-width:0}.quality-bulk-bar select{max-width:100%;width:100%}}
.status-badge.status-warning{background:#fff7ed;color:#9a3412;border-color:#fed7aa}

/* =========================================================
   Admin Workspace UX v11
   A task-oriented, searchable administration shell.
   ========================================================= */
.role-admin {
  --admin-sidebar-width: 284px;
  --admin-context-height: 92px;
  background: #f4f7fb;
}
.role-admin .admin-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1200;
  min-height: var(--header-height);
  border-bottom-color: #dbe4ef;
  background: rgba(255,255,255,.97);
}
.role-admin .admin-topbar .header-inner {
  width: 100%;
  max-width: none;
  padding: 0 1.15rem;
}
.role-admin .admin-topbar .brand-link { width: calc(var(--admin-sidebar-width) - 1.15rem); flex: 0 0 calc(var(--admin-sidebar-width) - 1.15rem); }
.role-admin .admin-topbar .brand-logo { width: 42px; height: 42px; flex-basis: 42px; border-radius: 12px; }
.admin-header-context { min-width: 0; display: grid; gap: .05rem; padding-left: 1.05rem; border-left: 1px solid var(--line); }
.admin-header-context span { color: var(--ink-500); font-size: .67rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.admin-header-context strong { overflow: hidden; color: var(--navy-950); font-size: .94rem; text-overflow: ellipsis; white-space: nowrap; }
.role-admin .admin-topbar .nav-toggle { display: none; }

.admin-app-shell { min-height: 100vh; padding-top: var(--header-height); }
.admin-sidebar {
  position: fixed !important;
  z-index: 900 !important;
  top: var(--header-height) !important;
  right: auto !important;
  bottom: 0;
  left: 0 !important;
  width: var(--admin-sidebar-width) !important;
  max-height: none !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-right: 1px solid #dce5ef !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}
.admin-sidebar-inner { height: 100%; display: flex; flex-direction: column; padding: .9rem .72rem .8rem; overflow: hidden; }
.admin-sidebar-user { display: flex; align-items: center; gap: .72rem; padding: .55rem .58rem .82rem; }
.admin-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg,var(--navy-900),var(--blue-600)); box-shadow: 0 8px 18px rgba(11,47,104,.16); font-weight: 900; }
.admin-sidebar-user > div:last-child { min-width: 0; display: grid; }
.admin-sidebar-user small { color: var(--ink-500); font-size: .67rem; font-weight: 700; }
.admin-sidebar-user strong { overflow: hidden; color: var(--ink-800); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-search { position: relative; display: block; margin: 0 .25rem .8rem; }
.admin-nav-search > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.admin-nav-search input { width: 100%; min-height: 42px; padding: .56rem 3.45rem .56rem .8rem; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-800); background: #f8fafc; font-size: .82rem; }
.admin-nav-search input:focus { border-color: #9abce5; outline: none; background: #fff; box-shadow: var(--focus); }
.admin-nav-search kbd { position: absolute; top: 50%; right: .48rem; padding: .15rem .35rem; border: 1px solid #d5dfeb; border-bottom-width: 2px; border-radius: 6px; color: var(--ink-500); background: #fff; font: 700 .62rem/1.3 ui-monospace,SFMono-Regular,Menlo,monospace; transform: translateY(-50%); pointer-events: none; }
.admin-nav-groups { flex: 1; min-height: 0; overflow-y: auto; padding: 0 .25rem .8rem; scrollbar-width: thin; }
.admin-nav-group { margin-bottom: .95rem; }
.admin-nav-group[hidden] { display: none !important; }
.admin-nav-group h2 { margin: 0 0 .32rem .52rem; color: #7b8ba0; font-size: .62rem; font-weight: 900; letter-spacing: .085em; text-transform: uppercase; }
.admin-nav-links { display: grid; gap: .18rem; }
.role-admin .admin-nav-link {
  position: relative;
  min-width: 0;
  display: grid !important;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  gap: .62rem;
  min-height: 52px !important;
  padding: .5rem .55rem !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  color: var(--ink-700) !important;
  background: transparent !important;
  text-align: left;
  box-shadow: none !important;
}
.role-admin .admin-nav-link:hover { border-color: #dfe8f2 !important; background: #f6f9fc !important; color: var(--navy-900) !important; }
.role-admin .admin-nav-link.active { border-color: #cddff3 !important; color: var(--navy-950) !important; background: linear-gradient(135deg,#edf5ff,#f5f9ff) !important; }
.role-admin .admin-nav-link.active::before { position: absolute; top: 10px; bottom: 10px; left: -3px; width: 4px; border-radius: 0 6px 6px 0; background: var(--blue-600); content: ""; }
.admin-nav-glyph { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dce6f1; border-radius: 10px; color: #4b6483; background: #fff; font-size: .64rem; font-weight: 900; letter-spacing: .02em; }
.admin-nav-link.active .admin-nav-glyph { border-color: #bcd4ef; color: var(--navy-900); background: #fff; box-shadow: 0 5px 12px rgba(11,47,104,.08); }
.admin-nav-copy { min-width: 0; display: grid; gap: .04rem; }
.admin-nav-copy strong { overflow: hidden; font-size: .8rem; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-copy small { overflow: hidden; color: var(--ink-500); font-size: .65rem; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.admin-nav-empty { padding: 1rem .55rem; color: var(--ink-500); font-size: .78rem; text-align: center; }
.admin-sidebar-footer { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; padding: .7rem .25rem 0; border-top: 1px solid var(--line); }
.admin-sidebar-footer a { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-700); background: #fff; font-size: .72rem; font-weight: 800; }
.admin-sidebar-footer a:hover { border-color: #bfcde0; background: #f8fafc; }
.admin-sidebar-footer .admin-sidebar-logout { color: var(--red-700); }
.admin-sidebar-scrim { display: none; }

.admin-workspace { min-width: 0; padding-left: var(--admin-sidebar-width); }
.admin-context-bar {
  position: sticky;
  top: var(--header-height);
  z-index: 700;
  min-height: var(--admin-context-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: .78rem clamp(1rem,2.2vw,2rem);
  border-bottom: 1px solid #e0e7ef;
  background: rgba(248,250,253,.96);
  backdrop-filter: blur(14px) saturate(125%);
}
.admin-context-copy { min-width: 0; display: grid; gap: .12rem; }
.admin-breadcrumb { display: flex; align-items: center; gap: .35rem; color: var(--ink-500); font-size: .68rem; font-weight: 750; }
.admin-breadcrumb a { color: var(--ink-500); }
.admin-breadcrumb i { font-style: normal; opacity: .55; }
.admin-context-copy h1 { font-size: clamp(1.25rem,2vw,1.72rem); letter-spacing: -.02em; }
.admin-context-copy p { max-width: 760px; overflow: hidden; color: var(--ink-600); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.admin-context-actions { display: flex; align-items: center; justify-content: flex-end; gap: .48rem; flex: 0 0 auto; }
.admin-context-actions .btn { min-height: 38px; padding: .48rem .72rem; font-size: .76rem; }
.admin-main { padding-top: 1.25rem; }
.role-admin .admin-container { width: min(1560px, calc(100% - 2rem)); }
.role-admin .site-main { min-width: 0; }
.role-admin .site-main > .container { min-width: 0; }

/* Remove legacy duplicated admin tab rows; the sidebar is now the single navigation model. */
.role-admin .admin-tabs { display: none !important; }

/* Admin page visual hierarchy and density. */
.role-admin .hero { margin-bottom: 1rem; padding: clamp(1rem,2vw,1.45rem); border: 1px solid #dfe7f0; border-radius: 18px; background: linear-gradient(135deg,#fff,#f8fbff); box-shadow: 0 8px 24px rgba(7,27,58,.045); }
.role-admin .hero h1 { font-size: clamp(1.55rem,2.5vw,2.35rem); }
.role-admin .card { border-color: #dfe7f0; border-radius: 16px; box-shadow: 0 5px 18px rgba(7,27,58,.045); }
.role-admin .card:hover { border-color: #d5e0ec; }
.role-admin .card h2 { font-size: clamp(1.18rem,1.7vw,1.52rem); }
.role-admin .card h3 { font-size: 1rem; }
.role-admin .section-head { gap: 1rem; }
.role-admin .table-wrap { border-radius: 13px; border-color: #dce5ef; background: #fff; }
.role-admin table { font-size: .82rem; }
.role-admin table th { position: sticky; top: 0; z-index: 2; padding: .65rem .72rem; color: #415874; background: #f4f7fb; font-size: .67rem; letter-spacing: .035em; text-transform: uppercase; }
.role-admin table td { padding: .65rem .72rem; }
.role-admin table tbody tr { transition: background .14s ease; }
.role-admin table tbody tr:hover td { background: #fafcff; }
.role-admin label { color: var(--ink-700); font-size: .79rem; font-weight: 760; }
.role-admin input,
.role-admin select,
.role-admin textarea { border-color: #d5dfeb; background: #fff; }
.role-admin input:focus,
.role-admin select:focus,
.role-admin textarea:focus { border-color: #8eb4e2; box-shadow: var(--focus); }
.role-admin .btn { border-radius: 10px; font-weight: 820; }
.role-admin .btn.danger { box-shadow: none; }
.role-admin .pill { font-size: .68rem; }
.role-admin .alert { border-radius: 12px; }
.role-admin details.card > summary,
.role-admin details.admin-tool-panel > summary { cursor: pointer; list-style: none; }
.role-admin details.card > summary::-webkit-details-marker,
.role-admin details.admin-tool-panel > summary::-webkit-details-marker { display: none; }

/* Admin dashboard / command center */
.admin-command-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); gap: 1.2rem; align-items: center; padding: clamp(1.2rem,2.4vw,2rem); border: 1px solid #d8e4f1; border-radius: 22px; background: linear-gradient(125deg,#0b2f68 0%,#164d91 64%,#1f66bd 100%); box-shadow: 0 20px 45px rgba(11,47,104,.15); }
.admin-command-hero::after { position: absolute; width: 330px; height: 330px; top: -180px; right: -90px; border-radius: 50%; background: rgba(255,255,255,.08); content: ""; }
.admin-command-hero-copy { position: relative; z-index: 1; display: grid; gap: .65rem; }
.admin-command-hero .eyebrow { margin: 0; color: #a9d6ff; }
.admin-command-hero h1 { color: #fff; font-size: clamp(1.65rem,3vw,2.65rem); }
.admin-command-hero p { max-width: 760px; color: #dcecff; }
.admin-command-hero-actions { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .25rem; }
.admin-command-hero-actions .btn { border-color: rgba(255,255,255,.18); }
.admin-command-hero-actions .btn.secondary { color: #fff; background: rgba(255,255,255,.11); }
.admin-command-hero-actions .btn.secondary:hover { background: rgba(255,255,255,.18); }
.admin-command-hero-status { position: relative; z-index: 1; display: grid; gap: .65rem; padding: 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.1); backdrop-filter: blur(8px); }
.admin-command-hero-status strong { color: #fff; }
.admin-command-hero-status span { color: #d6e9ff; font-size: .78rem; }
.admin-command-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .8rem; margin-top: 1rem; }
.admin-command-metric { min-width: 0; display: grid; gap: .22rem; padding: 1rem; border: 1px solid #dfe7f0; border-radius: 15px; background: #fff; box-shadow: 0 5px 16px rgba(7,27,58,.035); }
.admin-command-metric span { color: var(--ink-500); font-size: .69rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.admin-command-metric strong { color: var(--navy-950); font-size: clamp(1.45rem,2.5vw,2rem); line-height: 1; }
.admin-command-metric small { color: var(--ink-500); font-size: .7rem; }
.admin-quick-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
.admin-quick-action { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: .8rem; align-items: center; padding: 1rem; border: 1px solid #dfe7f0; border-radius: 15px; color: inherit; background: #fff; transition: transform .15s ease,border-color .15s ease,box-shadow .15s ease; }
.admin-quick-action:hover { transform: translateY(-2px); border-color: #bcd3ec; color: inherit; box-shadow: 0 12px 28px rgba(7,27,58,.08); }
.admin-quick-action-glyph { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--navy-900); background: #edf5ff; font-size: .7rem; font-weight: 900; }
.admin-quick-action-copy { min-width: 0; display: grid; gap: .12rem; }
.admin-quick-action-copy strong { color: var(--ink-900); font-size: .88rem; }
.admin-quick-action-copy small { color: var(--ink-500); font-size: .72rem; line-height: 1.35; }
.admin-dashboard-section { margin-top: 1.1rem; }
.admin-dashboard-section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; }
.admin-dashboard-section-head h2 { font-size: 1.25rem; }
.admin-dashboard-section-head p { color: var(--ink-500); font-size: .78rem; }
.admin-attention-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; }
.admin-attention-card { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 1rem; border: 1px solid #dfe7f0; border-radius: 14px; background: #fff; }
.admin-attention-card strong { display: block; color: var(--ink-900); font-size: .86rem; }
.admin-attention-card small { color: var(--ink-500); }
.admin-attention-number { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: var(--navy-900); background: #eef5ff; font-weight: 900; }
.admin-tool-panel { margin-top: 1rem; padding: 0; border: 1px solid #dfe7f0; border-radius: 16px; background: #fff; box-shadow: 0 5px 18px rgba(7,27,58,.04); }
.admin-tool-panel > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; }
.admin-tool-panel > summary::after { color: var(--ink-500); content: "+"; font-size: 1.35rem; line-height: 1; }
.admin-tool-panel[open] > summary::after { content: "–"; }
.admin-tool-panel > summary strong { display: block; color: var(--ink-900); }
.admin-tool-panel > summary small { display: block; margin-top: .12rem; color: var(--ink-500); font-weight: 500; }
.admin-tool-panel-body { padding: 0 1.1rem 1.1rem; border-top: 1px solid #edf1f5; }
.admin-tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; padding-top: 1rem; }
.admin-tool-card { padding: 1rem; border: 1px solid #e2e9f1; border-radius: 14px; background: #fafcff; }
.admin-tool-card h3 { margin-bottom: .35rem; }
.admin-tool-card .stack { gap: .7rem; }

/* Keyboard and focus accessibility for admin. */
.role-admin a:focus-visible,
.role-admin button:focus-visible,
.role-admin summary:focus-visible { outline: 3px solid rgba(35,104,216,.25); outline-offset: 2px; }

@media (max-width: 1280px) {
  .role-admin { --admin-sidebar-width: 260px; }
  .admin-context-actions .btn.ghost:first-child { display: none; }
  .admin-command-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1080px) {
  .role-admin .admin-topbar .brand-link { width: auto; flex: 0 1 auto; }
  .admin-header-context { display: none; }
  .role-admin .admin-topbar .nav-toggle { display: inline-flex; }
  .admin-sidebar {
    z-index: 1150 !important;
    width: min(330px,88vw) !important;
    box-shadow: 18px 0 50px rgba(7,27,58,.18) !important;
    transform: translateX(-105%) !important;
    transition: transform .2s ease !important;
  }
  .role-admin.nav-open .admin-sidebar { transform: translateX(0) !important; }
  .admin-sidebar-scrim { position: fixed; z-index: 1100; inset: var(--header-height) 0 0; display: block; visibility: hidden; border: 0; background: rgba(7,27,58,.38); opacity: 0; transition: opacity .18s ease,visibility .18s ease; }
  .role-admin.nav-open .admin-sidebar-scrim { visibility: visible; opacity: 1; }
  .admin-workspace { padding-left: 0; }
  .admin-context-bar { padding-inline: 1rem; }
  .admin-context-actions { display: none; }
  .role-admin .admin-container { width: min(100% - 1.3rem,1560px); }
  .admin-command-hero { grid-template-columns: 1fr; }
  .admin-command-hero-status { max-width: 620px; }
  .admin-quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-tool-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .role-admin { --header-height: 68px; --admin-context-height: 80px; }
  .role-admin .admin-topbar .header-inner { padding: 0 .75rem; }
  .role-admin .admin-topbar .brand-logo { width: 38px; height: 38px; flex-basis: 38px; }
  .role-admin .admin-topbar .brand-text small { display: none; }
  .role-admin .admin-topbar .brand-text strong { max-width: 180px; }
  .role-admin .admin-role-badge { display: none; }
  .admin-context-bar { min-height: 74px; padding: .62rem .72rem; }
  .admin-breadcrumb { display: none; }
  .admin-context-copy h1 { font-size: 1.15rem; }
  .admin-context-copy p { font-size: .7rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
  .admin-main { padding-top: .75rem; }
  .role-admin .admin-container { width: calc(100% - .9rem); }
  .admin-command-hero { padding: 1.05rem; border-radius: 17px; }
  .admin-command-hero h1 { font-size: 1.55rem; }
  .admin-command-metrics,
  .admin-quick-actions,
  .admin-attention-grid { grid-template-columns: 1fr; }
  .admin-command-metric { grid-template-columns: 1fr auto; align-items: center; }
  .admin-command-metric span,.admin-command-metric small { grid-column: 1; }
  .admin-command-metric strong { grid-column: 2; grid-row: 1 / span 2; }
  .role-admin .card { border-radius: 14px; }
  .role-admin table { font-size: .78rem; }
  .role-admin .admin-five-row-scroll { max-height: 60vh; }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,.admin-sidebar-scrim,.admin-quick-action { transition: none !important; }
}

.admin-local-nav {
  position: sticky;
  top: calc(var(--header-height) + var(--admin-context-height) + .55rem);
  z-index: 35;
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0 0 1rem;
  padding: .5rem .6rem;
  overflow-x: auto;
  border: 1px solid #dfe7f0;
  border-radius: 13px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 7px 18px rgba(7,27,58,.045);
  scrollbar-width: thin;
}
.admin-local-nav > span { flex: 0 0 auto; padding: 0 .35rem; color: var(--ink-500); font-size: .65rem; font-weight: 900; letter-spacing: .065em; text-transform: uppercase; }
.admin-local-nav a { flex: 0 0 auto; min-height: 34px; display: inline-flex; align-items: center; padding: .4rem .64rem; border: 1px solid transparent; border-radius: 9px; color: var(--ink-700); background: #f7f9fc; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.admin-local-nav a:hover { border-color: #cbd9e8; color: var(--navy-900); background: #eef5ff; }
.role-admin .hero > a[href*="/logout"] { display: none !important; }
.role-admin .hero .admin-heading { align-items: flex-start; }
.role-admin .hero .admin-logo { width: 52px; height: 52px; border-radius: 13px; }

@media (max-width: 720px) {
  .admin-local-nav { top: calc(var(--header-height) + 74px + .35rem); margin-bottom: .7rem; border-radius: 11px; }
  .admin-local-nav > span { display: none; }
}

/* Model Papers v12 */
.home-model-papers{position:relative}
.model-paper-home-grid,.model-paper-public-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.model-paper-home-card,.model-paper-public-card{display:flex;flex-direction:column;gap:14px;min-height:100%;border:1px solid rgba(16,55,105,.11);box-shadow:0 14px 32px rgba(14,45,86,.07)}
.model-paper-home-card h3,.model-paper-public-card h2{margin:0;line-height:1.25}
.model-paper-home-card p,.model-paper-public-card p{margin:0;color:var(--muted,#64748b);flex:1}
.model-paper-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.model-paper-count{display:inline-flex;align-items:center;min-height:30px;padding:5px 10px;border-radius:999px;background:rgba(14,78,156,.08);color:#0b4b95;font-weight:800;font-size:.82rem;letter-spacing:.02em}
.model-paper-meta-row{display:flex;flex-wrap:wrap;gap:8px 14px;padding-top:4px;color:var(--muted,#64748b);font-size:.86rem}
.model-paper-meta-row span{display:inline-flex;align-items:center;gap:6px}
.model-paper-meta-row span:before{content:'✓';font-weight:900;color:#16825d}
.model-paper-home-empty,.model-paper-empty{grid-column:1/-1}
.model-paper-hero{align-items:flex-end}
.model-paper-attempt-hero{margin-bottom:18px}
.model-paper-progressbar{position:sticky;top:10px;z-index:35;box-shadow:0 10px 28px rgba(13,46,86,.12)}
.model-paper-form{padding-bottom:96px}
.model-paper-submit-bar{z-index:38}
.model-paper-result-stats{margin-bottom:26px}
.model-paper-review-head{margin-top:26px}
.model-paper-review-list .result-question-card{overflow:hidden}
.model-paper-review-list .result-option{position:relative;display:flex;align-items:center;gap:12px;border:1px solid var(--border,#d9e1ea);border-radius:12px;padding:12px 14px;margin-bottom:9px;background:#fff}
.model-paper-review-list .result-option.correct-answer{border-color:#2a9d72;background:rgba(42,157,114,.08)}
.model-paper-review-list .result-option.wrong-answer{border-color:#d05a5a;background:rgba(208,90,90,.07)}
.model-paper-review-list .result-option.student-answer:not(.correct-answer){box-shadow:inset 3px 0 0 #d05a5a}
.answer-state-label{margin-left:auto;font-size:.78rem;white-space:nowrap;color:#176748}
.result-option.wrong-answer .answer-state-label{color:#a33a3a}

.admin-model-paper-upload,.admin-model-paper-library{margin-bottom:22px}
.model-paper-upload-form{margin-top:14px}
.model-paper-requirements{display:flex;flex-wrap:wrap;gap:8px}
.model-paper-requirements span{padding:7px 10px;border-radius:999px;background:#f3f7fb;border:1px solid #dfe7ef;font-size:.82rem;font-weight:700;color:#40536b}
.model-paper-admin-table td{vertical-align:middle}
.table-subtext{display:block;margin-top:4px;color:var(--muted,#64748b);font-size:.78rem;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.model-paper-admin-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.model-paper-admin-actions form{margin:0}
.model-paper-row-tools{position:relative}
.model-paper-row-tools>summary{cursor:pointer;list-style:none;border:1px solid var(--border,#d9e1ea);border-radius:9px;padding:7px 10px;font-weight:700;background:#fff}
.model-paper-row-tools>summary::-webkit-details-marker{display:none}
.model-paper-row-tools-panel{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:min(320px,80vw);padding:14px;background:#fff;border:1px solid var(--border,#d9e1ea);border-radius:14px;box-shadow:0 18px 46px rgba(15,42,78,.18)}
.model-paper-row-tools-panel label{display:grid;gap:6px}
.status-live{background:rgba(28,150,105,.11)!important;color:#126746!important;border-color:rgba(28,150,105,.2)!important}

@media (max-width:980px){
  .model-paper-home-grid,.model-paper-public-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:680px){
  .model-paper-home-grid,.model-paper-public-grid{grid-template-columns:1fr}
  .model-paper-progressbar{top:6px;align-items:stretch}
  .model-paper-progressbar .btn{width:100%}
  .model-paper-admin-actions{align-items:stretch}
  .model-paper-admin-actions>.btn,.model-paper-admin-actions>form,.model-paper-admin-actions>form .btn,.model-paper-row-tools{width:100%}
  .model-paper-row-tools>summary{text-align:center}
  .model-paper-row-tools-panel{position:static;width:100%;margin-top:8px;box-shadow:none}
  .answer-state-label{white-space:normal;text-align:right}
}

/* Model Papers v13: multi-sheet import + instant answer feedback */
.model-paper-workbook-guide{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0 18px}
.model-paper-workbook-guide>div{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1px solid #dfe7ef;border-radius:14px;background:#f8fbff}
.model-paper-workbook-guide>div>strong{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;border-radius:10px;background:#0b4b95;color:#fff;font-size:.9rem}
.model-paper-workbook-guide span{display:grid;gap:3px}.model-paper-workbook-guide b{color:#17314f}.model-paper-workbook-guide small{color:var(--muted,#64748b);line-height:1.45}
.model-paper-format-example{border:1px solid #dfe7ef;border-radius:12px;background:#fbfdff}.model-paper-format-example>summary{cursor:pointer;padding:12px 14px;font-weight:800;color:#284865}.model-paper-format-example-body{padding:0 14px 13px}.model-paper-format-example-body p{margin:5px 0;color:#53677f;font-size:.9rem}
.model-paper-live-note{margin:0 0 16px}
.model-paper-live-card{transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
.model-paper-live-card.is-checking{opacity:.82}.model-paper-live-card.answer-locked{border-color:#ccd9e7}.model-paper-live-card.instant-correct{box-shadow:inset 4px 0 0 #208a62}.model-paper-live-card.instant-wrong{box-shadow:inset 4px 0 0 #c94e4e}
.model-paper-live-option{position:relative;transition:border-color .16s ease,background .16s ease,transform .16s ease}.model-paper-live-option:not(:has(input:disabled)):hover{transform:translateY(-1px)}
.model-paper-live-option.correct-answer{border-color:#2a9d72!important;background:rgba(42,157,114,.1)!important}.model-paper-live-option.wrong-answer{border-color:#d05a5a!important;background:rgba(208,90,90,.08)!important}
.model-paper-live-option input:disabled{cursor:default}.model-option-state{margin-left:auto;font-size:.76rem;font-weight:900;color:#176748}.model-paper-live-option.wrong-answer .model-option-state{color:#a33a3a}
.model-paper-instant-feedback{margin-top:12px;padding:12px 14px;border-radius:12px;font-size:.93rem;line-height:1.5}.model-paper-instant-feedback.is-correct{background:rgba(42,157,114,.09);border:1px solid rgba(42,157,114,.25);color:#135f43}.model-paper-instant-feedback.is-wrong{background:rgba(208,90,90,.075);border:1px solid rgba(208,90,90,.22);color:#8d3030}.model-paper-instant-feedback.is-error{background:#fff7e8;border:1px solid #eed39c;color:#7b5512}
.student-question-jump.correct{border-color:#2a9d72!important;color:#176748!important;background:rgba(42,157,114,.1)!important}.student-question-jump.wrong{border-color:#d05a5a!important;color:#923737!important;background:rgba(208,90,90,.08)!important}
@media (max-width:800px){.model-paper-workbook-guide{grid-template-columns:1fr}.model-option-state{font-size:.7rem;text-align:right;max-width:90px}}


/* SEO keyword discovery v14 */
.seo-keyword-intro-panel{margin:18px 0;padding:22px;border-left:4px solid #0b4b95;background:linear-gradient(135deg,#f8fbff,#fff)}
.seo-keyword-intro-panel h2{margin:0 0 8px;color:#17314f}.seo-keyword-intro-panel p{margin:0;max-width:950px;line-height:1.7;color:#53677f}
.model-paper-seo-panel{margin-top:24px}.model-paper-keyword-section{margin-top:24px}.compact-model-paper-grid{grid-template-columns:repeat(auto-fit,minmax(250px,1fr))}
@media (max-width:680px){.seo-keyword-intro-panel{padding:17px}.compact-model-paper-grid{grid-template-columns:1fr}}

/* Model paper title-derived SEO tags */
.model-paper-title-tags{margin:0 0 18px;padding:20px 22px;border-radius:22px}
.model-paper-title-tags-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.model-paper-title-tags h2{margin:4px 0 6px;font-size:clamp(1.2rem,2vw,1.6rem)}
.model-paper-title-tags p{margin:0;max-width:820px}
.model-paper-tag-cloud{display:flex;flex-wrap:wrap;gap:9px}
.model-paper-seo-tag{display:inline-flex;align-items:center;min-height:38px;padding:8px 13px;border:1px solid #d8e2ef;border-radius:999px;background:#f8fbff;color:#17365f;font-weight:750;font-size:.9rem;text-decoration:none;line-height:1.2;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease}
.model-paper-seo-tag:hover,.model-paper-seo-tag:focus-visible{transform:translateY(-1px);border-color:#9eb9dc;background:#fff;box-shadow:0 6px 18px rgba(25,67,120,.10);outline:none}
.model-paper-search-context{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 18px;padding:18px 20px}
.model-paper-search-context h2{margin:4px 0 5px}
.model-paper-search-context p{margin:0}
@media (max-width:720px){.model-paper-title-tags{padding:17px}.model-paper-title-tags-head,.model-paper-search-context{display:block}.model-paper-search-context .btn{margin-top:14px;width:100%}.model-paper-tag-cloud{gap:7px}.model-paper-seo-tag{font-size:.84rem;min-height:36px;padding:7px 11px}}

/* Model Papers v16.2: Free/Pro access tiers and clearer preparation guidance */
.model-paper-pro-callout{margin:0 0 16px;border-color:rgba(109,63,229,.2);background:linear-gradient(135deg,var(--violet-50),#fff)}
.model-paper-pro-card{border-color:rgba(109,63,229,.2);background:linear-gradient(180deg,#fff,var(--violet-50))}
.model-paper-pro-pill{background:rgba(109,63,229,.1)!important;color:var(--violet-600)!important;border-color:rgba(109,63,229,.22)!important}
.model-paper-current-affairs-note{margin:0 0 18px;line-height:1.6}
.model-paper-locked-card{max-width:820px;margin:0 auto 18px;padding:clamp(22px,4vw,38px);text-align:left;border-color:rgba(109,63,229,.2);background:linear-gradient(135deg,var(--violet-50),#fff)}
.model-paper-locked-card h2{margin:6px 0 8px}
.model-paper-tier-form{display:flex;align-items:center;gap:8px;min-width:190px}
.model-paper-tier-form select{min-width:92px}
@media (max-width:680px){.model-paper-tier-form{align-items:stretch;flex-direction:column}.model-paper-tier-form select,.model-paper-tier-form .btn{width:100%}}

/* v16.4 — complete MCQ import rejection ledger */
.admin-technical-details{margin-top:.25rem}
.admin-technical-details>summary{cursor:pointer;font-weight:700;color:var(--muted,#5b6f8f)}
.import-report-file-actions{align-items:center;gap:.5rem;padding:.4rem 0}
.import-rejection-ledger-card{margin-top:1rem}
.import-rejection-table-wrap{max-height:68vh;border:1px solid rgba(15,50,96,.10);border-radius:14px}
.import-rejection-table{min-width:1500px}
.import-rejection-table th{position:sticky;top:0;z-index:2;background:var(--surface,#fff)}
.import-rejection-table td{vertical-align:top;white-space:normal;line-height:1.45}
.rejection-stem-cell{min-width:260px;max-width:420px}
.rejection-options{min-width:280px;display:grid;gap:.35rem}
.rejection-options>div{padding:.35rem .45rem;border-radius:8px;background:rgba(22,82,156,.045)}
.rejection-explanation-cell{min-width:260px;max-width:420px}
.rejection-reason-cell{min-width:280px;max-width:430px;color:#8a2d1d}
@media (max-width:760px){
  .import-rejection-table-wrap{max-height:none}
  .import-rejection-table{min-width:1350px}
}

/* v16.5 — manageable sheet-wise MCQ import rejection ledger */
.rejection-ledger-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;padding:1rem;border:1px solid rgba(15,50,96,.09);border-radius:16px;background:rgba(22,82,156,.025)}
.rejection-global-search{display:grid;gap:.35rem;flex:1 1 420px;max-width:760px}.rejection-global-search>span,.rejection-sheet-search-wrap>span{font-size:.82rem;font-weight:800;color:var(--muted,#5b6f8f)}
.rejection-sheet-groups{display:grid;gap:.85rem}.rejection-sheet-group{border:1px solid rgba(15,50,96,.11);border-radius:16px;background:var(--surface,#fff);overflow:hidden;box-shadow:0 4px 16px rgba(15,50,96,.035)}
.rejection-sheet-group[open]{border-color:rgba(22,82,156,.22);box-shadow:0 10px 28px rgba(15,50,96,.07)}
.rejection-sheet-summary{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.1rem;cursor:pointer;list-style:none;background:linear-gradient(180deg,#fff,rgba(22,82,156,.025))}.rejection-sheet-summary::-webkit-details-marker{display:none}
.rejection-sheet-summary:after{content:'▾';font-size:1.1rem;color:var(--muted,#5b6f8f);transition:transform .18s ease}.rejection-sheet-group[open]>.rejection-sheet-summary:after{transform:rotate(180deg)}
.rejection-sheet-title{display:flex;align-items:center;gap:.7rem;min-width:0}.rejection-sheet-title>span:last-child{display:grid;min-width:0}.rejection-sheet-title strong{font-size:1rem;color:var(--ink,#10284a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.rejection-sheet-title small{margin-top:.15rem;color:var(--muted,#5b6f8f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:540px}.rejection-sheet-icon{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:rgba(22,82,156,.08);color:var(--primary,#16529c);font-weight:900;flex:0 0 auto}
.rejection-sheet-summary-meta{display:flex;align-items:center;justify-content:flex-end;gap:.4rem;flex-wrap:wrap;margin-left:auto}.pill.subtle{background:rgba(15,50,96,.04);color:var(--muted,#5b6f8f);border-color:rgba(15,50,96,.09)}.pill.warning{background:#fff4df;color:#8b5200;border-color:#f3d08b}
.rejection-sheet-content{padding:1rem;border-top:1px solid rgba(15,50,96,.08);background:rgba(247,250,255,.55)}.rejection-sheet-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:.8rem}.rejection-sheet-search-wrap{display:grid;gap:.35rem;flex:1 1 320px;max-width:620px}.rejection-sheet-actions{align-items:center;justify-content:flex-end}
.rejection-record-list{display:grid;gap:.55rem}.rejection-record{border:1px solid rgba(15,50,96,.09);border-radius:13px;background:#fff;overflow:hidden}.rejection-record[hidden]{display:none!important}.rejection-record[open]{border-color:rgba(187,89,41,.24);box-shadow:0 5px 18px rgba(15,50,96,.05)}
.rejection-record>summary{display:grid;grid-template-columns:auto minmax(220px,1.7fr) minmax(190px,1.1fr) auto;align-items:center;gap:.8rem;padding:.8rem .9rem;cursor:pointer;list-style:none}.rejection-record>summary::-webkit-details-marker{display:none}.rejection-record>summary:hover{background:rgba(22,82,156,.025)}
.rejection-row-badge{display:inline-flex;align-items:center;justify-content:center;padding:.3rem .5rem;border-radius:8px;background:rgba(22,82,156,.07);font-weight:800;font-size:.78rem;color:var(--primary,#16529c);white-space:nowrap}.rejection-record-stem{font-weight:750;color:var(--ink,#10284a);line-height:1.35}.rejection-record-reason{font-size:.86rem;color:#8a2d1d;line-height:1.35}.rejection-type-pill{white-space:nowrap}
.rejection-record-body{display:grid;grid-template-columns:minmax(300px,1.35fr) minmax(250px,.8fr) minmax(280px,1fr);gap:.8rem;padding:.9rem;border-top:1px solid rgba(15,50,96,.08);background:rgba(247,250,255,.66)}.rejection-detail-block{padding:.9rem;border:1px solid rgba(15,50,96,.08);border-radius:12px;background:#fff;min-width:0}.rejection-detail-block h4{margin:0 0 .6rem;font-size:.9rem}.rejection-full-stem{font-weight:700;line-height:1.5}.rejection-meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:.6rem;margin:0}.rejection-meta-grid>div{padding:.55rem;border-radius:9px;background:rgba(22,82,156,.035)}.rejection-meta-grid dt{font-size:.72rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#5b6f8f);font-weight:800}.rejection-meta-grid dd{margin:.15rem 0 0;font-weight:700;overflow-wrap:anywhere}.rejection-reason-panel.compact{margin:.25rem 0 .85rem;padding:.7rem .8rem;border-radius:10px}
@media (max-width:980px){.rejection-record>summary{grid-template-columns:auto 1fr auto}.rejection-record-reason{grid-column:2/4}.rejection-record-body{grid-template-columns:1fr}.rejection-sheet-summary-meta .pill.subtle{display:none}}
@media (max-width:680px){.rejection-sheet-summary{align-items:flex-start;padding:.85rem}.rejection-sheet-summary-meta{justify-content:flex-end}.rejection-sheet-title small{max-width:200px}.rejection-sheet-content{padding:.75rem}.rejection-record>summary{grid-template-columns:auto 1fr;gap:.55rem}.rejection-record-reason{grid-column:1/3}.rejection-type-pill{grid-column:1/3;justify-self:start}.rejection-sheet-actions .btn{width:100%}.rejection-meta-grid{grid-template-columns:1fr}.rejection-ledger-toolbar{padding:.8rem}}

/* v16.6 rejected-question queue: filter clarity + workbook/sheet grouping */
.rejected-active-filter{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid #f2d089;background:#fff9e9;border-radius:16px}.rejected-active-filter>div{display:grid;gap:3px}.rejected-active-filter span{color:var(--muted,#5d708f);font-size:.92rem}.rejected-empty-state{display:grid;gap:12px;justify-items:center;text-align:center}.rejected-empty-state p{margin:0;color:var(--muted,#5d708f)}.rejected-sheetwise-intro{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.rejected-sheetwise-intro>div{display:grid;gap:4px}.rejected-workbook-list{display:grid;gap:20px}.rejected-workbook-block{border:1px solid #dbe6f4;border-radius:20px;background:#fbfdff;overflow:hidden}.rejected-workbook-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid #e5edf7;background:#f7faff}.rejected-workbook-heading h3{margin:2px 0 0;font-size:1.05rem;overflow-wrap:anywhere}.rejected-sheet-list{display:grid;gap:12px;padding:14px}.rejected-sheet-group{border:1px solid #dce6f3;border-radius:16px;background:#fff;overflow:hidden}.rejected-sheet-group>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;font-weight:800;color:#17365f}.rejected-sheet-group>summary::-webkit-details-marker{display:none}.rejected-sheet-group>summary::after{content:'+';font-size:1.35rem;line-height:1;color:#315d93}.rejected-sheet-group[open]>summary::after{content:'−'}.rejected-sheet-group[open]>summary{border-bottom:1px solid #e6edf6;background:#f9fbfe}.rejected-sheet-name{overflow-wrap:anywhere}.rejected-sheet-count{font-size:.86rem;color:#49698e;background:#edf4fb;border-radius:999px;padding:6px 10px;white-space:nowrap}.rejected-sheet-group .rejected-question-list{padding:0}.rejected-sheet-group .rejected-question-row{border:0;border-bottom:1px solid #edf2f7;border-radius:0;margin:0;padding:16px 18px}.rejected-sheet-group .rejected-question-row:last-child{border-bottom:0}.rejected-sheet-group .rejected-question-row:hover{background:#fbfdff}
@media(max-width:760px){.rejected-active-filter,.rejected-sheetwise-intro,.rejected-workbook-heading,.rejected-sheet-group>summary{align-items:flex-start;flex-direction:column}.rejected-active-filter .btn{width:100%}.rejected-sheet-count{white-space:normal}.rejected-workbook-heading .pill{align-self:flex-start}}

/* ==========================================================================\n   Student Experience v17 — focused preparation workspace\n   ========================================================================== */
@media (min-width: 1081px) {
  .role-student:not(.student-focus-mode) .primary-nav { display: none; }
  .role-student:not(.student-focus-mode) .nav-toggle { display: none; }
}

.student-app-shell {
  width: min(1480px, calc(100% - 1.5rem));
  margin: .75rem auto 0;
  display: grid;
  grid-template-columns: 252px minmax(0,1fr);
  gap: .85rem;
  align-items: start;
}
.student-sidebar {
  position: sticky;
  top: calc(var(--header-height) + .75rem);
  height: calc(100vh - var(--header-height) - 1.5rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.student-sidebar-inner { height: 100%; display: flex; flex-direction: column; padding: .8rem; }
.student-sidebar-profile { display:flex;align-items:center;gap:.7rem;padding:.65rem .65rem .85rem;border-bottom:1px solid #edf1f5; }
.student-avatar { width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px;border-radius:14px;color:#fff;background:linear-gradient(135deg,var(--navy-800),var(--blue-600));font-weight:900;box-shadow:0 8px 18px rgba(35,104,216,.18); }
.student-sidebar-profile div:last-child { min-width:0;display:grid; }
.student-sidebar-profile small { color:var(--ink-500);font-size:.68rem;font-weight:750; }
.student-sidebar-profile strong { overflow:hidden;color:var(--navy-950);font-size:.86rem;text-overflow:ellipsis;white-space:nowrap; }
.student-sidebar-nav { display:grid;gap:.18rem;margin-top:.7rem; }
.student-sidebar-nav a { display:grid;grid-template-columns:30px minmax(0,1fr);grid-template-rows:auto auto;column-gap:.55rem;padding:.58rem .62rem;border-radius:13px;color:var(--ink-700);transition:background .16s ease,color .16s ease,transform .16s ease; }
.student-sidebar-nav a > span { grid-row:1/3;width:30px;height:30px;display:grid;place-items:center;align-self:center;border-radius:9px;color:var(--navy-700);background:var(--blue-50);font-size:.9rem;font-weight:900; }
.student-sidebar-nav a b { align-self:end;font-size:.79rem;line-height:1.15; }
.student-sidebar-nav a small { margin-top:.08rem;color:var(--ink-500);font-size:.64rem;line-height:1.2; }
.student-sidebar-nav a:hover { color:var(--navy-900);background:#f7faff;transform:translateX(2px); }
.student-sidebar-nav a.active { color:var(--navy-950);background:linear-gradient(90deg,#edf4ff,#f7fbff);box-shadow:inset 3px 0 0 var(--blue-600); }
.student-sidebar-nav a.active > span { color:#fff;background:var(--blue-600); }
.student-sidebar-support { margin-top:auto;padding:.7rem;border:1px solid #d7e7dd;border-radius:14px;background:linear-gradient(135deg,#f4fff7,#fff); }
.student-sidebar-support span { display:block;color:var(--ink-600);font-size:.68rem;line-height:1.35; }
.student-sidebar-support a { display:inline-block;margin-top:.35rem;color:var(--green-700);font-size:.7rem;font-weight:850; }
.student-sidebar-footer { display:flex;gap:.45rem;margin-top:.65rem;padding:.55rem .25rem 0;border-top:1px solid #edf1f5; }
.student-sidebar-footer a { color:var(--ink-500);font-size:.65rem;font-weight:750; }
.student-sidebar-footer a:last-child { margin-left:auto;color:var(--red-700); }

.student-workspace { min-width:0; }
.student-context-bar { position:sticky;top:calc(var(--header-height) + .75rem);z-index:45;display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:58px;margin-bottom:.75rem;padding:.65rem .85rem;border:1px solid rgba(211,222,235,.92);border-radius:18px;background:rgba(255,255,255,.94);box-shadow:0 10px 28px rgba(7,27,58,.06);backdrop-filter:blur(16px); }
.student-context-bar > div:first-child { display:grid; }
.student-context-bar span { color:var(--ink-500);font-size:.63rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase; }
.student-context-bar strong { color:var(--navy-950);font-size:.92rem; }
.student-context-actions { display:flex;align-items:center;gap:.35rem; }
.student-context-actions a { padding:.45rem .68rem;border-radius:10px;color:var(--navy-800);font-size:.7rem;font-weight:850; }
.student-context-actions a:hover { background:var(--blue-50); }
.student-context-actions a.primary { color:#fff;background:var(--navy-800); }
.student-main { padding-top:0; }
.student-container { width:100%;max-width:none;padding:0 .15rem 1.5rem; }
.role-student .site-footer { margin-top:1rem; }

/* Dashboard: stronger hierarchy, calmer decision surface */
.student-home-hero { grid-template-columns:minmax(0,1.5fr) minmax(300px,.6fr); }
.student-home-copy { position:relative;overflow:hidden;background:linear-gradient(135deg,#fff 12%,#f5f9ff 70%,#f2fff6); }
.student-home-copy::after { position:absolute;right:-70px;top:-90px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,rgba(35,104,216,.09),transparent 68%);content:"";pointer-events:none; }
.student-home-copy h1 { font-size:clamp(2rem,3.4vw,3rem); }
.student-home-hero-actions .btn { min-height:44px; }
.student-next-step-card { border-color:#c8e3d0;background:linear-gradient(150deg,#f0fff5,#fff 72%); }
.student-goal-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.student-goal-card { min-height:245px;padding:1.25rem;border-radius:20px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.student-goal-card:hover { transform:translateY(-2px);box-shadow:var(--shadow-md);border-color:#c9d9ec; }
.student-goal-card.recommended { border-color:#b9d7c2;background:linear-gradient(145deg,#f6fff8,#fff); }
.student-goal-card.recommended::before { content:"Recommended for consistency";display:inline-flex;width:max-content;margin-bottom:.15rem;padding:.25rem .48rem;border-radius:999px;color:var(--green-700);background:var(--green-50);font-size:.63rem;font-weight:850; }

/* Custom test builder becomes a focused modal workspace */
.student-builder-dialog { width:min(1180px,calc(100% - 1.5rem));max-width:none;height:min(780px,calc(100vh - 2rem));max-height:none;padding:0;overflow:hidden;border:0;border-radius:26px;background:#fff;box-shadow:0 32px 100px rgba(7,27,58,.24); }
.student-builder-dialog::backdrop { background:rgba(7,27,58,.54);backdrop-filter:blur(5px); }
.student-builder-dialog[open] { animation:studentDialogIn .18s ease both; }
@keyframes studentDialogIn { from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none} }
.student-builder-dialog .student-builder { display:flex;flex-direction:column;height:100%;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:#fff; }
.student-builder-dialog .student-builder-header { flex:0 0 auto;padding:1rem 1.2rem;border-bottom:1px solid var(--line);background:linear-gradient(135deg,#fff,#f7faff); }
.student-builder-dialog .student-builder-header h2 { font-size:1.45rem; }
.student-builder-dialog .student-builder-header p { margin-top:.3rem;font-size:.82rem; }
.student-builder-dialog .student-builder-layout { min-height:0;flex:1;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:0; }
.student-builder-dialog .student-builder-main { min-height:0;padding:1rem 1.1rem 1.2rem;overflow:auto;border-right:1px solid var(--line); }
.student-builder-dialog .student-builder-summary { min-height:0;padding:1rem;overflow:auto;background:#f8fbff; }
.student-builder-dialog .student-builder-search { position:sticky;top:-1rem;z-index:5;padding:.7rem 0;background:linear-gradient(#fff 80%,rgba(255,255,255,0)); }
.student-builder-dialog .student-builder-topic-list { gap:.5rem; }
.student-builder-dialog .student-builder-topic-card { grid-template-columns:minmax(170px,1fr) minmax(190px,.85fr) 92px auto;padding:.72rem .8rem; }
.student-builder-dialog .student-builder-summary { position:relative;top:auto; }
.student-builder-dialog .student-builder-start { min-height:48px;font-size:.92rem; }

/* Focused test-taking experience */
.student-focus-mode { background:#eef3f9; }
.student-focus-mode .site-header { position:relative;min-height:64px;--header-height:64px;box-shadow:none; }
.student-focus-mode .header-inner { min-height:64px; }
.student-focus-mode .brand-logo { width:40px;height:40px;flex-basis:40px;border-radius:12px; }
.student-focus-mode .brand-text small { display:none; }
.student-focus-mode .primary-nav,.student-focus-mode .nav-toggle,.student-focus-mode .role-badge,.student-focus-mode .student-bottom-nav,.student-focus-mode .site-footer { display:none!important; }
.student-focus-main { padding:1rem 0 2rem; }
.student-focus-container { width:min(1280px,calc(100% - 1.5rem));max-width:none; }
.student-focus-test-header { display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.65rem;padding:.85rem 1rem;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-xs); }
.student-focus-test-title .eyebrow { margin-bottom:.25rem;font-size:.63rem; }
.student-focus-test-title h1 { font-size:1.4rem; }
.student-focus-test-title p { margin-top:.22rem;color:var(--ink-500);font-size:.74rem; }
.student-focus-test-meta { display:flex;align-items:center;justify-content:flex-end;gap:.7rem; }
.student-focus-test-meta > div:first-child { display:grid;text-align:right; }
.student-focus-test-meta > div:first-child span { color:var(--ink-500);font-size:.62rem;font-weight:750; }
.student-focus-test-meta > div:first-child strong { color:var(--navy-950);font-size:.82rem; }
.student-draft-indicator { display:flex;align-items:center;gap:.35rem;padding:.38rem .55rem;border-radius:999px;color:var(--ink-500);background:var(--surface-soft);font-size:.65rem;font-weight:750; }
.student-draft-indicator i { width:7px;height:7px;border-radius:50%;background:#d2a33a; }
.student-draft-indicator.saved i { background:var(--green-500); }
.student-focus-progress { position:sticky;top:.5rem;z-index:55;margin-bottom:.7rem;border-radius:16px;box-shadow:0 10px 30px rgba(7,27,58,.08); }
.student-test-focus-layout { display:grid;grid-template-columns:minmax(0,1fr) 265px;gap:.75rem;align-items:start; }
.student-test-stage { min-width:0; }
.student-test-tip { display:flex;gap:.45rem;margin-bottom:.65rem;padding:.58rem .72rem;border:1px solid #d9e4ef;border-radius:12px;color:var(--ink-600);background:#f8fbff;font-size:.72rem; }
.student-test-tip strong { color:var(--navy-900);white-space:nowrap; }
.student-single-question-form { display:block; }
.student-focus-question { min-height:470px;padding:clamp(1rem,2.2vw,1.55rem);border-radius:22px;box-shadow:0 14px 40px rgba(7,27,58,.07); }
.student-focus-question-topline { display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.8rem; }
.student-question-position { color:var(--ink-500);font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase; }
.student-focus-question-head { grid-template-columns:44px minmax(0,1fr);gap:.9rem; }
.student-focus-question-head .question-number { width:44px;height:44px;border-radius:13px;font-size:.86rem; }
.student-focus-question-head h2 { font-size:clamp(1.25rem,2.1vw,1.65rem);line-height:1.42;letter-spacing:-.018em; }
.student-focus-question-head .question-topic { display:inline-flex;width:max-content;max-width:100%;margin-top:.55rem;padding:.28rem .5rem;border-radius:999px;color:var(--ink-500);background:var(--surface-soft);font-size:.68rem; }
.student-focus-options { display:grid;gap:.62rem;margin-top:1.15rem; }
.student-focus-options .option { position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:.75rem;min-height:64px;padding:.7rem .75rem;border:1px solid #d6e0eb;border-radius:15px;background:#fff;transition:border-color .14s ease,background .14s ease,box-shadow .14s ease,transform .14s ease; }
.student-focus-options .option:hover { border-color:#9ab7dd;background:#f9fbff;transform:translateY(-1px);box-shadow:0 7px 18px rgba(7,27,58,.05); }
.student-focus-options .option.selected { border-color:#6c9ae0;background:#f1f6ff;box-shadow:0 0 0 3px rgba(35,104,216,.08); }
.student-focus-options .option-letter { width:42px;height:42px;border-radius:12px;font-size:.82rem; }
.student-focus-options .option-text { color:var(--ink-800);font-size:.95rem;line-height:1.45; }
.student-focus-options kbd { min-width:26px;padding:.18rem .34rem;border:1px solid #dbe3ec;border-bottom-width:2px;border-radius:7px;color:var(--ink-500);background:#fff;font-size:.62rem;font-family:inherit;text-align:center; }
.student-focus-question-footer { margin-top:1.1rem; }
.student-mark-review { padding:.35rem .5rem;border-radius:8px;color:var(--ink-500);background:transparent;font-size:.73rem;font-weight:800;cursor:pointer; }
.student-mark-review:hover,.student-mark-review.active { color:var(--amber-700);background:var(--amber-50); }
.student-question-stepbar { position:sticky;bottom:.55rem;z-index:42;display:grid;grid-template-columns:130px minmax(0,1fr) 130px;align-items:center;gap:.6rem;margin-top:.65rem;padding:.6rem;border:1px solid rgba(211,222,235,.95);border-radius:16px;background:rgba(255,255,255,.96);box-shadow:0 14px 35px rgba(7,27,58,.12);backdrop-filter:blur(14px); }
.student-question-stepbar > div { display:grid;text-align:center; }
.student-question-stepbar span { color:var(--navy-950);font-size:.78rem;font-weight:900; }
.student-question-stepbar small { color:var(--ink-500);font-size:.65rem; }
.student-focus-submit-bar { margin-top:.75rem; }
.student-test-sidepanel { position:sticky;top:84px;padding:.85rem;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow-xs); }
.student-test-sidepanel-head { display:flex;align-items:flex-start;justify-content:space-between;gap:.5rem;margin-bottom:.65rem; }
.student-test-sidepanel-head .eyebrow { margin-bottom:.2rem;font-size:.61rem; }
.student-test-sidepanel-head h2 { font-size:1.05rem; }
.student-flag-count { padding:.3rem .45rem;border-radius:999px;color:var(--amber-700);background:var(--amber-50);font-size:.62rem;font-weight:800;white-space:nowrap; }
.student-test-sidepanel .student-question-grid { display:grid;grid-template-columns:repeat(5,1fr);gap:.32rem;padding:0;max-height:315px;overflow:auto; }
.student-test-sidepanel .student-question-jump { width:100%;height:36px; }
.student-question-jump.flagged { color:var(--amber-700);border-color:#e7c777;background:var(--amber-50); }
.student-question-jump.flagged::after { content:"";position:absolute;width:5px;height:5px;margin:-2px 0 0 1px;border-radius:50%;background:#d59b21; }
.student-navigator-legend { display:grid;gap:.28rem;margin-top:.65rem;padding-top:.6rem;border-top:1px solid #edf1f5; }
.student-navigator-legend span { display:flex;align-items:center;gap:.4rem;color:var(--ink-500);font-size:.62rem;font-weight:700; }
.student-navigator-legend i { width:9px;height:9px;border-radius:3px;background:#fff;border:1px solid var(--line); }
.student-navigator-legend i.answered { border-color:#9fd2ae;background:var(--green-50); }
.student-navigator-legend i.flagged { border-color:#e6c371;background:var(--amber-50); }
.student-navigator-legend i.current { border-color:var(--blue-600);box-shadow:0 0 0 2px rgba(35,104,216,.12); }
.student-sidepanel-actions { display:grid;gap:.38rem;margin-top:.7rem; }
.student-sidepanel-actions .btn { width:100%; }
.student-sidepanel-note { margin-top:.7rem;padding:.65rem;border-radius:12px;background:var(--surface-soft); }
.student-sidepanel-note strong { color:var(--navy-900);font-size:.7rem; }
.student-sidepanel-note p { margin-top:.25rem;color:var(--ink-500);font-size:.63rem;line-height:1.45; }
.student-submit-summary { display:grid;grid-template-columns:repeat(3,1fr);gap:.45rem;margin:.85rem 0; }
.student-submit-summary span { display:grid;padding:.6rem;border:1px solid var(--line);border-radius:11px;color:var(--ink-500);background:var(--surface-soft);font-size:.65rem;text-align:center; }
.student-submit-summary b { color:var(--navy-950);font-size:1.15rem; }

/* Results, reader and progress feel like one coherent workspace */
.student-result-hero,.student-progress-hero,.student-reader-hero { margin-top:.1rem; }
.student-result-kpis>article,.student-progress-strip>article { border-radius:16px;box-shadow:none; }
.student-review-toolbar { top:calc(var(--header-height) + 66px); }
.student-reader-filter-card { position:relative; }
.student-reader-toolbar { position:sticky;top:calc(var(--header-height) + 66px);z-index:30; }
.student-readable-mcq-card { border-radius:19px;box-shadow:none;transition:box-shadow .15s ease,border-color .15s ease; }
.student-readable-mcq-card:hover { border-color:#cbd9e9;box-shadow:0 12px 30px rgba(7,27,58,.06); }
.student-history-detail-card { box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.student-history-detail-card:hover { transform:translateY(-1px);border-color:#cbd9e9;box-shadow:0 12px 30px rgba(7,27,58,.06); }

@media (max-width: 1080px) {
  .student-app-shell { width:min(var(--content-width),calc(100% - 1rem));display:block;margin-top:.5rem; }
  .student-sidebar { display:none; }
  .student-context-bar { top:calc(var(--header-height) + .35rem); }
  .student-builder-dialog .student-builder-layout { grid-template-columns:1fr minmax(285px,.55fr); }
  .student-builder-dialog .student-builder-topic-card { grid-template-columns:minmax(150px,1fr) minmax(170px,.8fr) 84px; }
  .student-builder-dialog .student-count-presets { grid-column:1/-1; }
}
@media (max-width: 900px) {
  .student-test-focus-layout { display:flex;flex-direction:column; }
  .student-test-sidepanel { position:relative;top:auto;order:-1;width:100%; }
  .student-test-sidepanel .student-question-grid { display:flex;flex-wrap:nowrap;max-height:none;overflow-x:auto;padding-bottom:.2rem; }
  .student-test-sidepanel .student-question-jump { flex:0 0 38px;width:38px; }
  .student-navigator-legend,.student-sidepanel-note { display:none; }
  .student-sidepanel-actions { grid-template-columns:1fr 1fr; }
  .student-focus-question { min-height:430px; }
}
@media (max-width: 760px) {
  .student-context-bar { display:none; }
  .student-main { padding-top:.35rem; }
  .student-home-hero,.student-goal-grid { grid-template-columns:1fr; }
  .student-home-copy h1 { font-size:1.9rem; }
  .student-goal-card { min-height:auto; }
  .student-builder-dialog { width:100%;height:100%;max-height:none;border-radius:0; }
  .student-builder-dialog .student-builder-layout { display:block;overflow:auto; }
  .student-builder-dialog .student-builder-main,.student-builder-dialog .student-builder-summary { overflow:visible;border:0; }
  .student-builder-dialog .student-builder-summary { border-top:1px solid var(--line); }
  .student-builder-dialog .student-builder-topic-card { grid-template-columns:1fr 92px; }
  .student-builder-dialog .student-builder-topic-card .student-builder-topic-name,.student-builder-dialog .student-builder-topic-card label:first-of-type { grid-column:1/-1; }
  .student-focus-test-header { align-items:flex-start; }
  .student-focus-test-meta { flex-direction:column;align-items:flex-end;gap:.35rem; }
  .student-focus-test-meta>div:first-child,.student-draft-indicator { display:none; }
  .student-focus-progress { top:.35rem; }
  .student-test-tip { display:none; }
  .student-focus-question { min-height:auto;padding:.9rem;border-radius:18px; }
  .student-focus-question-head { grid-template-columns:36px minmax(0,1fr);gap:.65rem; }
  .student-focus-question-head .question-number { width:36px;height:36px;border-radius:10px; }
  .student-focus-question-head h2 { font-size:1.14rem; }
  .student-focus-options .option { grid-template-columns:38px minmax(0,1fr);min-height:58px;padding:.62rem; }
  .student-focus-options .option-letter { width:38px;height:38px; }
  .student-focus-options kbd { display:none; }
  .student-focus-question-footer { flex-wrap:wrap;gap:.3rem; }
  .student-focus-question-footer>span { width:100%; }
  .student-question-stepbar { bottom:.35rem;grid-template-columns:1fr 1fr;padding:.45rem; }
  .student-question-stepbar>div { display:none; }
  .student-question-stepbar .btn { width:100%;min-height:44px; }
  .student-focus-submit-bar { display:grid; }
  .student-submit-summary { grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 520px) {
  .student-focus-container { width:calc(100% - .7rem); }
  .student-focus-test-header { padding:.7rem;border-radius:14px; }
  .student-focus-test-title h1 { font-size:1.12rem; }
  .student-focus-test-title p { font-size:.66rem; }
  .student-focus-progress { padding:.55rem .65rem; }
  .student-focus-progress .btn { display:none; }
  .student-test-sidepanel { padding:.65rem;border-radius:14px; }
  .student-sidepanel-actions { display:none; }
  .student-question-stepbar { border-radius:13px; }
  .student-dialog-actions { grid-template-columns:1fr; }
}

/* v17.1 unified question discovery + search-built tests */
.student-search-test-actions{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.search-select-all{display:inline-flex;align-items:center;gap:.45rem;font-weight:700;color:var(--ink,#15345d)}.student-search-card-select{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}.student-search-card-select label{display:inline-flex;align-items:center;gap:.4rem;font-weight:700;font-size:.86rem}.student-search-selection-bar{position:sticky;bottom:1rem;z-index:25;margin:1rem auto 0;padding:1rem 1.1rem;border:1px solid rgba(31,92,168,.22);border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 16px 42px rgba(21,52,93,.16);backdrop-filter:blur(14px);display:flex;align-items:center;gap:1rem;justify-content:space-between;flex-wrap:wrap}.student-search-selection-bar>div{display:grid;gap:.15rem}.student-search-selection-bar>div span{color:var(--muted,#5b7190);font-size:.88rem}.pill.source-model,.source-model{background:#f1eaff;color:#5a34a5;border-color:#d9c9ff}.pill.source-bank,.source-bank{background:#eaf6ff;color:#175a8a;border-color:#c7e6fb}.student-readable-mcq-card:has([data-search-question-select]:checked){outline:2px solid rgba(34,116,211,.24);box-shadow:0 12px 30px rgba(25,78,145,.1)}
.model-paper-explanation-tools{margin-top:.85rem}.model-paper-explanation-panel{margin-top:.65rem;padding:.9rem 1rem;border-radius:14px;background:#f7faff;border:1px solid #dce7f5;line-height:1.65;color:#243d62}.model-paper-explanation-panel>strong{display:block;margin-bottom:.35rem;color:#173b70}.admin-question-editor-dialog{max-width:min(920px,94vw)}.admin-question-editor-card{width:min(880px,90vw);max-height:88vh;overflow:auto}.admin-question-editor-card textarea{resize:vertical}.notice.compact{padding:.7rem .85rem;margin:0}.form-grid.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.student-search-selection-bar{bottom:4.8rem;align-items:stretch}.student-search-selection-bar .btn{width:100%}.student-search-test-actions{width:100%;justify-content:space-between}.form-grid.two-col{grid-template-columns:1fr}}

/* Model Papers v17.2 — multi-workbook batch upload */
.model-paper-selected-files{margin-top:7px;line-height:1.45}
.model-paper-batch-results{margin-bottom:22px}
.model-paper-file-results{display:grid;gap:10px;margin-top:14px}
.model-paper-file-result{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:14px 16px;border:1px solid var(--border,#d9e3ef);border-radius:16px;background:var(--surface,#fff)}
.model-paper-file-result.is-success{border-color:#bfe8ca;background:#f7fff9}
.model-paper-file-result.is-error{border-color:#f0c9c5;background:#fff9f8}
.model-paper-file-result p{margin:5px 0 0}
@media(max-width:700px){.model-paper-file-result{flex-direction:column}.model-paper-file-result>.pill{align-self:flex-start}}
