/* R36 QA02 · synchronized content context, study presentation and modal polish */
.r36-context-note{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;align-items:center}.r36-context-note small{grid-column:1/-1;color:#6b7f9d}.r36-context-lock{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:5px 10px;border-radius:999px;background:#e9f4ff;color:#245a91;font-size:.72rem;font-weight:850;white-space:nowrap}.r35-content-toolbar select:disabled{background:#f0f4fa;color:#5a6d88;cursor:not-allowed;border-style:dashed}.r35-content-toolbar label:has(select:disabled)::after{content:'Sincronizado';font-size:.66rem;color:#6b7f9d;font-weight:700;margin-top:-2px}

/* Study task theory: replace bare numbered paragraphs with scannable learning cards. */
.r36-theory-cards{display:grid;gap:12px;margin-top:16px}.r36-theory-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:14px;align-items:flex-start;padding:16px 18px;border:1px solid #dce6f3;border-radius:16px;background:linear-gradient(180deg,#fff,#f9fbff);box-shadow:0 8px 22px rgba(22,53,91,.045)}.r36-theory-index{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:var(--course-soft,#edf3ff);color:var(--course-accent,#315cde);font-weight:950;font-size:.82rem}.r36-theory-card small{display:block;margin:0 0 4px;color:var(--course-accent,#315cde);font-weight:900;text-transform:uppercase;letter-spacing:.06em;font-size:.69rem}.r36-theory-card p{margin:0!important;color:#243a59;line-height:1.62;font-size:clamp(.96rem,1.4vw,1.04rem)}.r35-task-theory{background:linear-gradient(145deg,#fff,#f8fbff)}.r35-task-top{padding:18px 20px;border:1px solid #dbe5f2;border-radius:18px;background:#fff}.r35-task-top .r23-unit-summary{max-width:760px;line-height:1.6}.r35-task-start{background:linear-gradient(145deg,var(--course-soft,#eef3ff),#fff)}

/* Access/contact: generous bottom breathing room and one scroll owner. */
.qa09-public #accessModal .qa08-modal-body,.qa09-public #contactModal .qa08-modal-body{padding-bottom:clamp(34px,6vh,64px)!important}.qa09-public #accessModal .qa08-access-foot{margin-top:22px!important;padding:8px 2px max(4px,env(safe-area-inset-bottom))!important;gap:14px!important;align-items:center!important;flex-wrap:wrap!important}.qa09-public #accessModal .qa08-access-foot>a,.qa09-public #accessModal .qa08-access-foot>button{min-height:44px!important}.qa09-public #contactModal .qa08-contact-form{padding-bottom:max(8px,env(safe-area-inset-bottom))!important}.qa09-public #contactModal .qa08-form-msg{margin-bottom:4px!important}.qa09-public .qa08-modal-dialog>.qa08-modal-body{scroll-padding-bottom:48px!important}

/* Recovery request */
.account-recovery-request{display:grid;gap:18px}.account-recovery-request .form{margin-top:4px}.account-recovery-request select{width:100%;min-height:48px;border:1px solid #cfd9e7;border-radius:11px;padding:0 12px;background:#fff;color:#132f59;font:inherit}.account-recovery-request .btn{width:max-content;min-width:190px}

@media(max-width:680px){.r36-context-note{grid-template-columns:1fr}.r36-context-note small{grid-column:auto}.r36-context-lock{justify-self:start;white-space:normal;text-align:left}.r36-theory-card{grid-template-columns:38px minmax(0,1fr);padding:14px;gap:11px}.r36-theory-index{width:36px;height:36px}.qa09-public #accessModal .qa08-access-foot{align-items:stretch!important;flex-direction:column!important}.qa09-public #accessModal .qa08-access-foot>*{width:100%!important;justify-content:center!important}.account-recovery-request .btn{width:100%}}


/* R36 QA02 · deterministic filters + staff task studio visual closeout */
.r36-studio-switch{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px!important}.r36-studio-switch button{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:10px!important;align-items:center!important;text-align:left!important;padding:13px 15px!important;border-radius:16px!important}.r36-studio-switch button>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#eef3ff;color:#315cde;font-size:.72rem;font-weight:950}.r36-studio-switch button>b{font-size:.9rem}.r36-studio-switch button>small{font-size:.72rem;color:#71829c;font-weight:650}.r36-studio-switch button.active>span{background:rgba(255,255,255,.17);color:#fff}.r36-studio-switch button.active>small{color:#dce7ff}.r35-task-admin-card,.r35-question-admin-card{position:relative;overflow:hidden;border-color:#d5e1ef!important;box-shadow:0 10px 28px rgba(20,54,92,.055)}.r35-task-admin-card::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:linear-gradient(180deg,#315ee6,#0b98a8)}.r35-task-admin-card h3{font-size:1.05rem}.r35-task-stats div{background:#f4f8fd!important;border:1px solid #e5edf6}.r35-task-stats span{display:block;color:#687c98;font-size:.7rem;margin-top:2px}.r35-card-actions{border-top:1px solid #edf1f6;margin-top:4px;padding-top:12px!important}.r36-context-note{border:1px solid #dce7f4;background:linear-gradient(135deg,#f7faff,#eef5ff)!important}
.r36-preview-journey{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:0 0 14px}.r36-preview-journey span{display:flex;align-items:center;gap:7px;padding:9px 10px;border-radius:12px;background:#f1f5fa;color:#667a96;font-size:.72rem;font-weight:850}.r36-preview-journey span b{display:grid;place-items:center;width:25px;height:25px;border-radius:8px;background:#fff;color:#315ee6;font-size:.66rem}.r36-preview-journey span.active{background:#e9f1ff;color:#183f80}.r36-preview-task-card{padding:0!important;overflow:hidden}.r36-preview-task-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:clamp(20px,3vw,30px);background:linear-gradient(135deg,#102f62,#1c4f93);color:#fff}.r36-preview-task-hero span{font-size:.74rem;font-weight:850;color:#c8dbf5;text-transform:uppercase;letter-spacing:.05em}.r36-preview-task-hero h2{margin:7px 0 6px;color:#fff;font-size:clamp(1.45rem,2.8vw,2rem)}.r36-preview-task-hero p{margin:0;color:#dce8f7;line-height:1.55}.r36-preview-task-hero>strong{display:grid;place-items:center;min-width:76px;min-height:76px;padding:10px;border-radius:20px;background:rgba(255,255,255,.12);font-size:1.7rem}.r36-preview-task-hero>strong small{display:block;font-size:.62rem;color:#d9e6f7}.r36-preview-section{padding:clamp(18px,3vw,28px);border-bottom:1px solid #e7edf5}.r36-preview-section-title{display:flex;align-items:center;gap:12px;margin-bottom:14px}.r36-preview-section-title>span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#eaf1ff;color:#315ee6;font-weight:950}.r36-preview-section-title b{display:block;font-size:1.05rem;color:#102f5b}.r36-preview-section-title small{display:block;color:#71829b;margin-top:2px}.r36-preview-launch{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:clamp(18px,3vw,28px);background:linear-gradient(135deg,#f1f6ff,#f7fcfb)}.r36-preview-launch span{font-size:.72rem;font-weight:900;color:#315ee6;text-transform:uppercase}.r36-preview-launch h3{margin:5px 0}.r36-preview-launch p{margin:0;color:#61748f}.r36-preview-footer-actions{padding:0 clamp(18px,3vw,28px) clamp(18px,3vw,28px);margin-top:0!important}
/* Access modal: desktop should fit without a scrollbar whenever viewport height allows it. */
@media(min-width:681px) and (min-height:740px){.qa09-public #accessModal .qa08-modal-dialog.compact{width:min(760px,calc(100vw - 40px))!important;max-height:calc(100dvh - 32px)!important}.qa09-public #accessModal .qa08-modal-body{overflow-y:visible!important;padding:28px 40px 22px!important;scrollbar-gutter:auto!important}.qa09-public #accessModal .qa08-modal-lead{margin-bottom:14px!important;max-width:620px}.qa09-public #accessModal .qa08-access-grid{gap:12px!important}.qa09-public #accessModal .qa08-access-card{min-height:0!important;padding:14px 16px!important;gap:5px!important}.qa09-public #accessModal .qa08-access-card span{font-size:.82rem!important;line-height:1.45!important}.qa09-public #accessModal .qa09-access-button{min-height:42px!important;margin-top:8px!important}.qa09-public #accessModal .qa08-access-foot{margin-top:14px!important;padding:2px!important}.qa09-public #accessModal .qa08-modal-close{top:10px!important;right:10px!important}}
@media(max-width:680px){.r36-studio-switch{grid-template-columns:1fr}.r36-preview-journey{grid-template-columns:repeat(2,1fr)}.r36-preview-task-hero{grid-template-columns:1fr}.r36-preview-task-hero>strong{justify-self:start;min-width:68px;min-height:60px}.r36-preview-launch{align-items:stretch;flex-direction:column}.r36-preview-launch .btn{width:100%}}


/* R36 QA04 · Production UX/runtime closeout. Final authority for components touched in R36. */
html.r35-preview-open,body.r35-preview-open{overflow:hidden!important}
.r35-preview-overlay{inset:0!important;width:100vw!important;height:100dvh!important;padding:clamp(10px,2vw,22px)!important;align-items:center!important;justify-content:center!important}
.r35-preview-dialog{width:min(1080px,100%)!important;height:min(900px,calc(100dvh - 2*clamp(10px,2vw,22px)))!important;max-height:calc(100dvh - 2*clamp(10px,2vw,22px))!important;border-radius:24px!important;box-shadow:0 36px 100px rgba(0,0,0,.36)!important;outline:0}
.r35-preview-head{padding:15px 20px!important;background:linear-gradient(135deg,#092954,#123b74)!important}
.r35-preview-head strong{font-size:1rem;letter-spacing:.01em}.r35-preview-head small{font-size:.82rem}
.r35-preview-close{flex:0 0 44px!important;background:rgba(255,255,255,.96)!important;border:0!important;box-shadow:0 8px 22px rgba(0,0,0,.18)!important}
.r35-preview-body{padding:clamp(18px,3vw,32px)!important;background:#f7f9fd!important;scrollbar-gutter:stable both-edges!important;scroll-padding-top:18px!important}
.r36-preview-journey{position:sticky;top:-1px;z-index:4;padding:0 0 12px;background:linear-gradient(#f7f9fd 78%,rgba(247,249,253,0))}
.r36-preview-task-card{border:1px solid #d7e2f0!important;box-shadow:0 18px 50px rgba(18,53,93,.08)!important}
.r36-theory-cards:empty::before{content:'Esta unidad todavía no dispone de bloques de teoría estructurados.';display:block;padding:16px;border:1px dashed #ccd9e9;border-radius:14px;background:#f8fbff;color:#60738f}
.r36-preview-section{background:#fff}.r36-preview-section:nth-of-type(even){background:#fbfdff}
.r36-preview-footer-actions{justify-content:flex-end!important;background:#fff}
.r35-preview-review article{background:#fff}

/* Content Studio: Area/Course are one synchronized context, never visually locked in a second state. */
.r35-content-toolbar select:disabled{background:#fff!important;color:#17365f!important;cursor:default!important;border-style:solid!important}
.r35-content-toolbar label:has(select:disabled)::after{content:none!important}
.r36-context-lock{background:#eaf8f4!important;color:#17684e!important}
.r34-search-prompt{min-height:150px;display:grid;place-content:center;text-align:center;gap:6px}

/* Public Access and Contact dialogs: centered, compact and scrollbar-free on normal desktop heights. */
@media(min-width:681px){
  .qa09-public #accessModal,.qa09-public #contactModal{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;margin:0!important;padding:16px!important;display:none!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
  .qa09-public #accessModal.open,.qa09-public #contactModal.open{display:flex!important}
  .qa09-public #accessModal .qa08-modal-dialog.compact{display:block!important;width:min(880px,calc(100vw - 32px))!important;height:auto!important;max-height:calc(100dvh - 32px)!important;overflow:hidden!important;border-radius:26px!important;position:relative!important}
  .qa09-public #contactModal .qa08-modal-dialog.compact{display:block!important;width:min(760px,calc(100vw - 32px))!important;height:auto!important;max-height:calc(100dvh - 32px)!important;overflow:hidden!important;border-radius:26px!important;position:relative!important}
  .qa09-public #accessModal .qa08-modal-body{overflow:visible!important;max-height:none!important;padding:30px 40px 24px!important;scrollbar-gutter:auto!important}
  .qa09-public #contactModal .qa08-modal-body{overflow:visible!important;max-height:none!important;padding:30px 38px 28px!important;scrollbar-gutter:auto!important}
  .qa09-public #accessModal .qa08-modal-close,.qa09-public #contactModal .qa08-modal-close{top:14px!important;right:14px!important;width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;border-radius:13px!important}
  .qa09-public #accessModal h2,.qa09-public #contactModal h2{margin:10px 56px 8px 0!important;font-size:clamp(1.75rem,3vw,2.25rem)!important;line-height:1.08!important}
  .qa09-public #accessModal .qa08-modal-lead,.qa09-public #contactModal .qa08-modal-lead{margin:0 56px 18px 0!important;line-height:1.55!important}
  .qa09-public #accessModal .qa08-access-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
  .qa09-public #accessModal .qa08-access-card{padding:15px 18px!important;min-height:164px!important;gap:6px!important;border-radius:17px!important}
  .qa09-public #accessModal .qa08-access-card b{font-size:1rem!important}.qa09-public #accessModal .qa08-access-card span{font-size:.82rem!important;line-height:1.45!important}
  .qa09-public #accessModal .qa09-access-button{min-height:40px!important;margin-top:auto!important;font-size:.78rem!important}
  .qa09-public #accessModal .qa08-access-foot{display:flex!important;justify-content:center!important;margin-top:14px!important;padding:0!important;gap:12px!important}
  .qa09-public #accessModal .qa08-access-foot>*{min-height:40px!important;padding:8px 14px!important}
  .qa09-public #contactModal .qa08-contact-form{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px 14px!important;padding:0!important}
  .qa09-public #contactModal .qa08-contact-form>label:nth-of-type(3),.qa09-public #contactModal .qa08-contact-form>label:nth-of-type(4),.qa09-public #contactModal .qa08-contact-form>.qa08-check,.qa09-public #contactModal .qa08-contact-form>.qa08-btn,.qa09-public #contactModal .qa08-contact-form>.qa08-form-msg{grid-column:1/-1!important}
  .qa09-public #contactModal textarea{min-height:112px!important;max-height:160px!important;resize:vertical!important}
  .qa09-public #contactModal .qa08-check{margin:0!important}.qa09-public #contactModal .qa08-btn{justify-self:start!important;min-width:180px!important}
}
@media(min-width:681px) and (max-height:690px){
  .qa09-public #accessModal .qa08-modal-body,.qa09-public #contactModal .qa08-modal-body{max-height:calc(100dvh - 32px)!important;overflow-y:auto!important;scrollbar-gutter:stable!important}
  .qa09-public #accessModal .qa08-access-card{min-height:146px!important;padding:12px 15px!important}
  .qa09-public #accessModal .qa08-modal-body{padding-top:24px!important;padding-bottom:18px!important}
  .qa09-public #contactModal .qa08-modal-body{padding-top:24px!important;padding-bottom:20px!important}
}
@media(max-width:680px){
  .qa09-public #accessModal .qa08-modal-dialog.compact,.qa09-public #contactModal .qa08-modal-dialog.compact{display:grid!important;grid-template-rows:minmax(0,1fr)!important}
  .qa09-public #accessModal .qa08-modal-body,.qa09-public #contactModal .qa08-modal-body{overflow-y:auto!important;padding-bottom:max(28px,env(safe-area-inset-bottom))!important}
  .r35-preview-dialog{border-radius:0!important;height:100dvh!important;max-height:100dvh!important}.r35-preview-overlay{padding:0!important}.r35-preview-body{padding:16px!important}
}

/* R36 QA06 · final production closeout: single content context, professional dialogs, CSP-safe runtime UI. */
.r36-content-toolbar{margin-top:14px!important;grid-template-columns:minmax(280px,1.5fr) repeat(3,minmax(150px,.7fr)) auto!important;align-items:end!important}
.r36-dynamic-filters{display:contents!important}
.r36-content-toolbar .wide{min-width:0!important}
.r36-content-toolbar .btn{min-height:46px!important}
.r36-context-note{margin-bottom:4px!important}

/* Staff task preview: centered workspace, one scroll owner, no sticky layer covering study content. */
.r35-preview-overlay{padding:clamp(14px,2.5vw,28px)!important;background:rgba(8,20,42,.72)!important;backdrop-filter:blur(6px)!important}
.r35-preview-dialog{width:min(980px,calc(100vw - 28px))!important;height:auto!important;max-height:min(88dvh,860px)!important;border-radius:24px!important;background:#fff!important;overflow:hidden!important;border:1px solid rgba(213,225,239,.9)!important;box-shadow:0 34px 90px rgba(0,0,0,.34)!important}
.r35-preview-head{position:relative!important;min-height:72px!important;padding:16px 20px!important;align-items:center!important;background:linear-gradient(135deg,#0d2f61,#173f78)!important}
.r35-preview-head strong{font-size:1.06rem!important}.r35-preview-head small{display:block!important;margin-top:3px!important;line-height:1.35!important;color:#d8e7fa!important}
.r35-preview-close{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;border-radius:13px!important;font-size:1.35rem!important}
.r35-preview-body{min-height:0!important;max-height:calc(min(88dvh,860px) - 72px)!important;overflow-y:auto!important;padding:22px 26px 28px!important;background:#f6f9fd!important;scrollbar-gutter:auto!important;overscroll-behavior:contain!important}
.r36-preview-journey{position:static!important;top:auto!important;z-index:auto!important;margin:0 0 18px!important;padding:0!important;background:transparent!important;box-shadow:none!important}
.r36-preview-task-card{border-radius:20px!important;box-shadow:0 12px 32px rgba(25,57,93,.07)!important}
.r36-preview-task-hero{padding:24px 26px!important}
.r36-preview-section{padding:22px 26px!important}
.r36-theory-card{padding:14px 16px!important}
.r36-preview-launch{padding:22px 26px!important}
.r36-preview-footer-actions{padding:0 26px 24px!important}
.r35-preview-result{text-align:center!important}.r35-preview-result-status.ok{color:#17734c!important}.r35-preview-result-status.bad{color:#a63831!important}

/* Public Contact uses the same compact centered contract as Access. */
@media(min-width:681px){
  .qa09-public #contactModal .qa08-modal-dialog.compact{width:min(860px,calc(100vw - 32px))!important;max-height:calc(100dvh - 28px)!important;border-radius:26px!important}
  .qa09-public #contactModal .qa08-modal-body{padding:26px 34px 24px!important;overflow:visible!important;max-height:none!important}
  .qa09-public #contactModal h2{font-size:clamp(1.72rem,2.5vw,2.05rem)!important;margin-top:8px!important;margin-bottom:6px!important}
  .qa09-public #contactModal .qa08-modal-lead{margin-bottom:14px!important}
  .qa09-public #contactModal .qa08-contact-form{grid-template-columns:1fr 1fr!important;gap:10px 14px!important}
  .qa09-public #contactModal .qa08-contact-form>label:nth-of-type(1),.qa09-public #contactModal .qa08-contact-form>label:nth-of-type(2){grid-column:auto!important}
  .qa09-public #contactModal .qa08-contact-form>label:nth-of-type(3),.qa09-public #contactModal .qa08-contact-form>label:nth-of-type(4),.qa09-public #contactModal .qa08-contact-form>.qa08-check,.qa09-public #contactModal .qa08-contact-form>.qa08-btn,.qa09-public #contactModal .qa08-contact-form>.qa08-form-msg{grid-column:1/-1!important}
  .qa09-public #contactModal input,.qa09-public #contactModal select{min-height:42px!important}
  .qa09-public #contactModal textarea{min-height:94px!important;max-height:122px!important}
  .qa09-public #contactModal .qa08-check{padding:2px 0!important;font-size:.8rem!important;line-height:1.35!important}
  .qa09-public #contactModal .qa08-btn{min-height:42px!important;min-width:180px!important;margin-top:0!important}
}
/* Scroll only for genuinely short desktop viewports, not ordinary 1366x768 browser work areas. */
@media(min-width:681px) and (max-height:570px){
  .qa09-public #contactModal .qa08-modal-body,.qa09-public #accessModal .qa08-modal-body{max-height:calc(100dvh - 28px)!important;overflow-y:auto!important;scrollbar-gutter:stable!important}
}
@media(min-width:681px) and (min-height:571px){
  .qa09-public #contactModal .qa08-modal-body{overflow-y:visible!important;scrollbar-gutter:auto!important}
}
@media(max-width:680px){
  .r36-content-toolbar{grid-template-columns:1fr!important}.r36-dynamic-filters{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .r35-preview-dialog{width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}.r35-preview-body{max-height:calc(100dvh - 72px)!important;padding:16px!important}.r35-preview-overlay{padding:0!important}
}
.coverage-bar progress,.usage-progress{display:block;width:100%;height:10px;border:0;border-radius:999px;overflow:hidden;background:#e7edf5;appearance:none}.coverage-bar progress::-webkit-progress-bar,.usage-progress::-webkit-progress-bar{background:#e7edf5;border-radius:999px}.coverage-bar progress::-webkit-progress-value,.usage-progress::-webkit-progress-value{background:#315ee6;border-radius:999px}.coverage-bar progress::-moz-progress-bar,.usage-progress::-moz-progress-bar{background:#315ee6;border-radius:999px}
