/* Precify colorful system — approved September 2026.
 * Scope every rule to plugin surfaces; never restyle exam answer states or PDF markup.
 * Legacy component rules use !important, so presentation overrides must match them.
 * Loaded for screen media only. No visibility/state selectors are overridden.
 */
body.pe-colorful-ui {
  --pc-ink:#172044; --pc-muted:#526078; --pc-violet:#6426d9;
  --pc-blue:#155eef; --pc-teal:#087f82; --pc-coral:#c54332;
  --pc-amber:#965d00; --pc-pink:#bb1766; --pc-line:#e0ddf0;
  --pc-lavender:#f4efff; --pc-shadow:0 8px 26px rgba(64,35,119,.08);
}
body.pe-colorful-ui :is(.precify-home-v6,.pe-dashboard,.pe-tests-page,.pe-results-page,.pe-result-page,.pe-profile-page,.pe-exam-creator-dashboard,.pe-eval-page,.pe-eval-student-page,.pe-spoken,.pe-analytics,.pf-auth) {
  --pf-blue:var(--pc-violet); --pf-navy:var(--pc-ink); --pf-ink:var(--pc-ink);
  --pf-text:#35405c; --pf-muted:var(--pc-muted); --pf-line:var(--pc-line);
  --pf-soft:#f7f4ff; --pf-radius:16px; --pf-font:system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  color:var(--pc-ink);
}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page,.pe-results-page,.pe-profile-page,.pe-result-page,.pe-eval-page,.pe-eval-student-page,.pe-spoken,.pe-analytics,.pe-exam-creator-dashboard)::before {
  background:radial-gradient(ellipse at 0 0,#eee5ff 0,transparent 48%),radial-gradient(ellipse at 100% 12%,#e5f8fb 0,transparent 42%),#faf9ff!important;
  border-radius:24px!important;
}
body.pe-colorful-ui :is(.precify-home-v6,.pe-dashboard,.pe-tests-page,.pe-results-page,.pe-profile-page,.pe-result-page,.pe-doc-app,.pe-exam-creator-dashboard,.pe-eval-page,.pf-auth) :is(a,button,input,select,textarea,summary):focus-visible {
  outline:3px solid #6426d9!important; outline-offset:3px!important;
}
/* Public homepage */
body.pe-colorful-ui .precify-home-v6 {background:#fff!important; font-family:var(--pf-font);}
body.pe-colorful-ui .precify-home-v6 .pf-header {background:rgba(255,255,255,.98)!important;border-bottom:1px solid #e9e2f7!important;box-shadow:0 4px 22px rgba(59,29,103,.05)!important;}
body.pe-colorful-ui .precify-home-v6 .pf-shell {max-width:1280px;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-hero--showcase {position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 95% 12%,#d8f2ff,transparent 60%),linear-gradient(120deg,#ede1ff,#faf6ff 56%,#e6f6ff)!important;padding-block:64px!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-hero--showcase::before {content:"";position:absolute;z-index:-1;left:-140px;bottom:-180px;width:360px;height:360px;border:54px solid #ffc5b5;border-radius:50%;opacity:.7;pointer-events:none;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-hero--showcase::after {content:"";position:absolute;z-index:-1;right:-70px;bottom:-170px;width:320px;height:320px;border:45px solid #a9e4da;border-radius:50%;opacity:.6;pointer-events:none;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-hero-copy h1 {color:#17143e!important;font-size:clamp(38px,4.5vw,64px)!important;line-height:1.09!important;letter-spacing:-.045em!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-hero-copy h1 span {color:#6426d9!important;background:none!important;-webkit-text-fill-color:currentColor!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-hero-copy>p {color:#3f3d60!important;font-size:19px!important;line-height:1.65!important;}
body.pe-colorful-ui .precify-home-v6 :is(.pf-nav-cta,.pf-menu-cta,.pf-btn-primary) {background:#6426d9!important;border-color:#6426d9!important;color:#fff!important;box-shadow:0 8px 18px #6426d924!important;border-radius:12px!important;}
body.pe-colorful-ui .precify-home-v6 .pf-btn-secondary {background:#c54332!important;border-color:#c54332!important;color:#fff!important;box-shadow:0 8px 18px #c5433220!important;border-radius:12px!important;}
body.pe-colorful-ui .precify-home-v6 .pf-btn-secondary svg {stroke:currentColor!important;}
body.pe-colorful-ui .precify-home-v6 .pf-hero-feature-chips span {background:#ffffffc9!important;border:1px solid #ded2f5!important;color:#543787!important;box-shadow:none!important;}
body.pe-colorful-ui .precify-home-v6 .pf-hero-feature-chips span:nth-child(2n) {background:#ecfaf7!important;border-color:#b9e4dc!important;color:#086c68!important;}
body.pe-colorful-ui .precify-home-v6 .pf-hero-feature-chips span:nth-child(3n) {background:#fff0e9!important;border-color:#f4cdbb!important;color:#923823!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-availability {color:#504665!important;}
body.pe-colorful-ui .precify-home-v6 .pf-hero-showcase {grid-template-columns:minmax(0,.83fr) minmax(0,1.17fr)!important;align-items:center;gap:12px;min-height:365px;}
.pc-preview-subjects {display:grid;gap:12px;position:relative;z-index:2;}
.pc-preview-subject {display:flex;align-items:center;gap:10px;padding:16px 13px;background:var(--subject);border-radius:16px;box-shadow:0 9px 16px #21164319;color:#fff;}
.pc-preview-subject:nth-child(1){--subject:#155eef;transform:rotate(-3deg)}
.pc-preview-subject:nth-child(2){--subject:#702ad9;transform:rotate(2deg)}
.pc-preview-subject:nth-child(3){--subject:#087f82;transform:rotate(-2deg)}
.pc-preview-subject:nth-child(4){--subject:#ae6305;transform:rotate(2deg)}
.pc-preview-subject i {font-size:25px;font-style:normal;width:30px;text-align:center;flex-shrink:0;}
.pc-preview-subject strong {display:block;color:#fff!important;font-size:15px;}
.pc-preview-subject small {display:block;font-size:11px;line-height:1.4;color:#fff;margin-top:4px;}
body.pe-colorful-ui .precify-home-v6 .pc-preview-paper {position:relative;z-index:3;background:#fff!important;border:1px solid #dedbf0;border-radius:16px;padding:22px 18px;transform:rotate(3deg);box-shadow:5px 6px 0 #f5f1ff,10px 12px 0 #e4deef,0 18px 28px #31245520;color:#172044;}
.pc-preview-paper>span {font-size:10px;letter-spacing:.12em;color:#6426d9;font-weight:800;}
body.pe-colorful-ui .precify-home-v6 .pc-preview-paper h3 {font-size:22px!important;margin:8px 0 4px!important;color:#172044!important;}
.pc-preview-paper>p {font-size:12px!important;color:#526078!important;}
.pc-preview-paper ol {padding-left:19px;margin:18px 0!important;font-size:13px;line-height:1.5;}
.pc-preview-paper li {padding:10px 0;border-bottom:1px solid #ebe8f2;}
.pc-preview-paper li::after {content:"";display:block;width:70%;margin:15px 0 5px;border-bottom:1px solid #ccd0dd;}
.pc-preview-paper>small {display:block;font-size:10px;color:#677189;margin-block:12px;}
body.pe-colorful-ui .precify-home-v6 .pc-preview-paper .pf-preview-action {background:#e5f7f3!important;color:#086c68!important;min-height:40px;}
body.pe-colorful-ui .precify-home-v6 .pc-preview-subjects>.pf-preview-action {background:#eee4ff!important;color:#5821be!important;min-height:40px;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-path-card {border-radius:20px!important;box-shadow:var(--pc-shadow)!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-path-card--learn {background:#edf5ff!important;border-color:#c8ddff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-path-card--create {background:#fff0e9!important;border-color:#f6d4c7!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-path-card--learn .pf-lite-path-icon {background:#155eef!important;color:#fff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-path-card--create .pf-lite-path-icon {background:#c54332!important;color:#fff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-path-card--create :is(.pf-path-feature-checks i,.pf-lite-path-label) {color:#ac382b!important;border-color:#c54332!important;}
body.pe-colorful-ui .precify-home-v6 .pf-path-illustration--creator svg {fill:#ffd8c9;stroke:#c54332;}
body.pe-colorful-ui .precify-home-v6 .pf-path-footer-action {background:#dceaff!important;color:#164ca5!important;}
body.pe-colorful-ui .precify-home-v6 .pf-path-footer-action--split {background:#ffe1d5!important;}
body.pe-colorful-ui .precify-home-v6 .pf-path-footer-action--split a {color:#a43828!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card:nth-child(3n+1) {background:#f2eaff!important;border-color:#ddcef5!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card:nth-child(3n+2) {background:#e8f8f4!important;border-color:#bde6dd!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card:nth-child(3n) {background:#fff5df!important;border-color:#eedcae!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card {border-radius:16px!important;box-shadow:none!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card:nth-child(1) .pf-lite-access-icon {background:#6426d9!important;color:#fff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card:nth-child(2) .pf-lite-access-icon {background:#087f82!important;color:#fff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-access-card:nth-child(3) .pf-lite-access-icon {background:#965d00!important;color:#fff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-eyebrow {color:#6426d9!important;}
/* Student dashboard: color identifies subjects while content remains dynamic. */
body.pe-colorful-ui .pe-dashboard.pe-dashboard-compact {width:min(1240px,calc(100% - 40px))!important;padding-top:24px!important;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome.pe-student-welcome {position:relative;isolation:isolate;overflow:hidden;min-height:170px;padding:30px 34px!important;border:0!important;border-radius:20px!important;background:linear-gradient(115deg,#9235df,#6525e5 52%,#3920cf)!important;box-shadow:0 12px 28px #6426d924!important;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome::before {content:"";position:absolute;z-index:-1;width:185px;height:185px;left:-70px;bottom:-110px;border-radius:50%;background:#ffbbaa;pointer-events:none;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome::after {content:"";position:absolute;z-index:-1;width:150px;height:150px;right:60px;top:-85px;border:24px solid #c9beff55;border-radius:50%;pointer-events:none;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome-copy :is(h2,p,small,span) {color:#fff!important;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome-copy h2 {font-size:clamp(26px,3vw,38px)!important;line-height:1.2!important;margin:4px 0 8px!important;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome-copy>span {font-size:14px!important;font-weight:600!important;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome-copy p {margin:0 0 6px!important;}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome .pe-student-hero-logout {background:#fff!important;border-color:#fff!important;color:#5821be!important;box-shadow:none!important;border-radius:10px!important;min-height:42px!important;}
body.pe-colorful-ui .pe-dashboard .pe-stat-grid {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card {border-radius:16px!important;box-shadow:none!important;padding:20px!important;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card:nth-child(1) {background:#edf3ff!important;border:1px solid #c8d8ff!important;--pc-stat:#155eef;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card:nth-child(2) {background:#e8f8f4!important;border:1px solid #b9e6dd!important;--pc-stat:#087f82;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card:nth-child(3) {background:#fff0e9!important;border:1px solid #f8cdbc!important;--pc-stat:#c54332;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card :is(strong,i) {color:var(--pc-stat)!important;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card i {background:#ffffffb3!important;box-shadow:none!important;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card span {color:#35405c!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-hub {grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card {--pe-subject-accent:#155eef;--pc-tint:#edf4ff;--pc-border:#c6d9ff;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-english {--pe-subject-accent:#6426d9;--pc-tint:#f3ecff;--pc-border:#deccfa;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-spokenenglish {--pe-subject-accent:#6426d9;--pc-tint:#f3ecff;--pc-border:#deccfa;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-ai-robotics {--pe-subject-accent:#bb1766;--pc-tint:#fff0f7;--pc-border:#f6c4dc;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) :is(.pe-subject-science,.pe-subject-gk) {--pe-subject-accent:#087f82;--pc-tint:#e9f9f5;--pc-border:#b8e5db;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-marathi {--pe-subject-accent:#bb1766;--pc-tint:#fff0f7;--pc-border:#f6c4dc;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) :is(.pe-subject-mat,.pe-subject-hindi) {--pe-subject-accent:#965d00;--pc-tint:#fff6e2;--pc-border:#edd7a6;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) :is(.pe-subject-social-science,.pe-subject-social-studies) {--pe-subject-accent:#c54332;--pc-tint:#fff0e9;--pc-border:#f4c9bc;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card {padding:22px 20px 18px!important;border:1px solid var(--pc-border)!important;border-top:8px solid var(--pe-subject-accent)!important;border-radius:16px!important;background:var(--pc-tint)!important;box-shadow:none!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card::before {content:none!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card h4 {color:#172044!important;font-weight:750!important;font-size:20px!important;line-height:1.25!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card p {color:#46516a!important;line-height:1.6!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-icon {background:var(--pe-subject-accent)!important;color:#fff!important;box-shadow:none!important;border-radius:12px!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card .pe-subject-card-count {border:0!important;background:#ffffffc7!important;color:#46516a!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card .pe-subject-card-actions a {background:transparent!important;border:1px solid var(--pc-border)!important;color:var(--pe-subject-accent)!important;box-shadow:none!important;min-height:44px!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-actions a b {color:inherit!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card .pe-subject-card-actions a:hover {background:#fff!important;}
body.pe-colorful-ui .pe-dashboard .pe-subject-all-links {gap:16px!important;}
body.pe-colorful-ui .pe-dashboard .pe-subject-all-links a {background:#f5f0ff!important;color:#5821be!important;border:1px solid #dfd0f7!important;border-radius:12px!important;min-height:46px;}
/* Existing navigation, keeping active states and drawer/search behavior. */
body.pe-colorful-ui :is(.pe-student-bottom-nav,.pe-staff-bottom-nav) {background:#fff!important;border-color:#e3ddf1!important;box-shadow:0 8px 28px #4122731a!important;}
body.pe-colorful-ui :is(.pe-student-bottom-nav,.pe-staff-bottom-nav) :is(a,button) {border-radius:11px!important;}
body.pe-colorful-ui :is(.pe-student-bottom-nav,.pe-staff-bottom-nav) a.is-active {background:#6426d9!important;color:#fff!important;box-shadow:0 4px 12px #6426d924!important;}
body.pe-colorful-ui :is(.pe-student-bottom-nav,.pe-staff-bottom-nav) a.is-active :is(svg,span) {color:#fff!important;stroke:currentColor!important;}
body.pe-colorful-ui :is(.pe-student-bottom-nav,.pe-staff-bottom-nav) .pe-page-search-toggle svg {stroke:#6426d9!important;}
body.pe-colorful-ui .pe-staff-bottom-nav .pe-creator-nav-action--save {background:#eee5ff!important;color:#5821be!important;border-color:#ddcef5!important;}
/* Staff and creator tools reuse the same semantic accent family. */
body.pe-colorful-ui :is(.pe-dash-hero,.pe-exam-creator-hero) {border:0!important;background:linear-gradient(115deg,#782bd6,#5128d6 60%,#447fe5)!important;border-radius:20px!important;box-shadow:var(--pc-shadow)!important;}
body.pe-colorful-ui :is(.pe-dash-hero,.pe-exam-creator-hero) :is(h1,h2,p,.pe-dash-kicker) {color:#fff!important;}
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-panel {border-color:#e0d7f1!important;background:#fff!important;border-radius:18px!important;box-shadow:var(--pc-shadow)!important;}
body.pe-colorful-ui :is(.pe-teacher-dashboard .pe-teacher-tool,.pe-exam-creator-dashboard .pe-creator-card) {--pc-tool:#155eef;--pc-tool-bg:#edf4ff;background:var(--pc-tool-bg)!important;border-color:#deddf0!important;border-radius:16px!important;box-shadow:var(--pc-shadow)!important;}
body.pe-colorful-ui :is(.pe-accent-magenta,.pe-accent-violet,.pe-creator-card--document) {--pc-tool:#6426d9!important;--pc-tool-bg:#f3ecff!important;}
body.pe-colorful-ui :is(.pe-accent-green,.pe-accent-teal,.pe-creator-card--exam) {--pc-tool:#087f82!important;--pc-tool-bg:#e8f8f4!important;}
body.pe-colorful-ui :is(.pe-accent-cyan,.pe-creator-card--image) {--pc-tool:#c54332!important;--pc-tool-bg:#fff0e9!important;}
body.pe-colorful-ui .pe-exam-creator-dashboard.pe-creator-view--home .pe-creator-card::before {background:var(--pc-tool)!important;}
body.pe-colorful-ui :is(.pe-teacher-dashboard .pe-teacher-tool,.pe-exam-creator-dashboard .pe-creator-card) :is(.pe-mini-icon,.pe-creator-card-icon) {background:var(--pc-tool)!important;color:#fff!important;}
/* Document creation: only presentation and layout; all data-* hooks retained. */
body.pe-colorful-ui .pe-doc-app {--navy:#172044;--blue:#6426d9;--violet:#6426d9;--line:#e0d8f1;--muted:#526078;padding:0!important;min-width:0;}
body.pe-colorful-ui .pe-doc-design-heading {padding:26px 30px;margin-bottom:20px;border-radius:16px;background:radial-gradient(circle at 94% 110%,#ffb7a9 0 12%,transparent 12.2%),linear-gradient(110deg,#7025dd,#4c40e9 64%,#839eeb);color:#fff;}
body.pe-colorful-ui .pe-doc-design-heading>span {font-size:11px;font-weight:750;letter-spacing:.13em;}
body.pe-colorful-ui .pe-doc-design-heading h2 {color:#fff!important;font-size:32px!important;margin:8px 0!important;line-height:1.2!important;}
body.pe-colorful-ui .pe-doc-design-heading p {color:#fff!important;margin:0!important;font-size:16px;}
body.pe-colorful-ui .pe-doc-layout>main {min-width:0;}
body.pe-colorful-ui .pe-doc-app .pe-doc-compose {border:1px solid #ddcff5!important;background:#f4efff!important;border-radius:16px!important;box-shadow:none!important;padding:20px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-compose-head {display:flex;flex-direction:column;align-items:stretch!important;gap:14px;}
body.pe-colorful-ui .pe-doc-app .pe-doc-kicker {color:#5821be!important;background:none!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-prompt-label {display:block;color:#172044;font-size:14px;font-weight:650;margin-top:16px;}
body.pe-colorful-ui .pe-doc-app .pe-doc-compose>textarea {min-height:150px!important;background:#fff!important;border:1px solid #cdbfe5!important;box-shadow:none!important;border-radius:10px!important;font:400 15px/1.6 var(--pf-font)!important;padding:12px!important;margin:8px 0 16px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-meta {background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-meta>div {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
body.pe-colorful-ui .pe-doc-app .pe-doc-meta :is(summary,label) {color:#172044!important;font-size:14px!important;}
body.pe-colorful-ui .pe-doc-app :is(.pe-doc-meta,.pe-doc-publish-target,.pe-doc-public-setting) select {min-height:44px!important;background:#fff!important;border:1px solid #cdbfe5!important;border-radius:9px!important;color:#172044!important;font-size:14px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-generate {background:#6426d9!important;color:#fff!important;box-shadow:0 6px 16px #6426d926!important;min-height:46px!important;width:100%!important;min-width:0!important;font-size:15px!important;border-radius:11px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-editor {min-width:0;border:1px solid #d2ddf7!important;border-radius:16px!important;padding:16px!important;background:#fff!important;box-shadow:none!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar {background:#edf3ff!important;border:1px solid #d2dff7!important;border-radius:12px!important;padding:12px!important;gap:8px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar button {background:#fff!important;border:1px solid #cbd7ec!important;color:#35405c!important;box-shadow:none!important;min-height:42px!important;padding:8px 12px!important;border-radius:9px!important;font-size:13px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar :is([data-publish],[data-ai-questions]) {background:#6426d9!important;border-color:#6426d9!important;color:#fff!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar [data-edit-answer] {background:#087f82!important;border-color:#087f82!important;color:#fff!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar :is([data-pdf],[data-answer]) {background:#155eef!important;border-color:#155eef!important;color:#fff!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar [data-save] {background:#fff!important;border-color:#6426d9!important;color:#5821be!important;}
body.pe-colorful-ui .pe-doc-app :is(.pe-doc-public-setting,.pe-doc-publish-target) {border:1px solid #d7e7e1!important;background:#eefaf5!important;border-radius:12px!important;padding:14px!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-paper {background:#fff!important;border:1px solid #dcdfe8!important;box-shadow:0 4px 16px #1720440a!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-status {color:#5821be!important;padding:12px 4px;line-height:1.5;}
body.pe-colorful-ui .pe-doc-app .pe-doc-library.pe-unified-library {background:#fcfaff!important;border:1px solid #dfd2f5!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-library.pe-unified-library .pe-doc-item {border-left-color:#6426d9!important;}
/* Shared support screens: retain their functional and semantic state styling. */
body.pe-colorful-ui :is(.pe-tests-nav,.pe-results-header,.pe-eval-page-head,.pe-eval-hero,.pe-profile-hero) {border-color:#dfd2f5!important;border-radius:16px!important;}
body.pe-colorful-ui .pf-auth :is(.pf-auth-card,.pf-auth-panel) {border-color:#dfd2f5!important;box-shadow:var(--pc-shadow)!important;}
body.pe-colorful-ui .pf-auth button[type="submit"] {background:#6426d9!important;color:#fff!important;border-color:#6426d9!important;}
/* Setup stays alongside the editor only when there is an actual document. */
@media(min-width:1100px) {
  body.pe-colorful-ui .pe-doc-layout>main:has(>[data-compose]:not([hidden])):has(>[data-editor]:not([hidden])) {display:grid;grid-template-columns:290px minmax(0,1fr);gap:20px;align-items:start;}
  body.pe-colorful-ui .pe-doc-layout>main:has(>[data-compose]:not([hidden])):has(>[data-editor]:not([hidden])) .pe-doc-meta>div {grid-template-columns:1fr;}
  body.pe-colorful-ui .pe-doc-layout>main:has(>[data-compose]:not([hidden])):has(>[data-editor]:not([hidden]))>.pe-doc-status {grid-column:1/-1;}
  body.pe-colorful-ui .pe-doc-layout>main:has(>[data-compose]:not([hidden])):has(>[data-editor]:not([hidden])) .pe-doc-paper {padding:28px 24px!important;}
}
@media(max-width:900px) {
  body.pe-colorful-ui .precify-home-v6 .pf-lite-hero-grid {grid-template-columns:1fr!important;gap:36px!important;}
  body.pe-colorful-ui .precify-home-v6 .pf-hero-showcase {width:min(560px,100%);margin:0 auto!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-hub {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
@media(max-width:600px) {
  body.pe-colorful-ui .precify-home-v6 .pf-lite-hero--showcase {padding-block:34px!important;}
  body.pe-colorful-ui .precify-home-v6 .pf-lite-hero-copy>p {font-size:17px!important;}
  body.pe-colorful-ui .precify-home-v6 .pf-lite-hero-actions {display:grid!important;grid-template-columns:1fr!important;}
  body.pe-colorful-ui .precify-home-v6 .pf-btn {width:100%;min-height:48px;}
  body.pe-colorful-ui .precify-home-v6 .pf-hero-showcase {gap:9px!important;min-height:0!important;}
  .pc-preview-subject {padding:13px 10px;gap:7px;border-radius:12px;}
  .pc-preview-subject strong {font-size:12px;}.pc-preview-subject small {font-size:10px;}.pc-preview-subject i {font-size:20px;width:22px;}
  body.pe-colorful-ui .precify-home-v6 .pc-preview-paper {padding:17px 12px;transform:rotate(2deg);}
  body.pe-colorful-ui .precify-home-v6 .pc-preview-paper h3 {font-size:18px!important;}
  .pc-preview-paper ol {font-size:11px;padding-left:16px;}
  body.pe-colorful-ui .pe-dashboard.pe-dashboard-compact {width:calc(100% - 24px)!important;padding-top:14px!important;}
  body.pe-colorful-ui .pe-dashboard .pe-student-welcome.pe-student-welcome {min-height:150px;padding:22px 20px!important;gap:12px!important;}
  body.pe-colorful-ui .pe-dashboard .pe-student-welcome-copy h2 {font-size:27px!important;overflow-wrap:anywhere;}
  body.pe-colorful-ui .pe-dashboard .pe-stat-grid {gap:8px!important;}
  body.pe-colorful-ui .pe-dashboard .pe-stat-card {padding:12px 8px!important;gap:6px!important;}
  body.pe-colorful-ui .pe-dashboard .pe-stat-card span {font-size:12px!important;line-height:1.4!important;}
  body.pe-colorful-ui .pe-dashboard .pe-stat-card strong {font-size:25px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-hub {gap:12px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card {padding:14px 12px 12px!important;border-top-width:6px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card h4 {font-size:17px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-top {flex-wrap:wrap;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-icon {min-width:40px!important;height:40px!important;font-size:14px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card p {font-size:12px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-actions {gap:5px!important;}
  body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-actions a {padding:8px 6px!important;font-size:12px!important;}
  body.pe-colorful-ui .pe-doc-design-heading {padding:22px 18px;}
  body.pe-colorful-ui .pe-doc-design-heading h2 {font-size:27px!important;}
  body.pe-colorful-ui .pe-doc-app .pe-doc-editor {padding:10px!important;}
  body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar {padding:8px!important;gap:7px!important;}
  body.pe-colorful-ui .pe-doc-app .pe-doc-toolbar button {flex:1 1 130px;font-size:13px!important;}
  body.pe-colorful-ui .pe-doc-app .pe-doc-meta>div {grid-template-columns:1fr;}
}
@media(max-width:380px) {
  body.pe-colorful-ui .pe-dashboard .pe-student-welcome.pe-student-welcome {grid-template-columns:1fr!important;}
  body.pe-colorful-ui .pe-dashboard .pe-student-welcome .pe-student-hero-logout {justify-self:start;}
  body.pe-colorful-ui .precify-home-v6 .pf-hero-showcase {grid-template-columns:1fr!important;gap:22px!important;}
  .pc-preview-subjects {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .pc-preview-subject {transform:none!important;}.pc-preview-subjects>.pf-preview-action {grid-column:1/-1;}
  body.pe-colorful-ui .precify-home-v6 .pc-preview-paper {transform:none;}
}
@media(prefers-reduced-motion:reduce) {
  body.pe-colorful-ui :is(.precify-home-v6,.pe-dashboard,.pe-doc-app) * {scroll-behavior:auto!important;transition:none!important;animation:none!important;}
}
/* Counter the host-theme article reset and inherited oversized preview text. */
body.pe-colorful-ui .precify-home-v6 .pc-preview-paper {padding:24px 20px!important;}
body.pe-colorful-ui .precify-home-v6 .pc-preview-paper li {font-size:13px!important;line-height:1.6!important;}
body.pe-colorful-ui .precify-home-v6 .pc-preview-subject i {width:36px;flex-basis:36px;font-size:22px;}
body.pe-colorful-ui .precify-home-v6 :is(.pf-lite-path-card,.pf-lite-track-card) {padding:26px!important;}
body.pe-colorful-ui .precify-home-v6 :is(h1,h2,h3) {font-weight:750!important;}
body.pe-colorful-ui .precify-home-v6 :is(.pf-btn,.pf-menu a,.pf-nav-actions a) {font-weight:650!important;}
body.pe-colorful-ui .pe-dashboard .pe-stat-grid {border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;}
@media(max-width:600px) {
 body.pe-colorful-ui .precify-home-v6 .pc-preview-paper {padding:18px 13px!important;}
 body.pe-colorful-ui .precify-home-v6 .pc-preview-paper li {font-size:12px!important;}
 body.pe-colorful-ui .precify-home-v6 .pc-preview-subject {flex-direction:column;align-items:flex-start;gap:6px;}
 body.pe-colorful-ui .precify-home-v6 .pc-preview-subject i {width:auto;flex-basis:auto;font-size:20px;}
 body.pe-colorful-ui .precify-home-v6 :is(.pf-lite-path-card,.pf-lite-track-card) {padding:20px!important;}
}
/* Respect the existing compose/editor visibility transition after generation. */
body.pe-colorful-ui .pe-doc-app .pe-doc-library:not(.is-open) {visibility:hidden;pointer-events:none;}
body.pe-colorful-ui .pe-doc-app .pe-doc-library.is-open {visibility:visible;pointer-events:auto;}
body.pe-colorful-ui .pe-dashboard .pe-stat-card {grid-column:auto!important;grid-row:auto!important;}
body.pe-colorful-ui .pe-dashboard :is(h2,h3,h4,strong),
body.pe-colorful-ui .pe-doc-app :is(h2,h3,h4,strong) {font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;font-weight:700!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-paper::before,
body.pe-colorful-ui .pe-doc-app .pe-doc-paper::after {content:none!important;}
@media(max-width:600px) {
 body.pe-colorful-ui .pe-dashboard.pe-dashboard-compact .pe-student-stats .pe-stat-card {display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto!important;text-align:center;justify-items:center;padding:12px 6px!important;}
 body.pe-colorful-ui .pe-dashboard.pe-dashboard-compact .pe-student-stats .pe-stat-card>* {grid-column:auto!important;grid-row:auto!important;}
 body.pe-colorful-ui .pe-dashboard .pe-stat-card i {width:34px!important;height:34px!important;}
 body.pe-colorful-ui .pe-dashboard .pe-stat-card span {font-size:11px!important;letter-spacing:0!important;text-transform:none!important;white-space:normal!important;}
}
/* Reading and creation surfaces follow the same palette as the dashboards. */
body.pe-colorful-ui :is(.pe-public-resources,.pf-auth-shell,.precision-support,.precision-ai-inquiry-form,.pe-iw-app,.pe-student-leaderboard) {
 --pf-blue:#6426d9;--pf-navy:#172044;--pf-ink:#172044;--pf-soft:#f7f4ff;--pf-line:#e0ddf0;
}
body.pe-colorful-ui .pe-public-resources .pe-public-hero,
body.pe-colorful-ui .pe-results-page .pe-results-hero {background:linear-gradient(115deg,#762dda,#5134d3 62%,#437fe0)!important;border-color:#7444de!important;border-radius:20px!important;}
body.pe-colorful-ui :is(.pe-public-hero,.pe-results-hero) :is(h1,h2,p,.pe-results-eyebrow) {color:#fff!important;}
body.pe-colorful-ui .pe-public-resources .pe-public-card {border-radius:16px!important;box-shadow:var(--pc-shadow)!important;border-top:5px solid #6426d9!important;}
body.pe-colorful-ui .pe-public-resources .pe-public-card:nth-child(3n+1) {background:#f5f0ff!important;}
body.pe-colorful-ui .pe-public-resources .pe-public-card:nth-child(3n+2) {background:#edf9f5!important;border-top-color:#087f82!important;}
body.pe-colorful-ui .pe-public-resources .pe-public-card:nth-child(3n) {background:#fff2e9!important;border-top-color:#c54332!important;}
body.pe-colorful-ui .pe-public-resources .pe-public-action:not(.secondary) {background:#6426d9!important;border-color:#6426d9!important;color:#fff!important;}
body.pe-colorful-ui .pe-public-resources .pe-public-search-panel {background:#f4efff!important;border-color:#ded0f5!important;border-radius:16px!important;}
body.pe-colorful-ui :is(.pe-results-page .pe-result-item,.pe-tests-page .pe-tests-card) {border-color:#e0ddf0!important;border-radius:16px!important;box-shadow:var(--pc-shadow)!important;}
body.pe-colorful-ui .pe-results-page .pe-view-result {background:#6426d9!important;border-color:#6426d9!important;color:#fff!important;}
body.pe-colorful-ui :is(.pe-eval-page,.pe-eval-student-page) .pe-eval-drop,
body.pe-colorful-ui .pe-iw-app .pe-iw-drop {background:#f4efff!important;border-color:#ac89e6!important;border-radius:16px!important;}
body.pe-colorful-ui .pe-spoken :is(.pe-spoken-practice,.pe-spoken-topics) {background:#f5f0ff!important;border-color:#dfd0f5!important;}
body.pe-colorful-ui .pe-spoken :is(.pe-spoken-feedback,.pe-spoken-progress) {background:#edf9f5!important;border-color:#c0e6db!important;}
/* Keep the editable paper full width; PDF generation has separate server styles. */
body.pe-colorful-ui .pe-doc-app .pe-doc-paper .pe-paper-section {display:block!important;width:100%!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-paper .pe-question {width:100%!important;max-width:none!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-paper .pe-section-title {width:100%!important;max-width:none!important;}
body.pe-colorful-ui .pe-doc-app .pe-doc-paper [data-question] {width:100%!important;max-width:none!important;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-student-subject-card.pe-student-subject-card {display:flex!important;flex-direction:column;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-primary {flex:1;}
body.pe-colorful-ui :is(.pe-dashboard,.pe-tests-page) .pe-subject-card-actions {margin-top:16px!important;}
/* A single editing column keeps questions readable; downloaded PDFs are unchanged. */
body.pe-colorful-ui .pe-doc-app .pe-doc-paper {column-count:1!important;column-rule:none!important;outline:none!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-live-card {padding:22px!important;border-radius:16px!important;background:#f8f5ff!important;border-color:#e2d7f4!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-live-card:nth-child(2) {background:#effaf6!important;border-color:#cce8dc!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-live-card:nth-child(3) {background:#fff5e7!important;border-color:#efdfbe!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-final-inner {background:linear-gradient(110deg,#6426d9,#4530c5 65%,#087f82)!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-final .pf-lite-eyebrow {color:#e9dcff!important;}
body.pe-colorful-ui .precify-home-v6 .pf-lite-final .pf-btn-primary {background:#fff!important;color:#5821be!important;border-color:#fff!important;}
/* ============================================================
 * 1.6.46 Canonical header + page-layout system
 * The selectors below intentionally sit at the end of the final
 * colorful stylesheet so older module-specific header palettes cannot
 * reintroduce green/teal/blue variants or white-on-white controls.
 * ============================================================ */
body.pe-colorful-ui{
  --pe-unified-header-gradient:linear-gradient(115deg,#7b2dde 0%,#5a2edc 56%,#447fe5 100%);
  --pe-unified-header-accent:#5b2bd3;
  --pe-unified-header-shadow:0 14px 32px rgba(82,52,186,.20);
}

/* One colour system for the main account/page header. */
body.pe-colorful-ui .pe-dashboard .pe-student-welcome.pe-student-welcome,
body.pe-colorful-ui .pe-dashboard .pe-dash-hero.pe-dash-hero,
body.pe-colorful-ui .pe-teacher-dashboard .pe-dash-hero.pe-dash-hero,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-hero.pe-exam-creator-hero,
body.pe-colorful-ui .pe-results-page .pe-results-hero.pe-results-hero,
body.pe-colorful-ui .pe-profile-page .pe-profile-hero.pe-profile-hero,
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-header.pe-sl-header,
body.pe-colorful-ui .pe-result-page .pe-result-header.pe-result-header,
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero.pe-tests-page-hero{
  border:0!important;
  border-radius:20px!important;
  background:var(--pe-unified-header-gradient)!important;
  box-shadow:var(--pe-unified-header-shadow)!important;
  color:#fff!important;
}
body.pe-colorful-ui .pe-dashboard .pe-student-welcome.pe-student-welcome :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-dashboard .pe-dash-hero.pe-dash-hero :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-hero.pe-exam-creator-hero :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-results-page .pe-results-hero.pe-results-hero :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-profile-page .pe-profile-hero.pe-profile-hero :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-header.pe-sl-header :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-result-page .pe-result-header.pe-result-header :is(h1,h2,h3,p,small,span),
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero.pe-tests-page-hero :is(h1,h2,h3,p,small,span){
  color:#fff!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Header controls are always visible: white button + purple text. */
body.pe-colorful-ui .pe-dashboard .pe-student-welcome .pe-student-hero-logout.pe-student-hero-logout,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-hero .pe-exam-creator-logout.pe-exam-creator-logout,
body.pe-colorful-ui .pe-results-page .pe-results-hero .pe-results-back.pe-results-back,
body.pe-colorful-ui .pe-profile-page .pe-profile-hero .pe-profile-back.pe-profile-back,
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-header .pe-sl-nav a,
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero .pe-tests-page-back.pe-tests-page-back,
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero .pe-tests-page-profile.pe-tests-page-profile{
  border:1px solid rgba(255,255,255,.74)!important;
  background:#fff!important;
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  box-shadow:0 7px 18px rgba(45,28,116,.14)!important;
  text-shadow:none!important;
  opacity:1!important;
}
body.pe-colorful-ui .pe-results-page .pe-results-back :is(span,svg),
body.pe-colorful-ui .pe-profile-page .pe-profile-back :is(span,svg),
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-nav a :is(span,svg),
body.pe-colorful-ui .pe-tests-page .pe-tests-page-back :is(span,svg),
body.pe-colorful-ui .pe-tests-page .pe-tests-page-profile :is(span,svg),
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-logout :is(span,svg){
  color:inherit!important;
  stroke:currentColor!important;
  -webkit-text-fill-color:currentColor!important;
}

/* Header badges use the same white/purple language instead of green/teal. */
body.pe-colorful-ui .pe-results-page .pe-results-count.pe-results-count,
body.pe-colorful-ui .pe-profile-page .pe-profile-account-badge.pe-profile-account-badge,
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-page-head>span{
  border:1px solid rgba(255,255,255,.72)!important;
  background:#fff!important;
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  box-shadow:none!important;
}
body.pe-colorful-ui .pe-profile-page .pe-profile-page-avatar.pe-profile-page-avatar{
  border:1px solid rgba(255,255,255,.34)!important;
  background:rgba(255,255,255,.15)!important;
  color:#fff!important;
  box-shadow:none!important;
}

/* Available Tests: one compact header, not a title header plus a second hero. */
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero.pe-tests-page-hero{
  margin:8px 0 18px!important;
  padding:22px 24px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-top{
  padding-bottom:13px!important;
  border-bottom:1px solid rgba(255,255,255,.18)!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-title h1{
  font-size:clamp(30px,3.6vw,42px)!important;
  line-height:1.05!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-title p{
  margin-top:5px!important;
  font-size:14px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program.pe-tests-program-hero{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  padding:13px 0 0!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-tests-program-copy{
  display:flex!important;
  flex-wrap:wrap!important;
  align-items:baseline!important;
  gap:6px 10px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-dash-kicker{
  display:none!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-tests-program-copy h2{
  margin:0!important;
  color:#fff!important;
  font-size:20px!important;
  line-height:1.2!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-tests-program-copy p{
  margin:0!important;
  color:rgba(255,255,255,.9)!important;
  font-size:13px!important;
  line-height:1.4!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-tests-program-visual{
  display:none!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject.pe-tests-subject-hero{
  grid-template-columns:56px minmax(0,1fr)!important;
  gap:12px!important;
  padding:13px 0 0!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-icon{
  width:54px!important;
  height:54px!important;
  min-height:54px!important;
  border-radius:15px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-icon svg{
  width:28px!important;
  height:28px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-copy h2{
  margin:0!important;
  color:#fff!important;
  font-size:22px!important;
  line-height:1.2!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-copy>p{
  margin:3px 0 8px!important;
  font-size:12px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-stats>span{
  min-width:0!important;
  padding:7px 9px!important;
  margin-right:6px!important;
  border-radius:11px!important;
}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-stats strong{font-size:16px!important}
body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--subject .pe-tests-subject-hero-stats small{font-size:9px!important}
body.pe-colorful-ui .pe-tests-page .pe-tests-subject-hero-glyphs{display:none!important}

/* Leaderboard: only the page header is coloured. The rank panel is content. */
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-hero.pe-sl-hero{
  border:1px solid #dfd9f0!important;
  background:linear-gradient(145deg,#ffffff 0%,#f8f5ff 100%)!important;
  box-shadow:0 8px 24px rgba(54,43,112,.07)!important;
  color:#172044!important;
}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-hero.pe-sl-hero::before,
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-hero.pe-sl-hero::after{content:none!important;display:none!important}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-hero :is(h1,h2,h3,p,small,strong,span){
  color:#172044!important;
  -webkit-text-fill-color:currentColor!important;
}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-hero .pe-sl-kicker{color:#6426d9!important}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-hero-art{
  background:#f1eaff!important;
  color:#6426d9!important;
  filter:none!important;
}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-summary div{
  border:1px solid #e2dcf0!important;
  background:#fff!important;
}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-summary span{color:#66728e!important}
body.pe-colorful-ui .pe-student-leaderboard .pe-sl-summary strong{color:#172044!important}

/* Inside Content Creator, module titles are section headings, not extra heroes. */
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-doc-app .pe-doc-design-heading.pe-doc-design-heading,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-media-studio .pe-media-heading.pe-media-heading,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-import-app .pe-import-heading.pe-import-heading,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-panel .pe-creator-headline.pe-creator-headline,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-panel .pe-worksheet-studio>h1{
  margin:0 0 14px!important;
  padding:2px 2px 14px!important;
  border:0!important;
  border-bottom:1px solid #e2dded!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#172044!important;
}
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-doc-app .pe-doc-design-heading :is(h1,h2,h3,p,span),
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-media-studio .pe-media-heading :is(h1,h2,h3,p,span),
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-import-app .pe-import-heading :is(h1,h2,h3,p,span),
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-panel .pe-creator-headline,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-panel .pe-worksheet-studio>h1{
  color:#172044!important;
  -webkit-text-fill-color:currentColor!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-doc-app .pe-doc-design-heading>span,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-media-studio .pe-media-kicker,
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-import-app .pe-import-heading span{
  color:#6426d9!important;
}
body.pe-colorful-ui .pe-exam-creator-dashboard .pe-import-app .pe-import-heading>a{
  border:1px solid #d8d0e9!important;
  background:#fff!important;
  color:#6426d9!important;
  box-shadow:none!important;
}

@media(max-width:760px){
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero.pe-tests-page-hero{padding:17px!important;border-radius:18px!important}
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-top{padding-bottom:11px!important}
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-title h1{font-size:27px!important}
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-title p{font-size:12px!important}
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program.pe-tests-program-hero{padding-top:10px!important}
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-tests-program-copy h2{font-size:17px!important}
  body.pe-colorful-ui .pe-tests-page .pe-tests-page-hero-body--program .pe-tests-program-copy p{font-size:11px!important}
  body.pe-colorful-ui .pe-results-page .pe-results-hero.pe-results-hero,
  body.pe-colorful-ui .pe-profile-page .pe-profile-hero.pe-profile-hero,
  body.pe-colorful-ui .pe-student-leaderboard .pe-sl-header.pe-sl-header,
  body.pe-colorful-ui .pe-dashboard .pe-student-welcome.pe-student-welcome,
  body.pe-colorful-ui .pe-exam-creator-dashboard .pe-exam-creator-hero.pe-exam-creator-hero{border-radius:18px!important}
}

/* ============================================================
 * 1.6.47 Header contrast contract
 * Keep primary hero copy white, but restore dark/purple ink on
 * white controls and information tiles nested inside those heroes.
 * These selectors intentionally outrank legacy broad header rules.
 * ============================================================ */

/* Results: white controls and light metric tiles must never inherit white text. */
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-back.pe-results-back,
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-back.pe-results-back > span,
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-back.pe-results-back > svg,
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-count.pe-results-count{
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-back.pe-results-back > svg{
  stroke:currentColor!important;
}
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-overview.pe-results-overview > div > span{
  color:#607095!important;
  -webkit-text-fill-color:#607095!important;
  opacity:1!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero .pe-results-overview.pe-results-overview > div > strong{
  color:#071f66!important;
  -webkit-text-fill-color:#071f66!important;
  opacity:1!important;
  text-shadow:none!important;
}

/* Student Profile: back control and account badge sit on white surfaces. */
body.pe-colorful-ui .pe-profile-page.pe-profile-page .pe-profile-hero.pe-profile-hero .pe-profile-back.pe-profile-back,
body.pe-colorful-ui .pe-profile-page.pe-profile-page .pe-profile-hero.pe-profile-hero .pe-profile-back.pe-profile-back > span,
body.pe-colorful-ui .pe-profile-page.pe-profile-page .pe-profile-hero.pe-profile-hero .pe-profile-back.pe-profile-back > svg,
body.pe-colorful-ui .pe-profile-page.pe-profile-page .pe-profile-hero.pe-profile-hero .pe-profile-account-badge.pe-profile-account-badge{
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-profile-page.pe-profile-page .pe-profile-hero.pe-profile-hero .pe-profile-back.pe-profile-back > svg{
  stroke:currentColor!important;
}

/* Leaderboard: header navigation and class badge are white controls. */
body.pe-colorful-ui .pe-student-leaderboard.pe-student-leaderboard .pe-sl-header.pe-sl-header .pe-sl-nav.pe-sl-nav a,
body.pe-colorful-ui .pe-student-leaderboard.pe-student-leaderboard .pe-sl-header.pe-sl-header .pe-sl-nav.pe-sl-nav a > span,
body.pe-colorful-ui .pe-student-leaderboard.pe-student-leaderboard .pe-sl-header.pe-sl-header .pe-sl-nav.pe-sl-nav a > svg,
body.pe-colorful-ui .pe-student-leaderboard.pe-student-leaderboard .pe-sl-header.pe-sl-header .pe-sl-page-head.pe-sl-page-head > span{
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-student-leaderboard.pe-student-leaderboard .pe-sl-header.pe-sl-header .pe-sl-nav.pe-sl-nav a > svg{
  stroke:currentColor!important;
}

/* Individual result page: navigation controls and score disc have explicit contrast. */
body.pe-colorful-ui .pe-result-page.pe-result-page .pe-result-header.pe-result-header .pe-result-nav.pe-result-nav a,
body.pe-colorful-ui .pe-result-page.pe-result-page .pe-result-header.pe-result-header .pe-result-nav.pe-result-nav a > span,
body.pe-colorful-ui .pe-result-page.pe-result-page .pe-result-header.pe-result-header .pe-result-nav.pe-result-nav a > svg{
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-result-page.pe-result-page .pe-result-header.pe-result-header .pe-result-nav.pe-result-nav a > svg{
  stroke:currentColor!important;
}
body.pe-colorful-ui .pe-result-page.pe-result-page .pe-result-header.pe-result-header .pe-result-score.pe-result-score :is(strong,span){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Available Tests: back/profile controls are white, hero copy stays white. */
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-back.pe-tests-page-back,
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-back.pe-tests-page-back > span,
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-back.pe-tests-page-back > svg,
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-profile.pe-tests-page-profile,
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-profile.pe-tests-page-profile > span,
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-profile.pe-tests-page-profile > svg{
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  text-shadow:none!important;
}
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero :is(.pe-tests-page-back,.pe-tests-page-profile) > svg{
  stroke:currentColor!important;
}

/* Main dashboard/creator white logout controls must keep purple text. */
body.pe-colorful-ui .pe-dashboard.pe-dashboard .pe-student-welcome.pe-student-welcome .pe-student-hero-logout.pe-student-hero-logout,
body.pe-colorful-ui .pe-dashboard.pe-dashboard .pe-dash-hero.pe-dash-hero .pe-dash-hero-btn.pe-dash-hero-btn,
body.pe-colorful-ui .pe-exam-creator-dashboard.pe-exam-creator-dashboard .pe-exam-creator-hero.pe-exam-creator-hero .pe-exam-creator-logout.pe-exam-creator-logout{
  color:var(--pe-unified-header-accent)!important;
  -webkit-text-fill-color:var(--pe-unified-header-accent)!important;
  text-shadow:none!important;
}

/* Explicit primary hero typography contract. Do not let light-card overrides leak outward. */
body.pe-colorful-ui .pe-results-page.pe-results-page .pe-results-hero.pe-results-hero > :is(.pe-results-eyebrow,h1,h2,p),
body.pe-colorful-ui .pe-profile-page.pe-profile-page .pe-profile-hero.pe-profile-hero .pe-profile-identity :is(.pe-profile-eyebrow,h1,h2,p),
body.pe-colorful-ui .pe-student-leaderboard.pe-student-leaderboard .pe-sl-header.pe-sl-header .pe-sl-page-head > div :is(.pe-sl-eyebrow,h1,h2,p),
body.pe-colorful-ui .pe-result-page.pe-result-page .pe-result-header.pe-result-header .pe-result-heading > div :is(.pe-result-eyebrow,h1,h2,p),
body.pe-colorful-ui .pe-tests-page.pe-tests-page .pe-tests-page-hero.pe-tests-page-hero .pe-tests-page-title :is(.pe-tests-page-kicker,h1,p){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
/* Desktop creator workspace: navigation rail; mobile keeps its bottom dock. */
body .pe-creator-view--profile .pe-creator-profile-panel{display:grid!important;grid-template-columns:1fr!important;gap:16px!important;margin:0!important;padding:22px!important}
body .pe-creator-view--profile .pe-creator-profile-row{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;min-width:0!important}
body .pe-creator-view--profile .pe-creator-profile-row span{overflow-wrap:anywhere}
body .pe-creator-view--profile .pe-creator-account-form{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important;max-width:520px!important}
body .pe-creator-view--profile .pe-creator-account-form :is(input,button){width:100%!important;min-width:0!important}
body .pe-creator-view--profile .pe-creator-delete-form{display:block!important;margin-top:12px!important}
@media screen and (max-width:1023px){body .pe-staff-bottom-nav--creator{grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important}}
@media screen and (min-width:1024px){
  body .pe-exam-creator-dashboard:has(>.pe-staff-bottom-nav--creator){
    display:grid!important;grid-template-columns:180px minmax(0,1fr)!important;
    align-items:start!important;gap:16px!important;padding-bottom:24px!important;
  }
  body .pe-exam-creator-dashboard>.pe-exam-creator-hero{grid-column:1/-1!important;width:100%!important;max-width:none!important;justify-self:stretch!important;margin:0!important}
  body .pe-exam-creator-dashboard>.pe-exam-creator-layout{grid-column:2!important;grid-row:2!important;min-width:0!important;width:100%!important}
  body .pe-exam-creator-dashboard>.pe-staff-bottom-nav--creator{
    position:sticky!important;top:24px!important;bottom:auto!important;left:auto!important;right:auto!important;
    transform:none!important;grid-column:1!important;grid-row:2!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    width:100%!important;max-width:none!important;margin:0!important;padding:10px!important;
    gap:6px!important;border-radius:16px!important;z-index:20!important;
  }
  body .pe-exam-creator-dashboard>.pe-staff-bottom-nav--creator :is(a,button){
    display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;
    gap:10px!important;width:100%!important;min-height:46px!important;padding:10px!important;
    font-size:12px!important;text-align:left!important;line-height:1.35!important;
  }
  body .pe-exam-creator-dashboard>.pe-staff-bottom-nav--creator :is(a,button) svg{width:21px!important;height:21px!important;flex-shrink:0!important}
  body .pe-exam-creator-dashboard>.pe-staff-bottom-nav--creator span{white-space:normal!important}
  body .pe-creator-view--home .pe-creator-home-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
/* Shared desktop rail for every student/staff page using the footer navigation.
   Creator dashboards reserve their rail with the existing two-column layout. */
@media screen and (min-width:1024px){
  body:has(:is(.pe-student-bottom-nav,.pe-staff-bottom-nav)):not(:has(.pe-exam-creator-dashboard)){
    box-sizing:border-box!important;padding-left:208px!important;
  }
  body:has(:is(.pe-student-bottom-nav,.pe-staff-bottom-nav)):not(:has(.pe-exam-creator-dashboard)) :is(.pe-dashboard,.pe-tests-page,.pe-results-page,.pe-profile-page,.pe-result-page,.pe-student-leaderboard,.pe-teacher-dashboard,.pe-dtf-app,.pe-weekly-shell){
    box-sizing:border-box!important;width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;
  }
  body.pe-colorful-ui:not(:has(.pe-exam-creator-dashboard)) nav:is(.pe-student-bottom-nav,.pe-staff-bottom-nav){
    box-sizing:border-box!important;
    position:fixed!important;inset:24px auto auto 12px!important;transform:none!important;
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    width:180px!important;max-width:180px!important;max-height:calc(100dvh - 48px)!important;
    overflow-y:auto!important;margin:0!important;padding:10px!important;gap:6px!important;
    border:1px solid #e3ddf1!important;border-radius:16px!important;background:#fff!important;
    z-index:100!important;
  }
  body.pe-colorful-ui:not(:has(.pe-exam-creator-dashboard)) nav:is(.pe-student-bottom-nav,.pe-staff-bottom-nav) :is(a,button){
    box-sizing:border-box!important;
    display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;
    gap:10px!important;width:100%!important;min-height:46px!important;padding:10px!important;
    font-size:12px!important;text-align:left!important;line-height:1.35!important;white-space:normal!important;
  }
  body.pe-colorful-ui:not(:has(.pe-exam-creator-dashboard)) nav:is(.pe-student-bottom-nav,.pe-staff-bottom-nav) svg{width:21px!important;height:21px!important;flex-shrink:0!important}
  body.pe-colorful-ui:not(:has(.pe-exam-creator-dashboard)) nav:is(.pe-student-bottom-nav,.pe-staff-bottom-nav) span{white-space:normal!important}
  body.pe-colorful-ui .pe-home-desktop-nav{display:none!important}
  body.pe-colorful-ui .pe-home-topbar .pe-home-report-link{margin-left:auto!important}
  body.pe-colorful-ui.pe-student-workspace .pe-student-home-mockup>nav.pe-student-bottom-nav{display:flex!important}
}
@media screen and (min-width:1024px) and (max-width:1232px){
  body .pe-dtf-workspace{grid-template-columns:1fr!important}
  body .pe-dtf-sidebar{grid-template-columns:1fr 1fr!important;min-width:0!important}
  body .pe-dtf-toolbar{flex-wrap:wrap!important}
  body .pe-dtf-toolbar-main--right{width:100%!important;justify-content:flex-end!important}
  body .pe-dtf-preview-topbar,body .pe-dtf-bottom-actions{flex-wrap:wrap!important}
}
