.psych-tests-page,.psych-history-root{--psych-danger:#b42318;--psych-warning:#9a5b00;--psych-ok:#16794b;--psych-blue:#3157c8;--psych-card:var(--surface);--psych-card-border:color-mix(in srgb,var(--border) 84%,var(--accent) 16%)}
.psych-tests-page .card::before,.psych-tests-page .card::after,.psych-tests-page .psych-test-card::before,.psych-tests-page .psych-test-card::after{content:none!important;display:none!important;opacity:0!important}
.psych-tests-page .card,.psych-tests-page .psych-test-card{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
.psych-main{padding-top:7rem}.psych-shell{display:grid;gap:1.2rem}.psych-hero{display:flex;justify-content:space-between;align-items:center;gap:1rem;background:linear-gradient(135deg,color-mix(in srgb,var(--surface) 94%,var(--accent) 6%),var(--surface));overflow:hidden}.psych-hero h1{margin:.2rem 0 .5rem}.psych-hero p{max-width:760px;margin:0;color:var(--muted)}.psych-hero-actions{flex:none}
.psych-safety-note{padding:1rem 1.1rem;border:1px solid color-mix(in srgb,var(--warning) 45%,var(--border));background:color-mix(in srgb,var(--warning) 8%,var(--surface));border-radius:var(--radius);color:var(--text)}
.psych-profile-form .grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}.psych-profile-form .field.full{grid-column:span 2}.psych-profile-form label span{display:block;font-weight:700;margin-bottom:.38rem}.psych-profile-form select,.psych-profile-form input,.psych-select{width:100%;min-height:48px;border:1px solid var(--border);border-radius:14px;padding:.7rem .85rem;background:var(--surface);color:var(--text)}.psych-profile-form select:focus,.psych-profile-form input:focus{outline:3px solid color-mix(in srgb,var(--accent) 18%,transparent);border-color:var(--accent)}.psych-consent{display:flex;align-items:flex-start;gap:.6rem;margin:1rem 0}.psych-consent input{margin-top:.38rem}
.psych-filters{display:flex;flex-wrap:wrap;gap:.55rem;margin:1rem 0}.psych-filter{border:1px solid var(--border);background:var(--surface);color:var(--text);padding:.55rem .9rem;border-radius:999px;font-weight:700;cursor:pointer}.psych-filter.active{background:var(--accent);border-color:var(--accent);color:#fff}.psych-test-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.psych-test-card{position:relative;display:flex;flex-direction:column;border:1px solid var(--psych-card-border);border-radius:20px;padding:1.1rem;background:var(--psych-card);min-height:286px;box-shadow:0 8px 24px rgba(30,42,70,.07);transition:border-color .18s ease,box-shadow .18s ease}.psych-test-card:hover{border-color:color-mix(in srgb,var(--accent) 42%,var(--border));box-shadow:0 12px 30px rgba(30,42,70,.11);transform:none}.psych-test-card.is-disabled{opacity:.62;box-shadow:none}.psych-card-monogram,.psych-card-image{width:68px;height:68px;border-radius:17px;margin-bottom:.8rem}.psych-card-image{object-fit:cover;border:1px solid var(--border)}.psych-card-monogram{display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 12%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 28%,var(--border));color:var(--accent);font:800 .9rem/1 Inter,sans-serif;letter-spacing:.03em;direction:ltr}.psych-test-card h3{font-size:1.08rem;margin:.75rem 0 .35rem;line-height:1.65}.psych-test-card p{color:var(--muted);margin:0 0 1rem}.psych-card-meta{display:flex;gap:.45rem;flex-wrap:wrap}.psych-pill{display:inline-flex;padding:.3rem .58rem;border-radius:999px;background:color-mix(in srgb,var(--accent) 10%,var(--surface));font-size:.8rem}.psych-test-card .btn{margin-top:auto}.psych-source{display:none}
.psych-runner-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.psych-progress-wrap{position:sticky;top:5.6rem;z-index:5;background:var(--surface);border:1px solid var(--border);padding:.7rem;border-radius:15px;margin:1rem 0;box-shadow:0 8px 22px rgba(0,0,0,.06)}.psych-progress-label{display:flex;justify-content:space-between;color:var(--muted);font-size:.86rem}.psych-progress{position:relative;isolation:isolate;height:9px;background:color-mix(in srgb,var(--text) 11%,var(--surface));border:1px solid color-mix(in srgb,var(--text) 10%,var(--border));border-radius:999px;overflow:hidden;margin-top:.45rem}.psych-progress-fill{position:absolute;inset-block:0;inset-inline-start:0;display:block;width:0;min-width:0;max-width:100%;background:linear-gradient(90deg,var(--accent),var(--accent-strong));border-radius:inherit;transition:width .22s ease}.psych-progress:not(.is-complete) .psych-progress-fill{border-end-end-radius:3px;border-start-end-radius:3px}.psych-progress.is-complete .psych-progress-fill{border-radius:inherit}
.psych-question{border:1px solid var(--border);border-radius:17px;padding:1rem;margin:.8rem 0;background:color-mix(in srgb,var(--surface) 97%,var(--accent) 3%)}.psych-question.is-missing{border-color:var(--psych-danger);box-shadow:0 0 0 3px color-mix(in srgb,var(--psych-danger) 12%,transparent)}.psych-question-title{font-weight:800;margin-bottom:.7rem}.psych-original{direction:ltr;text-align:left;color:var(--muted);font-size:.82rem;margin-top:.25rem}.psych-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.55rem}.psych-option{position:relative}.psych-option input{position:absolute;opacity:0}.psych-option label{display:flex;justify-content:center;align-items:center;text-align:center;min-height:50px;border:1px solid var(--border);border-radius:13px;padding:.55rem;background:var(--surface);cursor:pointer}.psych-option input:focus-visible+label{outline:3px solid color-mix(in srgb,var(--accent) 25%,transparent)}.psych-option input:checked+label{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,var(--surface));font-weight:800}.psych-runner-actions{display:flex;justify-content:space-between;gap:.7rem;position:sticky;bottom:.5rem;background:var(--surface);padding:.7rem;border:1px solid var(--border);border-radius:15px;z-index:5;box-shadow:0 8px 22px rgba(0,0,0,.08)}
.psych-result-top{text-align:center;padding:1.2rem;border-radius:18px;background:color-mix(in srgb,var(--accent) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--accent) 30%,var(--border))}.psych-result-top h2{margin:.25rem}.psych-result-code{font:900 clamp(2rem,7vw,3.5rem)/1 Inter,sans-serif;letter-spacing:.12em;color:var(--accent);direction:ltr}.psych-alert-danger{margin:1rem 0;padding:1rem;border:2px solid color-mix(in srgb,var(--psych-danger) 55%,var(--border));border-radius:16px;background:color-mix(in srgb,var(--psych-danger) 8%,var(--surface))}.psych-bars{display:grid;gap:.75rem;margin:1rem 0}.psych-bar-row{display:grid;grid-template-columns:minmax(130px,220px) 1fr 70px;gap:.7rem;align-items:center}.psych-bar-track{height:13px;border-radius:999px;background:color-mix(in srgb,var(--text) 10%,transparent);overflow:hidden}.psych-bar-fill{height:100%;background:var(--accent);border-radius:inherit}.psych-score-value{text-align:end;font-variant-numeric:tabular-nums}.psych-dimension-row{border:1px solid var(--border);border-radius:14px;padding:.75rem;background:var(--surface)}.psych-dimension-head{display:flex;justify-content:space-between;gap:.6rem;direction:ltr}.psych-dimension-head span{color:var(--muted);font-size:.86rem}.psych-split-bar{display:flex;overflow:hidden;height:14px;margin-top:.55rem;border-radius:999px;background:var(--border)}.psych-split-bar span{display:block;background:var(--accent)}.psych-split-bar i{display:block;background:color-mix(in srgb,var(--accent) 42%,var(--surface));font-style:normal}
.psych-interpretation-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin:1rem 0}.psych-interpretation-card{border:1px solid var(--border);border-radius:15px;padding:.95rem;background:var(--surface)}.psych-interpretation-card h4{margin:0 0 .35rem}.psych-interpretation-card p{margin:0;color:var(--muted)}.psych-interpretation-wide{grid-column:1/-1}.psych-interpretation-card ul{margin:.45rem 0 0;padding-inline-start:1.25rem;color:var(--muted)}.psych-warning-card{border-color:color-mix(in srgb,var(--psych-warning) 55%,var(--border));background:color-mix(in srgb,var(--psych-warning) 7%,var(--surface))}.psych-mbti-dimension-list{display:grid;gap:.65rem}.psych-mbti-dimension-list>div{border-block-end:1px solid var(--border);padding-block:.55rem}.psych-mbti-dimension-list>div:last-child{border-block-end:0}.psych-mbti-dimension-list strong,.psych-mbti-dimension-list span{display:block;direction:ltr;text-align:start}.psych-mbti-dimension-list span{color:var(--muted);font-size:.86rem}.psych-mbti-dimension-list p{margin-top:.35rem}.psych-work-pills{display:flex;gap:.45rem;flex-wrap:wrap}.psych-mbti-disclaimer{border:1px solid color-mix(in srgb,var(--warning) 45%,var(--border));background:color-mix(in srgb,var(--warning) 8%,var(--surface));border-radius:15px;padding:.95rem}.psych-mbti-disclaimer p{margin:.3rem 0 0;color:var(--muted)}
.psych-related{margin-top:1.3rem}.psych-related-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}.psych-related-card{display:flex;gap:.7rem;align-items:center;border:1px solid var(--border);border-radius:15px;padding:.7rem;background:var(--surface);color:var(--text);text-decoration:none}.psych-related-card:hover{border-color:var(--accent)}.psych-related-card img{width:72px;height:58px;object-fit:cover;border-radius:10px}.psych-related-card span{display:grid;gap:.25rem}.psych-related-card small{color:var(--muted)}
.psych-ai-box{border:1px solid color-mix(in srgb,var(--accent) 35%,var(--border));border-radius:17px;padding:1rem;margin-top:1rem}.psych-ai-output{white-space:pre-wrap}.psych-result-actions{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:1rem}
.psych-history-toolbar{display:grid;grid-template-columns:2fr 1fr 1fr;gap:.8rem;margin:1rem 0}.psych-history-list{display:grid;gap:.75rem}.psych-history-item{border:1px solid var(--border);border-radius:16px;padding:.9rem}.psych-history-item-head{display:flex;justify-content:space-between;gap:.8rem}.psych-history-metrics{display:flex;gap:.45rem;flex-wrap:wrap;margin-top:.65rem}.psych-delta.up{color:var(--psych-danger)}.psych-delta.down{color:var(--psych-ok)}.psych-chart-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:16px;padding:.8rem;background:var(--surface)}.psych-line-chart{min-width:620px;width:100%;height:auto}.psych-chart-legend{display:flex;gap:.6rem;flex-wrap:wrap;color:var(--muted);font-size:.86rem;margin-top:.5rem}.psych-empty{text-align:center;color:var(--muted);padding:2rem;border:1px dashed var(--border);border-radius:16px}.is-hidden{display:none!important}
.psych-tests-page[data-theme="dark"]{--psych-card:color-mix(in srgb,var(--surface) 96%,#000 4%);--psych-card-border:color-mix(in srgb,var(--accent) 30%,var(--border))}.psych-tests-page[data-theme="dark"] .psych-test-card{background:var(--psych-card);border-color:var(--psych-card-border);box-shadow:0 10px 28px rgba(0,0,0,.22)}.psych-tests-page[data-theme="dark"] .psych-question,.psych-tests-page[data-theme="dark"] .psych-interpretation-card,.psych-tests-page[data-theme="dark"] .psych-related-card{background:color-mix(in srgb,var(--surface) 97%,#000 3%)}
@media(max-width:960px){.psych-profile-form .grid{grid-template-columns:repeat(2,minmax(0,1fr))}.psych-test-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.psych-history-toolbar{grid-template-columns:1fr 1fr}.psych-history-toolbar>*:first-child{grid-column:1/-1}.psych-related-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.psych-main{padding-top:5.8rem}.psych-hero{align-items:flex-start;flex-direction:column}.psych-test-grid,.psych-profile-form .grid,.psych-interpretation-grid,.psych-related-grid{grid-template-columns:1fr}.psych-profile-form .field.full{grid-column:auto}.psych-bar-row{grid-template-columns:95px 1fr 55px;font-size:.82rem}.psych-options{grid-template-columns:1fr}.psych-history-toolbar{grid-template-columns:1fr}.psych-history-toolbar>*:first-child{grid-column:auto}.psych-runner-head{display:block}.psych-test-card{min-height:0}}
@media(prefers-reduced-motion:reduce){.psych-tests-page *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.site-header,.site-contact-box,.psych-profile-card,#psych-catalog-panel,.psych-result-actions,.psych-ai-box{display:none!important}.psych-main{padding:0}.psych-result-panel{box-shadow:none;border:0}.psych-related-card{break-inside:avoid}}

/* ========================================================================== 
   Compact professional layout v3 — isolated to assessment pages
   ========================================================================== */
.psych-tests-page {
  --psych-page-max: 1180px;
  --psych-radius: 18px;
  font-size: .94rem;
}

.psych-tests-page .psych-main {
  padding: calc(var(--header-h) + 22px) 0 46px;
}

.psych-tests-page .psych-shell {
  width: min(var(--psych-page-max), calc(100% - 32px));
  gap: .85rem;
}

.psych-tests-page .card {
  padding: 17px;
  border-radius: var(--psych-radius);
  box-shadow: 0 10px 30px rgba(69, 55, 128, .07);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.psych-tests-page .card:hover {
  transform: none;
  box-shadow: 0 12px 32px rgba(69, 55, 128, .09);
}

.psych-tests-page .section-kicker {
  padding: 5px 10px;
  gap: 7px;
  font-size: .76rem;
  box-shadow: none;
  backdrop-filter: none;
}

.psych-tests-page .section-kicker::before {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.psych-tests-page .psych-hero {
  min-height: 0;
  padding: clamp(18px, 2.5vw, 25px);
  border-radius: 22px;
}

.psych-tests-page .psych-hero h1 {
  margin: 7px 0 4px;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  line-height: 1.45;
  font-weight: 850;
  letter-spacing: -.015em;
}

.psych-tests-page .psych-hero p {
  max-width: 720px;
  font-size: clamp(.9rem, 1.25vw, 1rem);
  line-height: 1.85;
}

.psych-tests-page .psych-hero .btn {
  min-height: 40px;
  padding: 8px 14px;
  font-size: .84rem;
}

.psych-tests-page .psych-safety-note {
  padding: .75rem .9rem;
  border-radius: 14px;
  font-size: .84rem;
  line-height: 1.8;
}

.psych-tests-page .section-head {
  max-width: none;
  margin-bottom: 13px;
}

.psych-tests-page .section-head h2,
.psych-tests-page #psych-runner h2,
.psych-tests-page #psych-result h2 {
  margin: 0 0 3px;
  font-size: clamp(1.12rem, 1.8vw, 1.38rem);
  line-height: 1.55;
  font-weight: 820;
}

.psych-tests-page h3 {
  font-size: clamp(.98rem, 1.35vw, 1.1rem);
  line-height: 1.65;
  font-weight: 800;
}

.psych-tests-page h4 {
  font-size: .94rem;
  line-height: 1.65;
}

.psych-tests-page .hint {
  font-size: .81rem;
  line-height: 1.7;
}

.psych-tests-page .psych-profile-form .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .72rem;
}

.psych-tests-page .psych-profile-form .field.full {
  grid-column: span 1;
}

.psych-tests-page .psych-profile-form label span {
  margin-bottom: .25rem;
  font-size: .8rem;
  font-weight: 700;
}

.psych-tests-page .psych-profile-form select,
.psych-tests-page .psych-profile-form input,
.psych-tests-page .psych-select {
  min-height: 42px;
  padding: .5rem .7rem;
  border-radius: 11px;
  font-size: .86rem;
}

.psych-tests-page .psych-consent {
  gap: .5rem;
  margin: .72rem 0;
  font-size: .82rem;
}

.psych-tests-page .psych-consent input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin-top: .22rem;
  padding: 0;
  accent-color: var(--accent-strong);
}

.psych-tests-page .psych-profile-form > .btn {
  min-height: 40px;
  padding: 8px 15px;
  font-size: .84rem;
}

.psych-tests-page .psych-filters {
  gap: .4rem;
  margin: .65rem 0 .85rem;
}

.psych-tests-page .psych-filter {
  min-height: 34px;
  padding: .35rem .7rem;
  font-size: .78rem;
  font-weight: 700;
}

.psych-tests-page .psych-test-grid {
  gap: .75rem;
}

.psych-tests-page .psych-test-card {
  min-height: 224px;
  padding: .85rem;
  border-radius: 15px;
  box-shadow: 0 6px 18px rgba(30, 42, 70, .055);
}

.psych-tests-page .psych-test-card:hover {
  box-shadow: 0 9px 22px rgba(30, 42, 70, .085);
}

.psych-tests-page .psych-card-monogram,
.psych-tests-page .psych-card-image {
  width: 52px;
  height: 52px;
  margin-bottom: .48rem;
  border-radius: 13px;
}

.psych-tests-page .psych-card-monogram {
  font-size: .76rem;
}

.psych-tests-page .psych-test-card h3 {
  margin: .35rem 0 .22rem;
  font-size: .96rem;
  line-height: 1.65;
}

.psych-tests-page .psych-test-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 .65rem;
  font-size: .8rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.psych-tests-page .psych-card-meta {
  gap: .3rem;
}

.psych-tests-page .psych-pill {
  padding: .2rem .45rem;
  font-size: .7rem;
}

.psych-tests-page .psych-test-card .btn {
  min-height: 36px;
  padding: 6px 11px;
  font-size: .78rem;
}

.psych-tests-page .psych-runner-head {
  gap: .7rem;
}

.psych-tests-page .psych-progress-wrap {
  top: calc(var(--header-h) + 8px);
  margin: .7rem 0;
  padding: .55rem .65rem;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .05);
}

.psych-tests-page .psych-progress-label {
  font-size: .76rem;
}

.psych-tests-page .psych-progress {
  height: 7px;
  margin-top: .35rem;
}

.psych-tests-page .psych-question {
  margin: .55rem 0;
  padding: .78rem;
  border-radius: 13px;
}

.psych-tests-page .psych-question-title {
  margin-bottom: .5rem;
  font-size: .9rem;
  line-height: 1.78;
}

.psych-tests-page .psych-original {
  font-size: .75rem;
}

.psych-tests-page .psych-options {
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: .4rem;
}

.psych-tests-page .psych-option label {
  min-height: 42px;
  padding: .42rem .5rem;
  border-radius: 10px;
  font-size: .82rem;
  line-height: 1.55;
}

.psych-tests-page .psych-runner-actions {
  bottom: .35rem;
  gap: .5rem;
  padding: .52rem;
  border-radius: 12px;
}

.psych-tests-page .psych-runner-actions .btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: .8rem;
}

