/* Setup only: readable type, full-height desktop cards, real inline directories.
   The paper, models, account screens and Life Ark retain their own layout. */
.qp-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.qp-scope-stack { display:flex; flex-direction:column; gap:12px; min-width:0; }
.qp-scope-choice { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:70px; padding:13px 14px; border:1px solid #dbe7e3; border-radius:12px; color:#17384a; background:#fff; text-align:left; flex-shrink:0; }
.qp-scope-choice:hover { background:#f6fbf8; border-color:#8bbca7; }
.qp-scope-choice[aria-pressed="true"] { border-color:#4b927a; background:#eef8f2; box-shadow:inset 0 0 0 1px #4b927a; color:#245f52; }
.qp-scope-choice > span { min-width:0; }
.qp-scope-choice strong, .qp-scope-choice small { display:block; }
.qp-scope-choice strong { font-size:16px; line-height:1.5; }
.qp-scope-choice small { margin-top:4px; color:#657e73; font-size:12px; line-height:1.6; }
.qp-scope-chevron { flex-shrink:0; color:#4b927a; font-size:22px; font-weight:500; line-height:1; }
.qp-scope-choice[aria-expanded="true"] .qp-scope-chevron { transform:rotate(180deg); }
.qp-catalog-footnote { margin-top:auto!important; padding-top:18px; color:#688375; font-size:12px; line-height:1.8; }
.qp-inline-directory { min-width:0; padding:12px 8px 10px; border:1px solid #c7dfd1; border-radius:12px; background:#f8fcf9; display:flex; flex-direction:column; gap:8px; }
.qp-inline-top { flex-shrink:0; padding:0 4px; }
.qp-inline-top label { display:block; }
.qp .qp-inline-top input { width:100%; min-height:40px; padding:8px 10px; border:1px solid #c6dccf; border-radius:8px; color:#17384a; background:#fff; font-size:14px; }
.qp-inline-top small { display:block; color:#637e70; font-size:11px; margin-top:6px; line-height:1.6; }
.qp-inline-groups { max-height:360px; overflow-y:auto; scrollbar-width:thin; scrollbar-color:#a5c8b6 transparent; overscroll-behavior:contain; min-width:0; }
.qp-inline-groups:focus-visible { outline:2px solid #73b5a3; outline-offset:1px; }
.qp-catalog-tree, .qp-catalog-node > ul { list-style:none; margin:0; padding:0; }
.qp-catalog-node > ul { margin-left:9px; border-left:1px solid #d4e5dc; padding-left:3px; }
.qp-catalog-row { display:flex; align-items:center; gap:3px; min-height:42px; border-radius:7px; padding:5px 3px 5px 0; }
.qp-catalog-row:hover, .qp-catalog-row.is-selected { background:#e7f4ec; }
.qp-catalog-row label { display:flex; flex:1; min-width:0; align-items:center; gap:7px; cursor:pointer; }
.qp .qp-catalog-row input { width:17px; height:17px; flex:0 0 17px; margin:0; }
.qp-catalog-row label span { font-size:14px; line-height:1.6; color:#244c3e; overflow-wrap:anywhere; }
.qp-catalog-node[data-depth="1"] > .qp-catalog-row label span { font-weight:700; }
.qp-catalog-node[data-depth="2"] > .qp-catalog-row label span { font-weight:600; }
.qp-catalog-row small { font-size:10px; line-height:1.5; color:#6b8676; margin-left:3px; text-align:right; flex-shrink:0; }
.qp .qp-catalog-expand { width:23px; flex:0 0 23px; min-height:32px; border:0; background:none; color:#3c7c60; font-size:21px; padding:0; }
.qp-catalog-leaf-mark { width:6px; flex:0 0 6px; }
.qp-inline-footer { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px 8px; padding:8px 4px 0; border-top:1px solid #dce9e0; flex-shrink:0; }
.qp-inline-footer strong { color:#2d7658; font-size:12px; }
.qp-inline-footer > div { display:flex; gap:10px; }
.qp .qp-inline-footer button { padding:3px 0; min-height:28px; border:0; background:none; color:#397557; font-size:12px; }
.qp-inline-empty { padding:26px 10px; color:#677c70; font-size:13px; text-align:center; }
.qp-topline .qp-resume { margin:0; padding:5px 10px; font-size:12px; }

/* A deeper green summary distinguishes the final action from the white settings. */
.qp .qp-plan { background:linear-gradient(155deg,#e2efe7 0%,#cee4d6 100%); border-color:#9fbea9; box-shadow:0 10px 30px #245f5210; }
.qp .qp-plan .qp-eyebrow { color:#425f50; }
.qp .qp-plan dt, .qp .qp-plan .qp-note, .qp .qp-plan-total > span { color:#425f50; }
.qp .qp-plan dl > div { border-top-color:#b9d4c3; }
.qp .qp-plan .qp-prototype-note { color:#425f50; border-top-color:#adcbb9; }
.qp .qp-plan .qp-primary { background:#286f5b; border-color:#286f5b; }
.qp .qp-plan .qp-primary:hover { background:#205b4a; border-color:#205b4a; }

@media (min-width:1000px) {
  .studio-shell[data-portal-current="exams"] { padding-bottom:0; }
  .studio-shell[data-portal-current="exams"] .studio-main { display:flex; flex-direction:column; height:100dvh; min-height:780px; }
  .studio-shell[data-portal-current="exams"] [data-resource-view] { flex:1; min-height:0; display:flex; flex-direction:column; padding:24px 24px 14px; }
  .studio-shell[data-portal-current="exams"] .resource-header { flex-shrink:0; min-height:0; padding:28px 0 16px; margin-bottom:14px; gap:0; }
  .studio-shell[data-portal-current="exams"] .resource-header::before { font-size:11px; }
  .studio-shell[data-portal-current="exams"] .resource-header h1 { font-size:clamp(32px,2.2vw,40px); line-height:1.2; }
  .studio-shell[data-portal-current="exams"] .resource-header p { font-size:16px; line-height:1.5; }
  .studio-shell[data-portal-current="exams"] .resource-hero-copy { gap:8px; }
  .studio-shell[data-portal-current="exams"] .site-record-footer { flex-shrink:0; margin:0; padding:10px 18px 16px; font-size:12px; gap:7px 13px; }
  .studio-shell[data-portal-current="exams"] .qp { flex:1; min-height:0; display:flex; flex-direction:column; }
  .qp .qp-topline { flex-shrink:0; margin-bottom:14px; gap:12px; }
  .qp .qp-path { font-size:13px; gap:12px; }
  .qp .qp-path i { width:24px; }
  .qp .qp-demo { font-size:12px; }
  .qp .qp-resume { flex-shrink:0; padding:4px 10px; margin:0; font-size:12px; }
  .qp .qp-setup-layout { flex:1; min-height:0; grid-template-columns:repeat(3,minmax(0,1fr)) minmax(230px,.76fr); gap:16px; align-items:stretch; }
  .qp .qp-config { display:contents; }
  .qp .qp-panel { display:flex; flex-direction:column; min-height:0; padding:clamp(16px,1.25vw,26px); border-radius:20px; }
  .qp .qp-section-title { flex-shrink:0; gap:10px; margin-bottom:18px; align-items:center; }
  .qp .qp-section-title h2 { font-size:clamp(18px,1.08vw,22px); line-height:1.5; }
  .qp .qp-section-title p { font-size:12px; line-height:1.7; }
  .qp .qp-step { width:30px; height:30px; font-size:12px; margin:0; }
  .qp .qp-scope-stack { flex:1; min-height:0; gap:12px; }
  .qp .qp-scope-choice { min-height:clamp(68px,8vh,96px); padding:12px 14px; }
  .qp .qp-scope-choice strong, .qp .qp-package strong, .qp .qp-difficulty strong { font-size:clamp(16px,.94vw,19px); }
  .qp .qp-inline-directory { flex:1; min-height:0; }
  .qp .qp-inline-groups { flex:1; min-height:0; max-height:none; }
  .qp .qp-package-grid, .qp .qp-difficulty-grid { grid-template-columns:1fr; gap:12px; }
  .qp .qp-package-grid { flex-shrink:0; }
  .qp .qp-package { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:4px 10px; padding:14px; min-height:clamp(66px,8vh,92px); }
  .qp .qp-package span { font-size:12px; margin:0; }
  .qp .qp-counts { flex:1; grid-template-columns:1fr; align-content:space-evenly; gap:14px; margin-top:24px; }
  .qp .qp-counts > label { display:grid; grid-template-columns:65px minmax(0,1fr); gap:4px 8px; align-items:center; }
  .qp .qp-counts > label > span { font-size:14px; }
  .qp .qp-number { margin:0; }
  .qp .qp-number input { font-size:22px; padding:11px 12px; }
  .qp .qp-number > span { font-size:13px; }
  .qp .qp-counts small { grid-column:2; font-size:12px; margin:0; }
  .qp .qp-difficulty-grid { flex:1; grid-template-rows:repeat(3,minmax(100px,1fr)); max-height:650px; }
  .qp .qp-difficulty { display:grid; grid-template-columns:22px minmax(0,1fr); align-content:center; align-items:center; gap:6px 12px; padding:18px 14px; }
  .qp .qp-difficulty .qp-level-bars { grid-row:1 / span 3; margin:0; }
  .qp .qp-difficulty > span:not(.qp-level-bars) { font-size:13px; margin:0; }
  .qp .qp-difficulty small { grid-column:2; margin:0; font-size:12px; line-height:1.8; }
  .qp .qp-note { font-size:12px; }
  .qp .qp-difficulty-panel > .qp-note { flex-shrink:0; }
  .qp .qp-plan { position:static; border-top:3px solid #31816e; }
  .qp .qp-plan h2 { font-size:22px; margin-top:6px; }
  .qp .qp-eyebrow { font-size:11px; }
  .qp .qp-plan-total { margin:22px 0; gap:10px; }
  .qp .qp-plan-total strong { font-size:60px; }
  .qp .qp-plan-total span { font-size:14px; }
  .qp .qp-plan dl > div { padding:14px 0; font-size:14px; grid-template-columns:58px minmax(0,1fr); gap:8px; }
  .qp .qp-plan dd { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; }
  .qp .qp-composition { margin-top:auto; padding:18px 0; font-size:14px; }
  .qp .qp-plan .qp-button { flex-shrink:0; min-height:52px; font-size:16px; padding:12px; }
  .qp .qp-prototype-note { flex-shrink:0; font-size:12px; margin-top:18px; padding-top:16px; }
  .qp .qp-validation { font-size:12px; min-height:0; max-height:110px; overflow-y:auto; overscroll-behavior:contain; }
  .qp .qp-validation:not(:empty) { min-height:40px; margin-bottom:12px; }
}
@media (min-width:1000px) and (max-height:950px) {
  .studio-shell[data-portal-current="exams"] .studio-main { min-height:730px; }
  .studio-shell[data-portal-current="exams"] [data-resource-view] { padding-top:16px; padding-bottom:10px; }
  .studio-shell[data-portal-current="exams"] .resource-header { padding:22px 0 10px; margin-bottom:10px; }
  .studio-shell[data-portal-current="exams"] .resource-header h1 { font-size:30px; }
  .studio-shell[data-portal-current="exams"] .resource-header p { font-size:14px; }
  .qp .qp-panel { padding:15px; }
  .qp .qp-section-title { margin-bottom:12px; gap:7px; }
  .qp .qp-section-title h2 { font-size:17px; }
  .qp .qp-section-title p { display:none; }
  .qp .qp-step { width:27px; height:27px; }
  .qp .qp-scope-stack, .qp .qp-package-grid, .qp .qp-difficulty-grid { gap:9px; }
  .qp .qp-scope-choice { min-height:60px; padding:9px 11px; }
  .qp .qp-scope-choice small { margin-top:2px; }
  .qp .qp-package { min-height:58px; padding:10px; }
  .qp .qp-counts { margin-top:16px; gap:10px; }
  .qp .qp-number input { padding:8px 10px; font-size:20px; }
  .qp .qp-difficulty { padding:12px 10px; gap:4px 8px; }
  .qp .qp-plan h2 { font-size:20px; line-height:1.5; }
  .qp .qp-plan-total { margin:12px 0; }
  .qp .qp-plan-total strong { font-size:48px; }
  .qp .qp-plan dl > div { padding:8px 0; font-size:13px; }
  .qp .qp-composition { padding:10px 0; font-size:13px; }
  .qp .qp-plan .qp-button { min-height:46px; font-size:15px; }
  .qp .qp-plan > .qp-note { display:none; }
  .qp .qp-prototype-note { margin-top:12px; padding-top:10px; font-size:11px; }
  .qp .qp-catalog-footnote { padding-top:10px; font-size:11px; }
  .qp .qp-scope-panel:has(.qp-inline-directory:not([hidden])) .qp-catalog-footnote { display:none; }
}
@media (min-width:1000px) and (max-height:740px) {
  /* Very short windows can scroll naturally; never shrink reading text to fit. */
  .studio-shell[data-portal-current="exams"] .studio-main { min-height:780px; }
}
@media (min-width:1000px) and (max-width:1199px) {
  .studio-shell[data-portal-current="exams"] .studio-main { height:auto; min-height:100dvh; }
  .qp .qp-setup-layout { min-height:720px; grid-template-columns:repeat(3,minmax(0,1fr)) 205px; gap:10px; }
  .qp .qp-panel { padding:12px; }
  .qp .qp-section-title h2 { font-size:17px; }
  .qp .qp-section-title p { display:none; }
  .qp .qp-step { display:none; }
  .qp .qp-scope-choice { padding:10px; }
  .qp .qp-scope-choice strong, .qp .qp-package strong, .qp .qp-difficulty strong { font-size:15px; }
  .qp .qp-inline-directory { max-height:460px; }
  .qp .qp-inline-groups { max-height:280px; }
  .qp .qp-counts > label { grid-template-columns:1fr; }
  .qp .qp-counts small { grid-column:1; }
  .qp .qp-difficulty { grid-template-columns:1fr; }
  .qp .qp-difficulty .qp-level-bars { display:none; }
  .qp .qp-difficulty small { grid-column:1; }
}
@media (max-width:999px) {
  .qp .qp-inline-top input { font-size:16px; }
  .qp-inline-groups { max-height:360px; }
  .qp-catalog-footnote { margin-top:14px!important; padding-top:0; }
  .qp-inline-footer strong, .qp .qp-inline-footer button { font-size:13px; }
}
