/* Editorial portal theme. The exam shell retains its original app.css layout. */
:root {
  --portal-ink: #15263f;
  --portal-blue: #3155db;
  --portal-blue-hover: #2446c0;
  --portal-gold: #b99752;
  --portal-paper: #fffefb;
  --portal-muted: #627080;
  --portal-line: #dfe3e8;
}

body:not(.exam-shell-page) {
  --bg: #f5f2eb;
  --surface: #fffefb;
  --surface-soft: #f5f5f2;
  --ink: #15263f;
  --muted: #627080;
  --line: #cbd1da;
  --line-soft: #dfe3e8;
  --shadow: none;
  background: var(--bg);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.skip-link { position: fixed; z-index: 1000; top: 8px; left: 12px; padding: 10px 16px; background: #fffefb; color: #15263f; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
body:not(.exam-shell-page) :is(a, button, summary, [tabindex]):focus-visible { outline: 3px solid #3155db; outline-offset: 4px; }
body:not(.exam-shell-page) .topbar { min-height: 82px; padding: 14px max(28px, calc((100vw - 1240px) / 2)); background: var(--portal-paper); border-bottom: 1px solid var(--portal-line); backdrop-filter: none; }
body:not(.exam-shell-page) .brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 11px; color: var(--portal-ink); }
body:not(.exam-shell-page) .brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 6px; background: var(--portal-blue); color: #fff; font-size: 25px; font-weight: 750; letter-spacing: -2px; padding-right: 2px; }
body:not(.exam-shell-page) .brand > span:last-child { font-size: 15px; font-weight: 750; letter-spacing: .55px; line-height: 1.3; }
body:not(.exam-shell-page) .brand small { display: block; margin-top: 5px; color: var(--portal-muted); font-size: 8px; font-weight: 500; letter-spacing: 1.6px; }
body:not(.exam-shell-page) .topnav { flex-wrap: wrap; gap: 6px 8px; font-size: 13px; }
body:not(.exam-shell-page) .topnav a { padding: 8px 11px; color: var(--portal-muted); font-weight: 600; border-radius: 5px; }
body:not(.exam-shell-page) .topnav a:hover, body:not(.exam-shell-page) .topnav a[aria-current="page"] { color: var(--portal-blue); background: #edf0fc; }
body:not(.exam-shell-page) .nav-user { padding: 0 0 0 18px; margin-left: 5px; border-left: 1px solid var(--portal-line); max-width: 150px; overflow-wrap: anywhere; color: var(--portal-ink); }
body:not(.exam-shell-page) .topnav form { margin-left: 10px; }
body:not(.exam-shell-page) .link-button { padding: 7px 0; font-weight: 500; font-size: 12px; color: var(--portal-muted); }
body:not(.exam-shell-page) .link-button:hover { color: var(--portal-blue); }
.header-caption { color: var(--portal-muted); font-size: 11px; letter-spacing: .2px; }
.header-caption > span { color: var(--portal-gold); margin: 0 13px; }
body:not(.exam-shell-page) .page { width: min(1240px, calc(100% - 56px)); margin: 40px auto 56px; }
body:not(.exam-shell-page) h1 { font-size: clamp(28px, 3vw, 38px); font-weight: 650; line-height: 1.35; letter-spacing: -.8px; }
body:not(.exam-shell-page) h2 { font-size: 21px; line-height: 1.5; font-weight: 650; }
body:not(.exam-shell-page) h3 { font-size: 16px; line-height: 1.5; font-weight: 650; }
body:not(.exam-shell-page) .eyebrow { margin: 0 0 9px; color: var(--portal-muted); font-size: 10px; font-weight: 650; line-height: 1.6; letter-spacing: 1.7px; }
body:not(.exam-shell-page) :is(input, textarea, select) { border-radius: 5px; }
body:not(.exam-shell-page) :is(input, textarea, select):focus { border-color: var(--portal-blue); box-shadow: 0 0 0 3px rgb(49 85 219 / 12%); }
body:not(.exam-shell-page) .primary-button { background: var(--portal-blue); color: #fff; border-radius: 5px; font-weight: 600; gap: 15px; }
body:not(.exam-shell-page) .primary-button:hover { background: var(--portal-blue-hover); }
body:not(.exam-shell-page) .secondary-button { background: var(--portal-paper); color: var(--portal-ink); border-radius: 5px; font-weight: 600; gap: 12px; }
body:not(.exam-shell-page) .secondary-button:hover { background: #f0f2fb; border-color: #98a8e4; }
body:not(.exam-shell-page) .panel { border-radius: 8px; }
body:not(.exam-shell-page) .message { border-radius: 5px; }
body:not(.exam-shell-page) .message-info { border-left-color: var(--portal-blue); }
body:not(.exam-shell-page) .entry-type-row b { color: var(--portal-blue); }

/* One composed sign-in spread. */
body.portal-login .page { width: min(1120px, calc(100% - 56px)); margin-top: clamp(32px, 6vh, 70px); }
.login-layout { display: grid; grid-template-columns: 1.06fr 1fr; min-height: 610px; background: var(--portal-paper); border: 1px solid var(--portal-line); border-radius: 12px; overflow: hidden; box-shadow: 0 15px 50px rgb(21 38 63 / 5%); }
.login-intro { display: flex; flex-direction: column; padding: 43px 48px 32px; background: var(--portal-ink); color: #fffefb; }
body.portal-login .login-intro .eyebrow { color: #d1b57f; font-size: 9px; letter-spacing: 2.2px; }
body.portal-login .login-intro h1 { margin: 26px 0 34px; color: #fffefb; font-size: clamp(62px, 6.5vw, 84px); font-weight: 650; letter-spacing: -4px; line-height: 1.01; }
.login-intro h1 > span { display: block; color: #e6d9bd; font-weight: 300; }
.editorial-rule { display: block; width: 47px; height: 2px; background: var(--portal-gold); margin-bottom: 21px; }
body.portal-login .login-statement h2 { margin: 0 0 12px; color: #fffefb; font-size: 22px; font-weight: 500; line-height: 1.7; letter-spacing: .4px; }
.login-description { margin: 0; color: #bfc9d8; font-size: 13px; line-height: 1.9; }
.login-modules { display: flex; gap: 25px; border-top: 1px solid #425168; margin-top: auto; padding-top: 23px; }
.login-modules > span { font-size: 12px; font-weight: 550; line-height: 1.5; }
.login-modules small { display: block; margin-top: 3px; color: #b1becf; font-size: 10px; font-weight: 400; }
body.portal-login .auth-panel { display: flex; flex-direction: column; align-self: center; width: 100%; margin: 0; padding: 50px 52px; border: 0; border-radius: 0; box-shadow: none; gap: 30px; background: transparent; }
body.portal-login .auth-panel .eyebrow { color: var(--portal-blue); font-size: 9px; }
body.portal-login .auth-panel h2 { margin: 0 0 10px; font-size: 29px; letter-spacing: -.6px; }
body.portal-login .auth-panel .muted { margin: 0; font-size: 13px; }
body.portal-login .form-stack { gap: 20px; }
body.portal-login .form-stack label { grid-template-columns: auto 1fr; gap: 9px; color: var(--portal-ink); font-size: 12px; font-weight: 600; }
body.portal-login .form-stack input:not([type="hidden"]) { grid-column: 1 / -1; min-height: 47px; background: #fff; font-size: 15px; font-weight: 400; }
.field-caption { align-self: center; color: var(--portal-muted); text-align: right; font-size: 10px; font-weight: 400; }
body.portal-login .form-stack .primary-button { min-height: 47px; justify-content: space-between; margin-top: 5px; font-size: 13px; }
.auth-booking { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; padding-top: 23px; border-top: 1px solid var(--portal-line); font-size: 12px; color: var(--portal-muted); }
.auth-booking a { display: inline-flex; align-items: center; justify-content: space-between; color: var(--portal-blue); font-weight: 600; }

/* Learning centre: one workbench, with practice as the primary action. */
body.portal-dashboard .dashboard-head { align-items: center; margin: 0; padding: 36px 40px; min-height: 187px; border-radius: 12px 12px 0 0; background: var(--portal-ink); color: #fffefb; }
body.portal-dashboard .dashboard-head .eyebrow { color: #d1b57f; font-size: 9px; }
body.portal-dashboard .dashboard-head h1 { margin: 0 0 12px; font-size: clamp(25px, 2.6vw, 32px); font-weight: 550; overflow-wrap: anywhere; }
body.portal-dashboard .dashboard-head .muted { margin: 0; color: #c1cada; font-size: 13px; }
body.portal-dashboard .credit-box { min-width: 190px; gap: 10px; padding: 2px 0 2px 30px; border: 0; border-left: 1px solid #7c755f; border-radius: 0; background: transparent; box-shadow: none; }
body.portal-dashboard .credit-box > span { color: #d0d7e1; font-size: 12px; font-weight: 400; }
.credit-box > span small { display: block; margin-top: 4px; color: #b5c0d1; font-size: 8px; letter-spacing: 1.5px; }
body.portal-dashboard .credit-box strong { font-size: 33px; color: #fffefb; font-weight: 500; line-height: 1.15; }
.credit-box strong small { font-size: 13px; margin-left: 9px; color: #c1cada; font-weight: 400; }
.practice-workbench { border: 1px solid var(--portal-line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--portal-paper); overflow: hidden; }
body.portal-dashboard .content-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 0; align-items: stretch; }
.practice-main { min-width: 0; padding: 32px 36px 38px; }
.practice-history { min-width: 0; padding: 32px 27px; border-left: 1px solid var(--portal-line); background: #f8f8f5; }
body.portal-dashboard .section-title { margin: 0; padding: 0 0 24px; border-bottom: 1px solid var(--portal-line); align-items: flex-end; }
body.portal-dashboard .section-title .eyebrow { font-size: 9px; margin-bottom: 5px; }
body.portal-dashboard .section-title h2 { font-size: 21px; }
.section-caption { padding-bottom: 4px; font-size: 11px; color: var(--portal-muted); }
body.portal-dashboard .exam-item { display: flex; align-items: center; gap: 18px; padding: 25px 0; border-top: 1px solid var(--portal-line); }
body.portal-dashboard .exam-item:first-child { border-top: 0; padding-top: 25px; }
body.portal-dashboard .exam-item:last-child { padding-bottom: 0; }
.exam-index { align-self: flex-start; flex: 0 0 25px; padding-top: 2px; color: #8792a3; font-size: 13px; font-variant-numeric: tabular-nums; }
.exam-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
body.portal-dashboard .exam-item h3 { font-size: 17px; margin-bottom: 7px; }
body.portal-dashboard .exam-item p { margin-bottom: 5px; }
body.portal-dashboard .exam-item .muted { font-size: 12px; line-height: 1.75; }
body.portal-dashboard .exam-meta { color: var(--portal-muted); font-size: 11px; line-height: 2; }
.exam-meta > span { display: inline-block; padding: 0 6px; margin-right: 7px; color: #3553a4; background: #edf0fa; border-radius: 3px; }
body.portal-dashboard .exam-item form { flex-shrink: 0; margin: 0; }
body.portal-dashboard .exam-item .primary-button { min-height: 39px; padding: 8px 13px; font-size: 12px; gap: 12px; }
body.portal-dashboard .attempt-row { padding: 19px 0; gap: 10px; color: var(--portal-ink); font-size: 13px; overflow-wrap: anywhere; }
body.portal-dashboard .attempt-row:first-child { padding-top: 21px; }
body.portal-dashboard .attempt-row:hover > span { color: var(--portal-blue); }
body.portal-dashboard .attempt-row > small { display: flex; align-items: center; gap: 10px; }
.attempt-state { display: inline-block; color: #855714; background: #f5ead5; font-size: 10px; line-height: 1.8; padding: 1px 6px; border-radius: 3px; }
.attempt-state.is-complete { color: #426457; background: #e9efe9; }
.attempt-score { color: var(--portal-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
body.portal-dashboard .pool-summary { border-top: 1px solid var(--portal-line); padding-top: 20px; margin-top: 25px; }
body.portal-dashboard .pool-summary h3 { font-size: 12px; margin-bottom: 5px; }
body.portal-dashboard .pool-summary p { font-size: 10px; color: var(--portal-muted); line-height: 1.8; margin: 0; }
body.portal-dashboard .empty-state { padding: 38px 0; color: var(--portal-muted); line-height: 1.8; text-align: left; }
body.portal-dashboard .empty-state strong { color: var(--portal-ink); font-size: 14px; font-weight: 550; }
body.portal-dashboard .empty-state p { margin: 7px 0 0; font-size: 12px; }
.portal-services { display: flex; gap: 28px; border-top: 1px solid var(--portal-line); padding: 28px 36px; background: #f9f8f4; }
.service-heading { flex: 0 0 125px; }
body.portal-dashboard .service-heading .eyebrow { font-size: 8px; margin-bottom: 5px; }
body.portal-dashboard .service-heading h2 { font-size: 17px; }
.service-item { flex: 1; min-width: 0; border-left: 1px solid #d9dde0; padding-left: 26px; }
body.portal-dashboard .service-item h3 { margin-bottom: 6px; font-size: 14px; }
.service-item p { margin: 0 0 12px; color: var(--portal-muted); font-size: 11px; line-height: 1.8; }
.service-links { display: flex; gap: 18px; flex-wrap: wrap; }
.text-link { display: inline-flex; gap: 12px; color: var(--portal-blue); font-size: 12px; font-weight: 600; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.text-link.muted-link { color: var(--portal-muted); font-weight: 400; }
.portal-footnote { margin: 22px 0 0; color: var(--portal-muted); font-size: 9px; letter-spacing: 1.3px; }
.portal-footnote > span { color: var(--portal-gold); margin: 0 10px; }

@media (max-width: 1050px) {
  body:not(.exam-shell-page) .topbar { padding: 14px 25px; gap: 20px; }
  body:not(.exam-shell-page) .topnav { justify-content: flex-end; gap: 5px 2px; }
  body:not(.exam-shell-page) .topnav a { padding: 7px 9px; }
  .header-caption { font-size: 10px; }
  .login-intro { padding: 39px 36px 30px; }
  body.portal-login .auth-panel { padding: 42px 36px; }
  .login-modules { gap: 20px; }
  body.portal-dashboard .content-grid { grid-template-columns: minmax(0, 1fr) 285px; }
  .practice-main { padding: 28px; }
  .practice-history { padding: 28px 23px; }
  .exam-index { display: none; }
  .portal-services { padding: 26px 28px; gap: 22px; }
  .service-heading { flex-basis: 100px; }
  .service-item { padding-left: 22px; }
}
@media (max-width: 780px) {
  body:not(.exam-shell-page) .topbar { flex-wrap: wrap; position: static; padding: 15px 20px; gap: 14px; }
  body:not(.exam-shell-page) .topnav { width: 100%; justify-content: flex-start; font-size: 12px; }
  body:not(.exam-shell-page) .nav-user { padding-left: 12px; }
  .header-caption { display: none; }
  body:not(.exam-shell-page) .page, body.portal-login .page { width: calc(100% - 32px); margin-top: 24px; }
  .login-layout { grid-template-columns: 1fr; max-width: 510px; margin: 0 auto; min-height: 0; }
  .login-intro { padding: 29px 32px 24px; }
  body.portal-login .login-intro .eyebrow { font-size: 8px; }
  body.portal-login .login-intro h1 { font-size: clamp(42px, 8vw, 59px); margin: 15px 0 24px; letter-spacing: -2px; }
  .login-intro h1 > span { display: inline; margin-left: 12px; }
  .editorial-rule { width: 34px; margin-bottom: 15px; }
  body.portal-login .login-statement h2 { font-size: 17px; margin: 0; }
  .login-statement h2 br { display: none; }
  .login-description, .login-modules { display: none; }
  body.portal-login .auth-panel { padding: 30px 32px; gap: 25px; }
  body.portal-login .auth-panel h2 { font-size: 26px; }
  body.portal-dashboard .dashboard-head { padding: 28px; gap: 20px; min-height: 175px; }
  body.portal-dashboard .dashboard-head h1 { font-size: 25px; }
  body.portal-dashboard .credit-box { min-width: 140px; padding-left: 22px; }
  body.portal-dashboard .content-grid { grid-template-columns: 1fr; }
  .practice-main { padding: 26px; }
  .practice-history { padding: 26px; border-left: 0; border-top: 1px solid var(--portal-line); }
  body.portal-dashboard .section-title { padding-bottom: 19px; }
  .portal-services { gap: 20px; padding: 26px; flex-wrap: wrap; }
  .service-heading { flex-basis: 100%; }
  .service-item { border-left: 0; padding-left: 0; min-width: 200px; }
}
@media (max-width: 460px) {
  body:not(.exam-shell-page) .topnav { column-gap: 0; }
  body:not(.exam-shell-page) .topnav a { padding: 7px 8px; }
  .login-intro { padding: 25px; }
  body.portal-login .login-intro h1 { font-size: 41px; }
  .login-intro h1 > span { margin-left: 9px; }
  body.portal-login .auth-panel { padding: 28px 25px; }
  body.portal-dashboard .dashboard-head { display: block; padding: 27px 24px; }
  body.portal-dashboard .credit-box { display: flex; justify-content: space-between; align-items: center; margin-top: 25px; padding: 18px 0 0; border-left: 0; border-top: 1px solid #5e625f; }
  body.portal-dashboard .credit-box strong { font-size: 27px; }
  .practice-main, .practice-history, .portal-services { padding: 24px; }
  body.portal-dashboard .exam-item { display: grid; grid-template-columns: 1fr; gap: 13px; }
  body.portal-dashboard .exam-item form { justify-self: start; }
  body.portal-dashboard .section-title h2 { font-size: 20px; }
  .section-caption { display: none; }
  .service-item { flex-basis: 100%; }
  .service-item + .service-item { border-top: 1px solid var(--portal-line); padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body:not(.exam-shell-page) *, body:not(.exam-shell-page) *::before, body:not(.exam-shell-page) *::after { transition: none !important; scroll-behavior: auto !important; }
}