.psych-tests-page .psych-result-top {
  padding: .9rem;
  border-radius: 14px;
}

.psych-tests-page .psych-result-code {
  font-size: clamp(1.7rem, 5vw, 2.7rem);
}

.psych-tests-page .psych-alert-danger,
.psych-tests-page .psych-ai-box,
.psych-tests-page .psych-mbti-disclaimer {
  padding: .78rem;
  border-radius: 13px;
}

.psych-tests-page .psych-bars,
.psych-tests-page .psych-interpretation-grid {
  gap: .58rem;
  margin: .72rem 0;
}

.psych-tests-page .psych-interpretation-card {
  padding: .72rem;
  border-radius: 12px;
}

.psych-tests-page .psych-interpretation-card p,
.psych-tests-page .psych-interpretation-card li,
.psych-tests-page .psych-mbti-disclaimer p {
  font-size: .81rem;
  line-height: 1.72;
}

.psych-tests-page .psych-dimension-row {
  padding: .6rem;
  border-radius: 11px;
}

.psych-tests-page .psych-related {
  margin-top: .85rem;
}

.psych-tests-page .psych-related-grid {
  gap: .55rem;
}

.psych-tests-page .psych-related-card {
  gap: .55rem;
  padding: .55rem;
  border-radius: 12px;
  font-size: .82rem;
}

