/* Guidee 7.0 — premium student experience layer.
   Loaded only by the student application; admin pages keep their existing UI. */
:root {
  --purple: #6254d8;
  --purple-dark: #4d40b5;
  --purple-soft: #f1efff;
  --purple-border: #dcd7fb;
  --text: #20243a;
  --muted: #747b91;
  --line: #e7e9f1;
  --bg: #f6f7fb;
  --card: #ffffff;
  --green: #198b67;
  --orange: #c88727;
  --red: #d84b5c;
  --blue: #4472d8;
  --shadow: 0 8px 28px rgba(28, 34, 68, .055);
  --shadow-hover: 0 16px 36px rgba(35, 37, 78, .095);
  --radius-card: 20px;
}

body {
  color: var(--text);
  background: var(--bg);
  font-family: "DM Sans", "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .brand-name, .plan-option strong, .result-score {
  font-family: "Manrope", "DM Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.035em;
}

button, input, select, textarea { font-family: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex="0"]:focus-visible {
  outline: 3px solid rgba(98, 84, 216, .25);
  outline-offset: 2px;
}

/* Application frame and navigation */
.app-shell { background: var(--bg); }
.sidebar {
  background: #fbfbfe;
  border-right-color: #e7e8f0;
  padding-top: 22px;
  padding-bottom: 18px;
  box-shadow: 8px 0 28px rgba(29, 32, 66, .018);
}
.brand { padding-bottom: 28px; }
.brand-mark {
  background: linear-gradient(145deg, #6557dc 0%, #8579ef 100%);
  border-radius: 15px;
  box-shadow: 0 9px 20px rgba(98, 84, 216, .2);
}
.brand-name { color: #22243b; font-size: 22px; font-weight: 850; }
.brand-sub { color: #858ba0; font-size: 10px; letter-spacing: .025em; }
.nav-list { gap: 5px; }
.nav-item {
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 12px;
  color: #50566c;
  font-size: 13px;
  font-weight: 700;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-item:hover { background: #f0effb; color: var(--purple-dark); transform: translateX(1px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(112deg, #5c4fcf 0%, #7568e5 100%);
  box-shadow: 0 8px 18px rgba(89, 75, 196, .18);
}
.nav-item .nav-icon { width: 20px; }
.nav-badge { font-variant-numeric: tabular-nums; }
.plan-card {
  border-color: #e4e0fa;
  border-radius: 17px;
  background: linear-gradient(145deg, #f2efff 0%, #fff 76%);
  padding: 16px;
}
.plan-title { font-size: 13px; }
.plan-status { line-height: 1.45; }
.plan-button { border-radius: 11px; font-size: 12px; }

.main { transition: margin-left .22s ease; }
.topbar {
  height: 72px;
  padding: 0 34px;
  background: rgba(255, 255, 255, .9);
  border-bottom-color: #e9eaf1;
  box-shadow: 0 4px 18px rgba(29, 32, 66, .018);
}
.topbar-leading { display: none; align-items: center; gap: 12px; min-width: 0; }
.mobile-brand { color: #262942; font-family: "Manrope", sans-serif; font-size: 18px; font-weight: 850; letter-spacing: -.045em; }
.mobile-menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: #454b64;
  box-shadow: 0 4px 12px rgba(31, 36, 68, .045);
}
.mobile-menu-toggle:hover { color: var(--purple); border-color: var(--purple-border); background: var(--purple-soft); }
.icon-button { border-radius: 13px; color: #5c6177; }
.icon-button:hover { color: var(--purple); border-color: var(--purple-border); }
.avatar { background: linear-gradient(145deg, #494e72, #747ba3); box-shadow: 0 4px 12px rgba(42, 47, 82, .12); }
.profile-chip { border-radius: 14px; }
.profile-chip:hover { background: #f7f7fc; }
.profile-text strong { color: #282c43; font-size: 13px; font-weight: 800; }
.profile-text span { color: #858ba0; }

/* Page rhythm, type and reusable surfaces */
.page { max-width: 1460px; padding: clamp(22px, 2.45vw, 36px); }
.page-head { align-items: center; gap: 20px; margin-bottom: 4px; }
.home-head h1, .page-head h1 { color: #20243a; font-size: clamp(27px, 2.2vw, 34px); font-weight: 850; line-height: 1.14; letter-spacing: -.05em; }
.home-head p, .page-head p { color: #7b8195; font-size: 14px; line-height: 1.65; }
.eyebrow, .exam-chip {
  padding: 7px 11px;
  background: #efedff;
  color: #5a4cc5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .075em;
}
.card {
  border: 1px solid #e7e9f1;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow);
}
.primary-button, .outline-button, .text-button {
  min-height: 40px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}
.primary-button {
  background: linear-gradient(115deg, #5d50cf 0%, #7668e6 100%);
  box-shadow: 0 7px 17px rgba(94, 79, 204, .17);
  padding: 11px 16px;
}
.primary-button:hover { background: linear-gradient(115deg, #5144bd 0%, #695bd7 100%); box-shadow: 0 10px 22px rgba(94, 79, 204, .22); }
.outline-button {
  border-color: #e3e5ef;
  background: #fff;
  color: #5b50bd;
  padding: 9px 13px;
}
.outline-button:hover { background: #f4f2ff; border-color: #d5cff7; color: #4d40b5; }
.text-button { color: #5b50bd; }

input, select, textarea {
  color: var(--text);
  border-color: #e1e4ee;
  border-radius: 12px;
}
input::placeholder, textarea::placeholder { color: #9ba1b2; }
input:focus, select:focus, textarea:focus {
  border-color: #bcb4f0 !important;
  box-shadow: 0 0 0 4px rgba(98, 84, 216, .09) !important;
  outline: none;
}
.search-box, .filter-button {
  min-height: 46px;
  border: 1px solid #e5e7ef;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(28, 34, 68, .025);
}
.search-box:focus-within { border-color: #bcb4f0; box-shadow: 0 0 0 4px rgba(98, 84, 216, .08); }
.search-box input { font-size: 13px; }

/* Home dashboard */
.guidee-hero {
  min-height: 250px;
  margin-top: 25px;
  padding: clamp(22px, 3vw, 34px);
  border-color: #e5e0fb;
  border-radius: 24px;
  background: radial-gradient(circle at 85% 18%, rgba(198, 190, 255, .24), transparent 34%), linear-gradient(112deg, #f0eeff 0%, #faf9ff 54%, #fff 100%);
  box-shadow: 0 13px 35px rgba(69, 58, 145, .065);
}
.guidee-copy h2 { color: #292746; font-size: clamp(23px, 2vw, 30px); font-weight: 850; }
.guidee-copy p { color: #777b92; line-height: 1.75; }
.guidee-orbit { background: radial-gradient(circle at 45% 35%, #ebe8ff, #d8d2ff 54%, #cbc4fa); }
.guidee-mascot { border-radius: 36px; box-shadow: 0 16px 38px rgba(83, 70, 174, .14); }
.home-layout { gap: 22px; margin-top: 28px; }
.section-head { margin-bottom: 14px; }
.section-head h2 { color: #292d45; font-size: 18px; font-weight: 850; }
.section-head p { color: #858ba0; line-height: 1.5; }
.focus-list { gap: 11px; }
.focus-card {
  min-height: 76px;
  padding: 16px;
  border-radius: 17px;
  box-shadow: 0 4px 16px rgba(28, 34, 68, .035);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.focus-card:hover { transform: translateY(-2px); border-color: #dcd7f7; box-shadow: var(--shadow-hover); }
.focus-icon, .assigned-icon { border-radius: 14px; }
.focus-card h3 { color: #30344b; font-size: 13px; font-weight: 800; }
.focus-card p { color: #858ba0; font-size: 11px; line-height: 1.45; }
.side-card { padding: 19px; border-radius: 19px; }
.assigned-row { padding: 13px 0; border-color: #eff0f5; }
.assigned-copy strong { color: #34384f; font-size: 12px; font-weight: 800; }
.assigned-copy small { color: #858ba0; font-size: 10px; }
.result-card { padding: 15px; border-color: #eceaf5; border-radius: 15px; background: #fbfaff; }
.result-card h3 { color: #363a51; font-weight: 800; }
.result-score { color: #5e52c8; font-variant-numeric: tabular-nums; }
.score-track { height: 9px; background: #e9e7f4; }
.score-track span { background: linear-gradient(90deg, #5e52cc, #9688ef); }

/* Resource library */
.resource-tabs { gap: 8px; margin-top: 24px; padding: 0 0 12px; border-bottom-color: #e8e9f1; }
.resource-tab {
  border-color: #e5e6ef;
  border-radius: 12px;
  background: #fff;
  color: #686e83;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 800;
  transition: .18s ease;
}
.resource-tab:hover { border-color: #d7d2f5; color: var(--purple-dark); background: #f8f7ff; }
.resource-tab.active { border-color: var(--purple); background: var(--purple); color: #fff; box-shadow: 0 6px 15px rgba(98, 84, 216, .15); }
.resource-tools { gap: 12px; margin: 18px 0; }
.resource-grid { gap: 15px; }
.resource-card {
  min-height: 118px;
  padding: 18px;
  border-radius: 18px;
  align-items: flex-start;
  box-shadow: 0 5px 17px rgba(28, 34, 68, .035);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.resource-card:hover { transform: translateY(-2px); border-color: #dcd7f7; box-shadow: var(--shadow-hover); }
.resource-icon { width: 48px; height: 48px; border-radius: 15px; background: #f0efff; }
.resource-content { padding: 1px 0; }
.resource-card h3 { color: #30344b; font-size: 14px; font-weight: 850; line-height: 1.4; }
.resource-card p { color: #7e8498; font-size: 12px; line-height: 1.6; margin-top: 5px; }
.resource-meta { margin-top: 10px; color: #7770c1; font-size: 10px; font-weight: 800; letter-spacing: .015em; }
.resource-card a { flex: none; align-self: center; }
.personalised-lock { border-radius: 18px; padding: 20px; gap: 14px; }
.placeholder { border-radius: 18px; padding: 28px; }
.placeholder h2 { color: #333750; font-size: 18px; }
.placeholder p { color: #7d8397; line-height: 1.6; }

/* Test Centre and history */
.test-centre-section-intro h2, .test-history-heading h2 { color: #2c3048; font-size: 23px; font-weight: 850; }
.test-centre-section-intro p, .test-history-heading p { max-width: 620px; color: #7e8498; line-height: 1.65; }
.test-centre-summary>div { min-width: 88px; padding: 11px 14px; border-color: #e7e8f0; border-radius: 14px; background: #fff; }
.test-centre-summary span { color: #8990a4; font-size: 10px; }
.test-centre-summary strong { color: #343851; font-family: "Manrope", sans-serif; font-size: 19px; }
.test-category-card-grid { gap: 18px; }
.test-category-card {
  min-height: 232px;
  padding: 22px;
  border-radius: 20px;
  border-color: #e7e7f1;
  background: linear-gradient(150deg, #fff 46%, #f9f8ff 100%);
  box-shadow: 0 7px 22px rgba(28, 34, 68, .045);
}
.test-category-card:hover, .test-category-card:focus-visible { border-color: #d2caf6; box-shadow: var(--shadow-hover); }
.test-category-card-icon, .test-detail-icon, .test-centre-empty-icon { width: 54px; height: 54px; border-radius: 17px; background: #efedff; color: #5d51cb; }
.test-category-card-copy strong { color: #30344c; font-family: "Manrope", sans-serif; font-size: 17px; font-weight: 850; }
.test-category-card-copy small { color: #83899c; font-size: 11px; line-height: 1.65; }
.test-category-card-count strong { color: #5f53cf; font-family: "Manrope", sans-serif; font-size: 29px; }
.test-category-card-footer { border-color: #edecf4; color: #858ba0; }
.test-category-card-link { color: #5b50c3; }
.test-category-hero { padding: 24px; border-radius: 20px; border-color: #e6e2fb; background: linear-gradient(115deg, #f2efff 0%, #fff 78%); }
.test-category-hero h2 { color: #2f3150; font-size: 23px; font-weight: 850; }
.test-category-hero p { color: #7d8297; line-height: 1.6; }
.student-test-card-grid { gap: 16px; }
.student-test-card {
  padding: 19px;
  border-radius: 18px;
  border-color: #e6e8f0;
  box-shadow: 0 5px 18px rgba(28, 34, 68, .04);
}
.student-test-card:hover, .student-test-card:focus-visible { border-color: #d5cff8; box-shadow: var(--shadow-hover); }
.student-test-type { padding: 6px 9px; background: #f0efff; color: #5b50c5; font-size: 9px; }
.student-test-icon { width: 46px; height: 46px; border-radius: 14px; }
.student-test-card-title h3 { color: #30344c; font-size: 14px; font-weight: 850; }
.student-test-card-title p { color: #82889c; font-size: 11px; line-height: 1.55; }
.student-test-metrics { padding: 13px 0; border-color: #eceef4; }
.student-test-metrics strong { color: #30344b; font-family: "Manrope", sans-serif; font-size: 16px; }
.student-test-metrics span { color: #858ba0; font-size: 10px; }
.student-test-open-link { color: #5c50c8; font-size: 11px; }
.test-detail-hero { padding: 25px; border: 1px solid #e5e1fa; border-radius: 20px; background: linear-gradient(135deg, #f3f0ff, #fff 74%); }
.test-detail-title-row h2 { color: #2d314a; font-family: "Manrope", sans-serif; font-size: 25px; font-weight: 850; }
.test-detail-title-row p { color: #7c8297; line-height: 1.5; }
.test-detail-metrics { border-color: #e9e8f1; }
.test-detail-metrics strong { color: #333750; font-family: "Manrope", sans-serif; }
.test-detail-panel, .test-detail-actionbar { border-radius: 17px; }
.test-detail-panel h3, .test-detail-actionbar strong { color: #343850; font-size: 13px; font-weight: 850; }
.test-history-card { padding: 20px; border-radius: 18px; }
.test-history-card-head h3 { color: #30344c; font-family: "Manrope", sans-serif; font-size: 16px; font-weight: 850; }
.test-history-attempt-row { border-radius: 12px; background: #fcfcff; }

/* Preparation, reports, profile and subscription */
.prep-journey-card { padding: clamp(20px, 2.5vw, 30px); border-radius: 22px; }
.prep-journey-head h2 { color: #30344b; font-size: 25px; font-weight: 850; }
.prep-journey-head p { color: #7d8397; }
.prep-analysis { border-color: #e1dcfa; border-radius: 16px; background: linear-gradient(120deg, #f6f4ff, #fff); }
.prep-analysis h3 { color: #30344c; font-weight: 850; }
.prep-analysis p { color: #767d92; line-height: 1.7; }
.report-list, .notice-list { gap: 13px; }
.report-row, .notice-row { padding: 18px; border-radius: 17px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.report-row:hover, .notice-row:hover { transform: translateY(-1px); border-color: #dedaf6; box-shadow: var(--shadow-hover); }
.report-row h3, .notice-row strong { color: #333750; font-size: 13px; font-weight: 850; }
.report-row p, .notice-row small { color: #83899c; }
.profile-grid { gap: 17px; }
.profile-card { padding: 22px; border-radius: 19px; }
.profile-card h2 { color: #30344c; font-size: 16px; font-weight: 850; }
.profile-card p { color: #7b8297; line-height: 1.65; }
.profile-fields { gap: 13px; }
.profile-fields div { padding-top: 13px; border-color: #eff0f5; }
.profile-fields span { color: #858ba0; font-size: 11px; }
.profile-fields strong { color: #343850; font-size: 12px; font-weight: 800; overflow-wrap: anywhere; }
.plans-grid { gap: 18px; }
.plan-option { padding: 25px 22px; border-radius: 20px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.plan-option:hover { transform: translateY(-3px); border-color: #d5cef8; box-shadow: var(--shadow-hover); }
.plan-option .plan-duration { color: #5a50c4; font-size: 13px; }
.plan-option strong { color: #292e48; font-size: 34px; font-weight: 900; }
.plan-option p { color: #7c8296; }
.plan-option.featured { border-color: #bcb3f0; box-shadow: 0 12px 32px rgba(80, 67, 178, .11); }
.plan-popular { background: #5c50c7; }
.payment-intro { border-color: #e4e0fa; border-radius: 22px; background: linear-gradient(115deg, #f1efff, #fff 76%); }
.payment-intro h2 { color: #2d3150; font-weight: 850; }
.payment-intro p { color: #747b91; line-height: 1.75; }
.payment-benefit { border-radius: 16px; }
.payment-benefit h3 { color: #343850; font-weight: 850; }
.payment-benefit p { color: #7e8498; line-height: 1.6; }
.payment-visual { border-radius: 18px; background: linear-gradient(145deg, #f6f5ff, #fff); }
.payment-note { border-radius: 17px; }
.notice-row { cursor: pointer; }
.support-card { padding: clamp(25px, 4vw, 44px); border-radius: 22px; }

/* Results and solution reading */
.result-big, .attempt-comparison, .review-analysis-section { border-radius: 20px; }
.result-big { padding: clamp(24px, 4vw, 42px); }
.result-big .result-score { color: #5d52c9; }
.review-tabs { background: #f2f1f8; border-color: #e7e7f0; border-radius: 15px; }
.review-tab { border-radius: 11px; }
.review-tab.active { color: #5246bd; box-shadow: 0 3px 12px rgba(32, 35, 70, .08); }
.review-analysis-tile, .review-insight, .review-question { border-radius: 16px; }
.review-question { padding: 22px; }
.review-question-text { color: #30354c; font-size: 15px; line-height: 1.75; }
.review-option { border-radius: 12px; padding: 12px 14px; }
.review-option strong { font-size: 12px; line-height: 1.6; }

/* Chat retains its dark visual identity; make surrounding controls match 7.0. */
.guidee-chat-page .page-head h1 { font-weight: 850; }
.chat-expand-button { border-radius: 12px; font-family: inherit; }

/* Dedicated exam mode */
body.test-taking-mode { background: #f4f5fa; }
.exam-shell { background: #f4f5fa; }
.exam-header { padding: 17px clamp(16px, 2.8vw, 34px); border-bottom-color: #e7e8f0; }
.exam-heading h1 { color: #242943; font-family: "Manrope", sans-serif; font-size: 23px; font-weight: 850; }
.exam-meta { color: #7c8297; font-size: 11px; }
.exam-timer-wrap { border-color: #e5e6f0; border-radius: 14px; background: #f8f8fc; }
.exam-timer-wrap strong { color: #303550; font-family: "Manrope", sans-serif; }
.exam-workspace { max-width: 1600px; gap: 20px; padding: 20px clamp(14px, 2vw, 28px); }
.exam-main { border-color: #e7e8f0; border-radius: 20px; padding: clamp(20px, 2.4vw, 34px); box-shadow: 0 9px 28px rgba(29, 34, 68, .055); }
.exam-main-top { border-bottom-color: #edeef4; }
.exam-main-top strong { color: #343950; font-size: 14px; font-weight: 850; }
.question-card h2 { color: #30354e; font-family: "Manrope", sans-serif; font-size: clamp(21px, 2vw, 26px); font-weight: 750; line-height: 1.6; }
.option { border-color: #e5e7ef; border-radius: 14px; background: #fff; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.option:hover { border-color: #c9c2f2; background: #fbfaff; }
.option.selected { border-color: #8e83df; background: #f4f2ff; box-shadow: 0 0 0 2px rgba(98, 84, 216, .06); }
.option span { border-radius: 10px; background: #f1f2f7; color: #555d75; }
.option.selected span { background: #6154d2; }
.exam-question-panel { border: 1px solid #e7e8f0; border-radius: 20px; background: #fff; padding: 17px; box-shadow: 0 9px 28px rgba(29, 34, 68, .05); }
.question-panel-head { border-bottom-color: #eceef4; }
.question-panel-head strong { color: #343950; font-family: "Manrope", sans-serif; }
.question-number { border-radius: 11px; }
.exam-footer-bar { border-top-color: #e7e8f0; }
.submit-test-button { border-radius: 12px; background: #292d49; }
.submit-test-button:hover { background: #1e223c; }
.mobile-question-nav-toggle { display: none; }

/* Tablet and mobile experience */
@media (max-width: 1150px) {
  .page { padding: 25px; }
  .home-layout { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    display: flex !important;
    width: min(300px, 88vw);
    padding: 22px 14px 18px;
    transform: translateX(-105%);
    transition: transform .24s cubic-bezier(.2, .75, .25, 1);
    z-index: 60;
    box-shadow: 22px 0 58px rgba(20, 23, 54, .18);
  }
  .sidebar.sidebar-open { transform: translateX(0); }
  .sidebar.compact { width: min(300px, 88vw); }
  .sidebar .brand { justify-content: flex-start; padding: 0 10px 25px; }
  .sidebar .brand>div:not(.brand-mark) { display: block !important; }
  .sidebar .nav-item span:not(.nav-icon) { display: inline !important; }
  .sidebar .nav-item .nav-badge { display: grid !important; }
  .sidebar .nav-item { justify-content: flex-start; }
  .sidebar .nav-item .nav-icon { display: block; }
  .sidebar .plan-card { display: block !important; }
  .sidebar-toggle { display: none !important; }
  .main, .main.sidebar-collapsed { margin-left: 0 !important; }
  .topbar { height: 68px; padding: 0 18px; justify-content: space-between; }
  .topbar-leading { display: flex; }
  .mobile-menu-toggle { display: grid; }
  .page { padding: 24px 22px; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-category-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-test-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar { height: 64px; padding: 0 14px; }
  .mobile-menu-toggle { width: 40px; height: 40px; }
  .mobile-brand { font-size: 17px; }
  .topbar-actions { gap: 7px; }
  .icon-button { width: 40px; height: 40px; }
  .page { padding: 21px 15px 30px; }
  .home-head h1, .page-head h1 { font-size: 27px; }
  .home-head p, .page-head p { font-size: 13px; }
  .page-head { gap: 12px; }
  .guidee-hero { min-height: 0; padding: 22px 19px; border-radius: 20px; }
  .guidee-visual { height: 150px; }
  .guidee-orbit { width: 140px; height: 140px; }
  .guidee-mascot { width: 102px; height: 102px; border-radius: 29px; }
  .home-layout { gap: 17px; margin-top: 21px; }
  .side-card { padding: 16px; }
  .focus-card { padding: 13px; gap: 10px; }
  .focus-icon { width: 39px; height: 39px; }
  .resource-tabs { overflow-x: auto; padding-bottom: 10px; }
  .resource-tab { flex: none; padding: 10px 12px; }
  .resource-tools { flex-direction: column; }
  .filter-button { min-height: 44px; }
  .resource-grid, .test-category-card-grid, .student-test-card-grid, .profile-grid, .plans-grid { grid-template-columns: 1fr; }
  .resource-card { align-items: flex-start; flex-wrap: wrap; padding: 16px; }
  .resource-card .resource-content { flex: 1 1 calc(100% - 60px); }
  .resource-card a { margin-left: 60px; }
  .test-centre-section-intro, .test-history-heading { align-items: flex-start; flex-direction: column; }
  .test-centre-summary { width: 100%; }
  .test-centre-summary>div { flex: 1; min-width: 0; }
  .test-category-card { min-height: 205px; }
  .test-category-hero { align-items: flex-start; flex-wrap: wrap; padding: 18px; }
  .test-category-hero-count { margin-left: 0; }
  .student-test-card { padding: 16px; }
  .test-detail-title-row { align-items: flex-start; }
  .test-detail-title-row h2 { font-size: 20px; }
  .test-detail-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-detail-columns { grid-template-columns: 1fr; }
  .test-detail-actionbar { align-items: flex-start; flex-direction: column; }
  .test-detail-action-buttons { width: 100%; }
  .test-detail-action-buttons>* { flex: 1; }
  .report-row { align-items: flex-start; flex-wrap: wrap; }
  .report-row .outline-button { margin-left: 57px; }
  .prep-journey-head { flex-direction: column; }
  .prep-graph { overflow-x: auto; }
  .prep-analysis-main { grid-template-columns: 1fr; }
  .prep-analysis-side { grid-template-columns: 1fr; }
  .support-card { padding: 26px 18px; }

  /* Mobile exam navigator is a compact accordion, not a long block below every question. */
  .exam-shell { height: auto; min-height: 100dvh; }
  .exam-header { gap: 10px; }
  .exam-heading { min-width: 0; }
  .exam-heading h1 { font-size: 17px; }
  .exam-meta { gap: 5px; font-size: 9px; }
  .exam-header-actions { gap: 6px; }
  .exam-timer-wrap { min-width: 77px; padding: 8px; }
  .exam-timer-wrap strong { font-size: 17px; }
  .exam-exit-button { padding: 9px 10px; }
  .exam-workspace { gap: 11px; padding: 10px; }
  .exam-main { padding: 16px; border-radius: 17px; }
  .exam-question-panel { order: 2; padding: 14px; border-radius: 17px; }
  .mobile-question-nav-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid #e6e5f0;
    border-radius: 11px;
    background: #fafaff;
    color: #4b4d68;
    font-size: 11px;
    font-weight: 850;
  }
  .mobile-question-nav-toggle span { color: #8a8da0; font-size: 9px; font-weight: 700; }
  .question-nav-body { padding-top: 12px; }
  .exam-question-panel.is-collapsed .question-nav-body { display: none; }
  .question-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .question-palette { grid-template-columns: repeat(6, minmax(0, 1fr)); max-height: 220px; }
  .exam-footer-bar { gap: 8px; padding: 10px 13px; }
}

@media (max-width: 420px) {
  .profile-chip { padding-right: 0; }
  .avatar { width: 36px; height: 36px; }
  .guidee-hero { padding: 19px 16px; }
  .page-head { align-items: flex-start; }
  .test-detail-metrics { gap: 12px; }
  .exam-header { padding: 11px 10px; }
  .exam-heading h1 { max-width: 185px; font-size: 15px; }
  .exam-timer-wrap { min-width: 68px; }
  .exam-timer-wrap span { font-size: 8px; }
  .exam-timer-wrap strong { font-size: 15px; }
  .exam-exit-button { padding: 8px; font-size: 9px; }
  .question-palette { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

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