.psych-tests-page .psych-related-card img {
  width: 58px;
  height: 48px;
  border-radius: 8px;
}

.psych-tests-page .psych-related-card small {
  font-size: .72rem;
}

.psych-tests-page .psych-result-actions {
  gap: .45rem;
  margin-top: .7rem;
}

.psych-tests-page .psych-result-actions .btn {
  min-height: 38px;
  padding: 7px 12px;
  font-size: .8rem;
}

.psych-tests-page #site-contact-box {
  margin-top: 0;
}

@media (max-width: 900px) {
  .psych-tests-page .psych-profile-form .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .psych-tests-page .psych-test-grid,
  .psych-tests-page .psych-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .psych-tests-page {
    font-size: .91rem;
  }

  .psych-tests-page .psych-main {
    padding-top: calc(var(--header-h) + 14px);
    padding-bottom: 30px;
  }

  .psych-tests-page .psych-shell {
    width: min(100% - 20px, var(--psych-page-max));
    gap: .65rem;
  }

  .psych-tests-page .card {
    padding: 13px;
    border-radius: 14px;
  }

  .psych-tests-page .psych-hero {
    display: grid;
    padding: 15px;
    border-radius: 17px;
  }

  .psych-tests-page .psych-hero h1 {
    font-size: 1.4rem;
  }

  .psych-tests-page .psych-hero p {
    font-size: .86rem;
  }

  .psych-tests-page .psych-hero-actions,
  .psych-tests-page .psych-hero-actions .btn {
    width: 100%;
  }

  .psych-tests-page .psych-profile-form .grid,
  .psych-tests-page .psych-test-grid,
  .psych-tests-page .psych-related-grid,
  .psych-tests-page .psych-interpretation-grid {
    grid-template-columns: 1fr;
  }

  .psych-tests-page .psych-test-card {
    min-height: 0;
  }

  .psych-tests-page .psych-question {
    padding: .68rem;
  }

  .psych-tests-page .psych-options {
    grid-template-columns: 1fr;
  }

  .psych-tests-page .psych-bar-row {
    grid-template-columns: 1fr;
    gap: .3rem;
  }

  .psych-tests-page .psych-runner-actions {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}


/* Progress bar reliability fix v4 */
.psych-tests-page .psych-progress {
  background: color-mix(in srgb, var(--text) 11%, var(--surface));
}

.psych-tests-page .psych-progress-fill {
  flex: none !important;
  inline-size: auto;
  min-inline-size: 0;
  max-inline-size: 100%;
}

.psych-tests-page[data-theme="dark"] .psych-progress,
html[data-theme="dark"] .psych-tests-page .psych-progress {
  background: color-mix(in srgb, var(--text) 15%, var(--surface-solid, var(--surface)));
  border-color: color-mix(in srgb, var(--text) 16%, var(--border));
}

@media (prefers-reduced-motion: reduce) {
  .psych-tests-page .psych-progress-fill {
    transition: none;
  }
}


/* Final progress and result-chart reliability fix v5 */
.psych-tests-page .psych-bar-track {
  position: relative;
  isolation: isolate;
  display: block;
  height: 13px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 10%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 9%, var(--surface-solid, var(--surface)));
}

.psych-tests-page .psych-bar-fill {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  display: block;
  width: var(--psych-score-width, 0%);
  inline-size: var(--psych-score-width, 0%);
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  flex: none !important;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.psych-tests-page .psych-split-bar {
  display: grid;
  grid-template-columns: var(--psych-a-width, 50%) var(--psych-b-width, 50%);
  align-items: stretch;
  height: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 10%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 9%, var(--surface-solid, var(--surface)));
}

.psych-tests-page .psych-split-bar > .psych-split-a,
.psych-tests-page .psych-split-bar > .psych-split-b {
  display: block;
  width: auto !important;
  inline-size: auto !important;
  min-width: 0;
  min-inline-size: 0;
  height: 100%;
  flex: none !important;
}

.psych-tests-page .psych-split-bar > .psych-split-a {
  background: var(--accent);
}

.psych-tests-page .psych-split-bar > .psych-split-b {
  background: color-mix(in srgb, var(--accent) 38%, var(--surface-solid, var(--surface)));
  font-style: normal;
}

.psych-tests-page[data-theme="dark"] .psych-bar-track,
html[data-theme="dark"] .psych-tests-page .psych-bar-track,
.psych-tests-page[data-theme="dark"] .psych-split-bar,
html[data-theme="dark"] .psych-tests-page .psych-split-bar {
  background: color-mix(in srgb, var(--text) 14%, var(--surface-solid, var(--surface)));
  border-color: color-mix(in srgb, var(--text) 16%, var(--border));
}

@media (prefers-reduced-motion: reduce) {
  .psych-tests-page .psych-bar-fill,
  .psych-tests-page .psych-progress-fill {
    transition: none;
  }
}


/* Authoritative width variables for progress and score visuals */
.psych-tests-page .psych-progress-fill {
  width: var(--psych-progress-width, 0%) !important;
  inline-size: var(--psych-progress-width, 0%) !important;
  min-width: 0;
  min-inline-size: 0;
  max-width: 100%;
  max-inline-size: 100%;
  flex: none !important;
}


/* CSP-safe result bar synchronization v6
   Dynamic widths are applied with CSSOM after insertion; no inline style attributes are required. */

/* Explicit direction and color fallbacks for synchronized result bars */
.psych-tests-page .psych-bar-fill {
  z-index: 1;
  opacity: 1;
  background: linear-gradient(90deg, var(--accent, #7ba79c), var(--accent-strong, #14595a));
}
html[dir="rtl"] .psych-tests-page .psych-bar-fill {
  inset-inline-start: auto;
  right: 0;
  left: auto;
}
html[dir="ltr"] .psych-tests-page .psych-bar-fill {
  inset-inline-start: auto;
  left: 0;
  right: auto;
}
.psych-tests-page .psych-split-bar > .psych-split-a {
  background: var(--accent, #7ba79c);
}
.psych-tests-page .psych-split-bar > .psych-split-b {
  background: color-mix(in srgb, var(--accent, #7ba79c) 38%, var(--surface-solid, var(--surface, #fff)));
}
