/* AcademyCrew R68 · shared visual cohesion layer. Loaded last; no business logic. */
:root{
  --ac68-ink:#142b4d;
  --ac68-muted:#61718a;
  --ac68-line:#d9e4f0;
  --ac68-soft:#f6f9fd;
  --ac68-primary:#2456cf;
  --ac68-primary-hover:#1c46ad;
  --ac68-radius-sm:10px;
  --ac68-radius-md:14px;
  --ac68-radius-lg:20px;
  --ac68-shadow:0 14px 38px rgba(18,43,79,.09);
  --ac68-shadow-modal:0 28px 90px rgba(8,28,58,.28);
}
html{scrollbar-gutter:stable}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
:where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid rgba(36,86,207,.28);outline-offset:2px}

/* Buttons: consistent geometry without flattening course-specific colours. */
:where(.btn,.r23-btn,.qa08-btn,.r45-btn,.ac-btn){border-radius:var(--ac68-radius-sm)!important;min-height:40px;transition:background-color .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
:where(.btn,.r23-btn,.qa08-btn,.r45-btn,.ac-btn):active:not(:disabled){transform:translateY(1px)}
:where(.btn,.r23-btn,.qa08-btn,.r45-btn,.ac-btn):disabled{cursor:not-allowed;opacity:.5}

/* Form controls: same rhythm across public, learner and staff surfaces. */
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){border-radius:12px!important}
:where(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{box-shadow:0 0 0 3px rgba(36,86,207,.1)}

/* Standard content surfaces. Large/full-screen specialist workspaces keep their own rules. */
:where(.card,.subtle-card,.notice,.empty,.r23-step,.r23-note,.r23-toc,.ac-quick-card,.ac-course-card){border-radius:var(--ac68-radius-lg)}
:where(.card,.r23-step,.r23-toc,.ac-quick-card){box-shadow:0 10px 30px rgba(18,43,79,.055)}

/* Canonical feedback modal: calmer proportions, readable copy and actions on the right. */
.app-feedback-modal{padding:18px!important}
.app-feedback-backdrop{background:rgba(8,24,48,.58)!important;backdrop-filter:blur(7px)!important}
.app-feedback-panel{
  border:1px solid #d6e1ee!important;border-radius:22px!important;box-shadow:var(--ac68-shadow-modal)!important;gap:16px!important;grid-template-columns:52px minmax(0,1fr)!important;padding:24px!important;width:min(620px,calc(100vw - 36px))!important
}
.app-feedback-panel:after{display:none!important}
.app-feedback-icon{border-radius:14px!important;font-size:24px!important;height:48px!important;width:48px!important}
.app-feedback-close{border-radius:10px!important;height:36px!important;right:16px!important;top:16px!important;width:36px!important}
.app-feedback-copy h2{font-size:clamp(1.35rem,3vw,1.85rem)!important;letter-spacing:-.025em!important;line-height:1.15!important;margin:.25rem 44px .55rem 0!important}
.app-feedback-body{color:#536780!important;font-size:.96rem!important;line-height:1.58!important;max-height:calc(100dvh - 210px)!important;padding-right:3px!important}
.app-feedback-actions{align-items:center!important;background:#fff!important;border-top:1px solid #e4ebf3!important;gap:8px!important;justify-content:flex-end!important;margin-top:4px!important;padding-top:14px!important}
.app-feedback-actions .btn{min-width:112px!important}

/* Other modal families: same radius/action alignment, without changing their content structure. */
:where(.r45-modal-panel,.ac-security-dialog,.student-detail-modal,.modal-card,.dialog-card){border-radius:22px!important;box-shadow:var(--ac68-shadow-modal)!important}
:where(.modal-actions,.r45-actions,.dialog-actions,.ac-dialog-actions){align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}

/* Study runners: keep secondary/exit controls anchored to the right instead of floating centrally. */
.runner-top,.r35-runner-head{align-items:flex-start!important;display:flex!important;gap:14px!important}
.runner-top>div:first-child,.r35-runner-head>div:first-child{min-width:0;flex:1 1 auto}
.runner-top [data-runner-exit],.r35-runner-head>[data-task-cancel]{flex:0 0 auto;margin-left:auto!important}
.runner-actions,.r35-question-nav{gap:10px!important}

/* Tables/workspaces: reduce the boxed-in look while preserving density. */
:where(.table-wrap,.data-table-wrap,.admin-table-wrap){border-radius:16px;overflow:auto}
:where(table){border-collapse:separate;border-spacing:0}
:where(th){font-size:.78rem;letter-spacing:.01em}

/* Public/course cards: softer hierarchy, not a redesign of content or commerce. */
.qa09-public .qa08-course-card,.r23-landing-grid img{border-radius:18px!important}
.qa09-public .qa08-course-card{box-shadow:0 12px 34px rgba(17,45,82,.08)!important}
.qa09-public .qa08-course-card:hover{box-shadow:0 18px 42px rgba(17,45,82,.13)!important}

/* Student shell spacing/cohesion. */
.ac-home-section,.wide-wrap>section{scroll-margin-top:96px}
.ac-quick-card{transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}
.ac-quick-card:hover{transform:translateY(-2px)}

/* Avoid raw horizontal overflow from action rows at intermediate widths. */
:where(.btn-row,.staff-actions,.top-actions,.r23-actions,.ac-header-actions){flex-wrap:wrap}

@media(max-width:760px){
  .app-feedback-modal{align-items:flex-end!important;padding:0!important}
  .app-feedback-panel{border-radius:22px 22px 0 0!important;grid-template-columns:1fr!important;max-height:88dvh!important;padding:20px 16px 16px!important;width:100vw!important}
  .app-feedback-icon{display:none!important}
  .app-feedback-copy h2{font-size:1.4rem!important;margin-right:40px!important}
  .app-feedback-body{max-height:calc(88dvh - 180px)!important}
  .app-feedback-actions{display:grid!important;grid-template-columns:1fr!important;justify-content:stretch!important}
  .app-feedback-actions .btn{min-height:44px!important;width:100%!important}
  :where(.modal-actions,.r45-actions,.dialog-actions,.ac-dialog-actions){display:grid;grid-template-columns:1fr;width:100%}
  :where(.modal-actions,.r45-actions,.dialog-actions,.ac-dialog-actions) :where(button,.btn,.r45-btn){width:100%}
  .runner-top,.r35-runner-head{align-items:center!important}
  .runner-top [data-runner-exit],.r35-runner-head>[data-task-cancel]{min-width:74px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* ========================================================================== 
   R68 REV6804 · final UX and installer hardening pass
   Scope: visual hierarchy only. No academic, access, payment or content rules.
   ========================================================================== */
:root{
  --ac68-page:#f4f7fb;
  --ac68-surface:#ffffff;
  --ac68-surface-soft:#f8fafd;
  --ac68-surface-blue:#f2f6ff;
  --ac68-line-strong:#cbd8e7;
  --ac68-ink-strong:#102443;
  --ac68-success:#087148;
  --ac68-success-soft:#eaf8f1;
  --ac68-warning:#8a5700;
  --ac68-warning-soft:#fff6df;
  --ac68-danger:#b42318;
  --ac68-danger-soft:#fff0ee;
  --ac68-info-soft:#edf4ff;
  --ac68-control-h:42px;
  --ac68-content-max:1380px;
}

/* Page rhythm: old screens now sit on the same neutral canvas without being rebuilt. */
body.app-shell,
body.ac-student-unified-page,
body.r23-course-shell{background:var(--ac68-page)!important;color:var(--ac68-ink-strong)}
body.app-shell .wide-wrap{max-width:var(--ac68-content-max);padding-inline:clamp(14px,2.2vw,30px);padding-bottom:42px}
body.app-shell .panel{scroll-margin-top:96px}
body.app-shell .panel:not(.active){display:none}

/* Staff/admin shell: clearer hierarchy and less visual noise. */
body.app-shell .app-topbar,
body.app-shell .topbar{
  align-items:center;background:rgba(255,255,255,.96);border:1px solid var(--ac68-line);
  border-radius:18px;box-shadow:0 10px 32px rgba(16,36,67,.065);display:flex;gap:18px;
  justify-content:space-between;margin:14px 0 18px;padding:12px 16px;position:sticky;top:10px;z-index:80;
  backdrop-filter:blur(14px)
}
body.app-shell .brand{align-items:center;display:flex;gap:10px;min-width:0}
body.app-shell .brand-copy{min-width:0}
body.app-shell .brand-copy strong{color:var(--ac68-ink-strong);font-size:.96rem}
body.app-shell .role-context{align-items:center;display:flex;flex-wrap:wrap;gap:6px;margin-top:3px}
body.app-shell .role-chip{background:var(--ac68-info-soft);border:1px solid #d4e2fb;border-radius:999px;color:#315b9e;font-size:.69rem;font-weight:800;padding:4px 8px}
body.app-shell .top-actions{align-items:center;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}

body.app-shell .tabs,
body.app-shell .nav-tabs,
body.app-shell .admin-tabs{
  background:#fff;border:1px solid var(--ac68-line);border-radius:16px;box-shadow:0 8px 26px rgba(16,36,67,.045);
  display:flex;gap:5px;margin-bottom:18px;overflow-x:auto;padding:6px;scrollbar-width:thin
}
body.app-shell :where(.tabs,.nav-tabs,.admin-tabs) button,
body.app-shell :where(.tabs,.nav-tabs,.admin-tabs) a{
  border-radius:11px!important;min-height:38px;white-space:nowrap
}

body.app-shell .role-headline,
body.app-shell .contract-center-hero,
body.app-shell .platform-command-center{
  background:linear-gradient(135deg,#fff 0%,#f5f8ff 100%);border:1px solid var(--ac68-line);border-radius:22px;
  box-shadow:0 12px 36px rgba(16,36,67,.06);margin-bottom:18px;padding:clamp(18px,2.5vw,28px)
}
body.app-shell .role-headline h1,
body.app-shell .contract-center-hero h2,
body.app-shell .platform-command-center h1{color:var(--ac68-ink-strong);letter-spacing:-.035em;line-height:1.08;margin:.3rem 0 .5rem}
body.app-shell .role-headline p,
body.app-shell .contract-center-hero p,
body.app-shell .platform-command-center p{max-width:820px}

/* Module toolbars are navigation aids, not loose buttons. */
body.app-shell .qa40-section-tools{
  align-items:center;background:#edf3fb;border:1px solid #d7e3f1;border-radius:14px;display:flex;gap:7px;
  justify-content:flex-start;margin:0 0 14px;padding:7px 9px
}
body.app-shell .qa40-section-tools>strong{color:#36516f;font-size:.75rem;letter-spacing:.035em;margin-right:auto;text-transform:uppercase}
body.app-shell .qa40-section-tools :where(.btn,a.btn){background:#fff!important;border-color:#cedbea!important;box-shadow:none!important}

/* Panels/cards: one visual language across academy, teacher and superadmin. */
body.app-shell :where(.card,.command-center-card,.contract-library,.verify-box,.filter-bar,.document-filter-card){
  background:var(--ac68-surface);border:1px solid var(--ac68-line)!important;border-radius:18px!important;
  box-shadow:0 9px 28px rgba(16,36,67,.05)!important
}
body.app-shell .card{padding:clamp(16px,2vw,22px)}
body.app-shell .two-col{align-items:start;display:grid;gap:16px;grid-template-columns:repeat(2,minmax(0,1fr))}
body.app-shell .section-head{align-items:flex-start;display:flex;gap:14px;justify-content:space-between;margin-bottom:14px}
body.app-shell .section-head h2,body.app-shell .section-head h3{letter-spacing:-.02em;margin-top:0}
body.app-shell .section-head .btn{flex:0 0 auto}

/* Metrics read as a dashboard instead of loose boxes. */
body.app-shell .metric-board,
body.app-shell .contract-summary,
body.app-shell .progress-summary{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));margin:14px 0 18px}
body.app-shell :where(.metric,.metric-card,.summary-card,.content-autopilot-kpi){
  background:#fff;border:1px solid var(--ac68-line);border-radius:16px;box-shadow:0 7px 22px rgba(16,36,67,.045);min-height:96px;padding:14px 15px
}
body.app-shell :where(.metric,.metric-card,.summary-card,.content-autopilot-kpi) small{color:var(--ac68-muted);font-size:.72rem;font-weight:750}
body.app-shell :where(.metric,.metric-card,.summary-card,.content-autopilot-kpi) strong{color:var(--ac68-ink-strong);font-size:clamp(1.35rem,2vw,1.8rem);letter-spacing:-.035em}

/* Forms: labels, help and actions align consistently. */
body.app-shell .form{display:grid;gap:13px}
body.app-shell .form>label,
body.app-shell :where(.filter-grid,.contract-library-filters,.document-filter-grid) label{color:#324a69;font-size:.78rem;font-weight:800;line-height:1.25}
body.app-shell :where(input:not([type="checkbox"]):not([type="radio"]),select,textarea){
  background:#fff;border:1px solid #cfdbea;color:var(--ac68-ink-strong);min-height:var(--ac68-control-h);padding:9px 11px
}
body.app-shell textarea{min-height:112px;resize:vertical}
body.app-shell :where(input,select,textarea)::placeholder{color:#8a99ad}
body.app-shell .field-help{color:var(--ac68-muted);font-size:.73rem;font-weight:500;line-height:1.4;margin-top:4px}
body.app-shell .form>.btn{justify-self:start;margin-top:2px}
body.app-shell :where(.filter-search,.contract-filter-actions,.btn-row){align-items:center;display:flex;flex-wrap:wrap;gap:8px}

/* Tables: enough air, clear row boundaries, horizontal safety on tablets. */
body.app-shell :where(.table-wrap,.data-table-wrap,.admin-table-wrap,.r38-course-table-wrap){
  background:#fff;border:1px solid var(--ac68-line);border-radius:15px;max-width:100%;overflow:auto
}
body.app-shell table{min-width:680px;width:100%}
body.app-shell thead th{background:#f4f7fb;border-bottom:1px solid #d7e2ef;color:#526681;font-weight:850;position:sticky;top:0;z-index:2}
body.app-shell th,body.app-shell td{border-bottom:1px solid #edf1f6;padding:11px 12px;text-align:left;vertical-align:middle}
body.app-shell tbody tr:last-child td{border-bottom:0}
body.app-shell tbody tr:hover td{background:#fafcff}

/* Status surfaces and empty states. */
:where(.notice,.empty,.ac-empty-state,.ac-home-error,.r23-inline-error){border-radius:16px!important;line-height:1.5}
body.app-shell :where(.notice,.empty){border:1px solid var(--ac68-line);padding:14px 16px}
body.app-shell .notice.warn{background:var(--ac68-warning-soft);border-color:#f1d9a0;color:#62430c}
body.app-shell .notice.error,body.app-shell .notice.danger{background:var(--ac68-danger-soft);border-color:#f3c2bd;color:#7a241c}
body.app-shell .notice.info{background:var(--ac68-info-soft);border-color:#cedefa;color:#254c88}
body.app-shell .notice.ok{background:var(--ac68-success-soft);border-color:#bee7d2;color:#125f43}

/* Student home and classroom access: stronger course cards / less empty space. */
.ac-student-unified-page .ac-home-main{max-width:1240px;padding:clamp(16px,3vw,34px)}
.ac-student-unified-page .ac-home-hero{
  background:linear-gradient(135deg,#fff 0%,#f3f7ff 100%);border:1px solid var(--ac68-line);border-radius:24px;
  box-shadow:0 14px 40px rgba(16,36,67,.065);gap:24px;margin-bottom:22px;padding:clamp(20px,3vw,32px)
}
.ac-student-unified-page .ac-home-hero h1{color:var(--ac68-ink-strong);font-size:clamp(1.8rem,4vw,2.65rem);letter-spacing:-.045em;line-height:1.04}
.ac-student-unified-page .ac-course-grid{gap:14px}
.ac-student-unified-page .ac-course-card,
.ac-student-unified-page .ac-quick-card{
  background:#fff;border:1px solid var(--ac68-line)!important;border-radius:18px!important;box-shadow:0 9px 26px rgba(16,36,67,.05)!important
}
.ac-student-unified-page .ac-course-card:hover,.ac-student-unified-page .ac-quick-card:hover{border-color:#aebfd4!important;box-shadow:0 14px 34px rgba(16,36,67,.09)!important}

/* Course shell: intermediate screens feel like one product, not nested legacy panels. */
.r23-course-shell .ac-portal-main{gap:18px;max-width:1540px;padding:18px clamp(14px,2vw,28px) 32px}
.r23-course-shell .ac-course-sidebar{
  background:#fff;border:1px solid var(--ac68-line);border-radius:20px;box-shadow:0 10px 30px rgba(16,36,67,.055);
  overflow:hidden;padding:0;position:sticky;top:18px
}
.r23-course-shell .ac-sidebar-head{background:linear-gradient(180deg,#f8faff 0%,#fff 100%);border-bottom:1px solid #e6edf5;padding:16px}
.r23-course-shell .ac-sidebar-head h2{letter-spacing:-.025em;margin:.2rem 0}
.r23-course-shell .r23-unit-list{padding:10px}
.r23-course-shell .r43-list-tools{background:#f6f8fb;border:1px solid #e1e8f1;border-radius:13px;display:grid;gap:8px;margin:0 0 9px;padding:9px}
.r23-course-shell .r43-list-tools label{color:#536780;font-size:.69rem;font-weight:800}
.r23-course-shell .r43-list-tools input,.r23-course-shell .r43-list-tools select{background:#fff;border:1px solid #d3dfec;border-radius:10px;min-height:36px}
.r23-course-shell .r23-unit-btn{
  background:#fff;border:1px solid transparent!important;border-radius:13px!important;display:grid!important;grid-template-columns:34px minmax(0,1fr)!important;
  margin:3px 0!important;padding:9px 10px!important;text-align:left!important;transition:background .14s ease,border-color .14s ease,transform .14s ease
}
.r23-course-shell .r23-unit-btn:hover{background:#f6f9fe!important;border-color:#dce6f2!important;transform:translateX(1px)}
.r23-course-shell .r23-unit-btn.done{background:#f2fbf7!important;border-color:#d5efe2!important}
.r23-course-shell .r23-unit-btn.needs-review{background:#fff9ed!important;border-color:#f0e0b5!important}
.r23-course-shell .r23-unit-btn>span{align-items:center;background:#eef3fa;border-radius:9px;color:#3e5879;display:flex;font-size:.72rem;font-weight:900;height:30px;justify-content:center;grid-row:1/3;width:30px}
.r23-course-shell .r23-unit-btn.done>span{background:#def3e8;color:#087148}
.r23-course-shell .r23-unit-btn b{color:#17345f;font-size:.82rem;line-height:1.25;min-width:0}
.r23-course-shell .r23-unit-btn small{color:#6d7e95;font-size:.69rem;line-height:1.25;margin-top:2px}
.r23-course-shell .r43-pager{border-top:1px solid #e5ebf3;margin-top:8px;padding-top:10px}

.r23-course-shell .ac-course-content{
  background:#fff;border:1px solid var(--ac68-line);border-radius:20px;box-shadow:0 10px 32px rgba(16,36,67,.055);
  min-width:0;padding:clamp(16px,2.4vw,28px)
}
.r23-course-shell .ac-course-nav{background:#fff;border-bottom:1px solid #dfe7f1;box-shadow:0 4px 16px rgba(16,36,67,.035)}
.r23-course-shell .ac-course-nav-inner{gap:4px;overflow-x:auto;padding:7px clamp(12px,2vw,24px);scrollbar-width:thin}
.r23-course-shell .ac-nav-item{border-radius:10px!important;font-size:.78rem!important;min-height:38px!important;padding:8px 11px!important;white-space:nowrap}
.r23-course-shell .ac-nav-item.active{background:#eaf1ff!important;color:#214fae!important}

/* Task/topic overview cards and route content. */
.r23-course-shell :where(.r35-task-card,.r23-step,.r23-topic-card,.ac-task-card,.r35-task-overview,.r35-task-summary){
  border:1px solid var(--ac68-line)!important;border-radius:17px!important;box-shadow:0 7px 22px rgba(16,36,67,.045)!important
}
.r23-course-shell :where(.r35-task-card,.r23-step,.r23-topic-card,.ac-task-card):hover{border-color:#b8c8da!important;box-shadow:0 12px 30px rgba(16,36,67,.075)!important}

/* Runner header: explicit specificity beats the old generic >div flex rule. */
.ac-course-content .r35-runner-head{
  align-items:flex-start!important;border-bottom:0!important;display:flex!important;gap:16px!important;justify-content:space-between!important;
  margin:-2px 0 8px!important;padding:0!important;width:100%!important
}
.ac-course-content .r35-runner-head>.ac-runner-context{
  flex:1 1 auto!important;max-width:calc(100% - 150px)!important;min-width:0!important;width:auto!important
}
.ac-course-content .r35-runner-head>.r35-runner-actions{
  align-items:center!important;align-self:flex-start!important;display:flex!important;flex:0 0 auto!important;gap:8px!important;
  justify-content:flex-end!important;margin-left:auto!important;min-width:max-content!important;width:auto!important
}
.ac-course-content .r35-runner-actions [data-task-cancel]{flex:0 0 auto!important;margin:0!important}
.ac-course-content .r35-runner-actions .ac-learning-settings-inline{flex:0 0 auto!important;margin:0!important}
.ac-course-content .r35-runner-progress{background:#e8eef6!important;border-radius:999px!important;height:6px!important;margin:10px 0 18px!important;overflow:hidden!important}
.ac-course-content .r35-runner-progress>i{border-radius:999px!important}
.ac-course-content .r35-one-question{
  background:#fff!important;border:1px solid #d8e2ef!important;border-radius:18px!important;box-shadow:0 9px 26px rgba(16,36,67,.05)!important;
  margin:0 auto!important;max-width:980px!important;padding:clamp(16px,2.4vw,26px)!important
}
.ac-course-content .r35-one-question legend,.ac-course-content .r35-one-question>h2{color:#102443!important;font-size:clamp(1rem,2vw,1.15rem)!important;line-height:1.45!important}
.ac-course-content .r35-question-nav{
  align-items:center!important;background:#f7f9fc!important;border:1px solid #e0e7f0!important;border-radius:15px!important;display:grid!important;
  gap:10px!important;grid-template-columns:auto minmax(0,1fr) auto!important;margin:16px auto 0!important;max-width:980px!important;padding:9px!important
}
.ac-course-content .r35-question-nav>span{color:#63758d;font-size:.76rem;text-align:center}

/* Updates, agenda, library and messages: richer hierarchy and actionable cards. */
.r23-course-shell .ac-service-head{align-items:flex-end;border-bottom:1px solid #e3eaf3;display:flex;gap:16px;justify-content:space-between;margin:-2px 0 18px;padding:0 0 16px}
.r23-course-shell .ac-service-head h1{color:#102443;font-size:clamp(1.6rem,3vw,2.15rem);letter-spacing:-.04em;line-height:1.05;margin:.3rem 0 .45rem}
.r23-course-shell .ac-service-head p{color:#61718a;line-height:1.5;margin:0;max-width:760px}
.r23-course-shell .ac-service-grid{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr))}
.r23-course-shell .ac-service-card{
  background:#fff;border:1px solid #d9e3ef;border-radius:17px;box-shadow:0 7px 22px rgba(16,36,67,.045);display:flex;flex-direction:column;gap:9px;
  min-width:0;padding:15px 16px;position:relative
}
.r23-course-shell .ac-service-card.is-new{border-color:#9ab7ef;box-shadow:0 0 0 2px rgba(49,92,222,.055),0 10px 28px rgba(16,36,67,.06)}
.r23-course-shell .ac-service-card.is-new:before{background:#315cde;border-radius:999px;content:"";height:8px;position:absolute;right:13px;top:13px;width:8px}
.r23-course-shell .ac-service-meta{align-items:center;display:flex;flex-wrap:wrap;gap:5px;padding-right:12px}
.r23-course-shell .ac-chip{background:#f0f4fa;border:1px solid #dce5f0;border-radius:999px;color:#506681;font-size:.68rem;font-weight:800;padding:4px 8px}
.r23-course-shell .ac-service-card h3{color:#17345f;font-size:1rem;letter-spacing:-.018em;line-height:1.3;margin:1px 0 0}
.r23-course-shell .ac-service-card p{color:#61718a;font-size:.82rem;line-height:1.52;margin:0}
.r23-course-shell .ac-service-actions{align-items:center;display:flex;flex-wrap:wrap;gap:7px;margin-top:auto;padding-top:5px}
.r23-course-shell .ac-service-actions .r23-btn{min-height:37px!important}
.r23-course-shell .ac-message-layout{display:grid;gap:14px;grid-template-columns:minmax(280px,.75fr) minmax(0,1.25fr)}
.r23-course-shell .ac-message-compose{align-self:start;position:sticky;top:18px}
.r23-course-shell .ac-message-thread{display:grid;gap:9px;max-height:620px;overflow:auto;padding:2px}
.r23-course-shell .ac-message-bubble{background:#f5f8fc;border:1px solid #e0e8f1;border-radius:14px 14px 14px 5px;padding:10px 12px}
.r23-course-shell .ac-message-bubble.mine{background:#edf3ff;border-color:#ccdcfa;border-radius:14px 14px 5px 14px;margin-left:clamp(18px,8%,70px)}

/* Superadmin source/update cockpit: clearer review queue. */
.content-autopilot-card{
  background:#fff;border:1px solid var(--ac68-line)!important;border-radius:17px!important;box-shadow:0 7px 24px rgba(16,36,67,.045)!important;
  margin-bottom:10px;padding:15px!important
}
.content-autopilot-head{align-items:flex-start;display:flex;gap:14px;justify-content:space-between}
.content-autopilot-title{min-width:0}
.content-autopilot-title h4{color:#17345f;font-size:1rem;letter-spacing:-.015em;line-height:1.3;margin:.45rem 0 .3rem}
.content-autopilot-title p{color:#61718a;line-height:1.5;margin:0;max-width:820px}
.content-autopilot-meta{display:flex;flex-wrap:wrap;gap:5px}
.content-autopilot-actions{align-items:center;display:flex;flex:0 0 auto;flex-wrap:wrap;gap:6px;justify-content:flex-end;max-width:360px}
.content-autopilot-source{border-top:1px solid #edf1f6;color:#708096;margin-top:12px;padding-top:9px}
.content-autopilot-source a{color:#315cde;font-weight:750}
.content-autopilot-proposal{display:grid;gap:10px}
.content-autopilot-question{background:#f8fafc;border:1px solid #e0e7f0;border-radius:14px;padding:12px}
.content-autopilot-question li.is-correct{background:#eaf8f1;border-radius:8px;color:#125f43;font-weight:800;padding-inline:5px}

/* Modal system: integrated shell, calmer chrome, correct hierarchy. */
.app-feedback-modal{align-items:center!important;display:flex!important;justify-content:center!important}
.app-feedback-panel{
  background:#fff!important;border:1px solid #ced9e7!important;border-radius:20px!important;box-shadow:0 28px 84px rgba(6,24,50,.3)!important;
  max-height:min(86dvh,760px)!important;overflow:hidden!important;padding:0!important;width:min(600px,calc(100vw - 32px))!important
}
.app-feedback-panel>.app-feedback-icon{margin:20px 0 0 20px!important}
.app-feedback-copy{padding:18px 20px 0 0!important}
.app-feedback-body{overflow:auto!important;padding-bottom:18px!important}
.app-feedback-actions{background:#f8fafc!important;border-top:1px solid #e1e8f0!important;margin:0!important;padding:12px 16px!important}
.app-feedback-close{background:#f6f8fb!important;border:1px solid #dbe4ee!important;color:#536780!important}

/* Exam return is a toast/status event, not a fake modal or full-screen overlay. */
.ac-exam-return-toast{
  animation:ac68ToastIn .22s ease both;background:#fff;border:1px solid #c9d7e7;border-radius:15px;box-shadow:0 18px 48px rgba(8,29,60,.18);
  color:#17345f;display:grid;gap:10px;grid-template-columns:auto minmax(0,1fr) auto;max-width:min(390px,calc(100vw - 28px));padding:11px 12px;
  position:fixed;right:18px;top:18px;width:100%;z-index:2300
}
.ac-exam-return-mark{align-items:center;background:#edf3ff;border-radius:10px;color:#315cde;display:flex;font-size:.9rem;font-weight:950;height:32px;justify-content:center;width:32px}
.ac-exam-return-copy{min-width:0}
.ac-exam-return-meta{align-items:center;display:flex;flex-wrap:wrap;gap:6px;margin-bottom:2px}
.ac-exam-return-badge{background:#eef3fb;border:1px solid #d8e3f0;border-radius:999px;color:#506681;font-size:.64rem;font-weight:850;letter-spacing:.035em;padding:3px 7px;text-transform:uppercase}
.ac-exam-return-copy strong{color:#17345f;display:block;font-size:.84rem;line-height:1.25}
.ac-exam-return-copy p{color:#63758d;font-size:.74rem;line-height:1.4;margin:3px 0 0}
.ac-exam-return-close{align-items:center;background:transparent;border:0;border-radius:8px;color:#718198;cursor:pointer;display:flex;font-size:1.1rem;height:28px;justify-content:center;padding:0;width:28px}
.ac-exam-return-close:hover{background:#f1f4f8;color:#294364}
.ac-exam-return-toast:after{animation:ac68ToastLife 4.8s linear both;background:#315cde;border-radius:0 0 15px 15px;bottom:0;content:"";height:2px;left:0;position:absolute;width:100%}
@keyframes ac68ToastIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
@keyframes ac68ToastLife{from{transform:scaleX(1);transform-origin:left}to{transform:scaleX(0);transform-origin:left}}

/* Mobile / intermediate widths. */
@media(max-width:1100px){
  body.app-shell .two-col{grid-template-columns:1fr}
  .r23-course-shell .ac-portal-main{grid-template-columns:minmax(220px,280px) minmax(0,1fr)}
  .content-autopilot-head{display:grid;grid-template-columns:1fr}
  .content-autopilot-actions{justify-content:flex-start;max-width:none}
}
@media(max-width:860px){
  body.app-shell .app-topbar,body.app-shell .topbar{position:relative;top:auto}
  .r23-course-shell .ac-portal-main{display:block!important;padding:12px}
  .r23-course-shell .ac-course-sidebar{margin-bottom:12px;position:relative;top:auto}
  .r23-course-shell .ac-course-content{padding:16px}
  .r23-course-shell .ac-message-layout{grid-template-columns:1fr}
  .r23-course-shell .ac-message-compose{position:relative;top:auto}
}
@media(max-width:700px){
  body.app-shell .wide-wrap{padding-inline:10px}
  body.app-shell .app-topbar,body.app-shell .topbar{align-items:flex-start;border-radius:15px;flex-direction:column;margin-top:8px;padding:11px 12px}
  body.app-shell .top-actions{justify-content:flex-start;width:100%}
  body.app-shell .top-actions :where(.btn,a.btn){flex:1 1 auto;text-align:center}
  body.app-shell .qa40-section-tools{align-items:stretch;overflow-x:auto}
  body.app-shell .qa40-section-tools>strong{align-self:center;min-width:max-content}
  body.app-shell .section-head{display:grid;grid-template-columns:1fr}
  body.app-shell .section-head .btn{justify-self:start}
  body.app-shell .form>.btn{width:100%}
  .r23-course-shell .ac-course-content{border-radius:16px;padding:13px}
  .ac-course-content .r35-runner-head{align-items:flex-start!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:10px!important}
  .ac-course-content .r35-runner-head>.ac-runner-context{max-width:none!important}
  .ac-course-content .r35-runner-head>.r35-runner-actions{align-self:start!important;grid-column:2!important;grid-row:1!important}
  .ac-course-content .r35-runner-actions [data-task-cancel]{min-width:62px!important}
  .ac-course-content .r35-question-nav{grid-template-columns:1fr 1fr!important}
  .ac-course-content .r35-question-nav>span{grid-column:1/-1;grid-row:1;text-align:left}
  .ac-course-content .r35-question-nav>button:first-of-type{grid-column:1;grid-row:2}
  .ac-course-content .r35-question-nav>button:last-of-type{grid-column:2;grid-row:2}
  .r23-course-shell .ac-service-grid{grid-template-columns:1fr}
  .r23-course-shell .ac-service-head{display:block}
  .ac-exam-return-toast{bottom:max(12px,env(safe-area-inset-bottom));right:12px;top:auto}
  .app-feedback-panel>.app-feedback-icon{display:none!important}
  .app-feedback-copy{padding:18px 16px 0!important}
  .app-feedback-actions{display:grid!important;grid-template-columns:1fr!important}
  .app-feedback-actions .btn{width:100%!important}
}
@media(max-width:430px){
  .ac-course-content .r35-runner-head{grid-template-columns:1fr!important}
  .ac-course-content .r35-runner-head>.r35-runner-actions{grid-column:1!important;grid-row:2!important;justify-content:flex-end!important;width:100%!important}
  .ac-course-content .r35-runner-actions .ac-learning-settings-inline{margin-left:auto!important}
  .ac-student-unified-page .ac-home-main{padding:10px}
  .ac-student-unified-page .ac-home-hero{border-radius:18px;padding:18px}
}

body[data-ac-learning-mode="visual_rest"] .ac-exam-return-toast{background:#242b34;border-color:#566273;color:#f3ead7}
body[data-ac-learning-mode="visual_rest"] .ac-exam-return-copy strong{color:#fff3dd}
body[data-ac-learning-mode="visual_rest"] .ac-exam-return-copy p{color:#d5ccb9}
body[data-ac-learning-mode="high_contrast"] .ac-exam-return-toast{background:#fff!important;border:3px solid #000!important;box-shadow:none!important;color:#000!important}
body[data-ac-learning-mode="high_contrast"] .ac-exam-return-copy strong,body[data-ac-learning-mode="high_contrast"] .ac-exam-return-copy p{color:#000!important}

@media(prefers-reduced-motion:reduce){.ac-exam-return-toast,.ac-exam-return-toast:after{animation:none!important}}


/* REV6804 · final UX and accessibility hardening. */
.app-feedback-panel{overscroll-behavior:contain!important}
.app-feedback-body{overscroll-behavior:contain!important}
.app-feedback-actions{padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
.app-feedback-backdrop[data-feedback-disabled]{cursor:default}
.app-modal-field{display:grid;gap:7px;margin-top:14px}
.app-modal-field>span{color:#17345f;font-size:.82rem;font-weight:800}
.app-modal-input{background:#fff!important;border:1px solid #b9c9dc!important;border-radius:12px!important;color:#17345f!important;font:inherit!important;line-height:1.45!important;min-height:46px;padding:11px 12px!important;width:100%!important}
textarea.app-modal-input{min-height:110px!important;resize:vertical}
.app-modal-input:focus{border-color:#315cde!important;box-shadow:0 0 0 3px rgba(49,92,222,.12)!important;outline:0!important}
.app-modal-field-error{color:#9e2f38;font-size:.76rem;font-weight:700;min-height:1em}

/* Exam focus feedback lives inside the runner whenever possible; floating only as a fallback. */
.ac-exam-return-notice{
  align-items:flex-start;background:#f7faff;border:1px solid #cbdaf0;border-radius:14px;color:#17345f;display:grid;gap:10px;
  grid-template-columns:auto minmax(0,1fr) auto;margin:0 0 14px;padding:10px 12px;position:relative
}
.ac-exam-return-notice .ac-exam-return-mark{background:#e9f0ff}
.ac-exam-return-notice .ac-exam-return-copy p{margin-top:2px}
.ac-exam-return-notice.is-floating{animation:ac68ToastIn .22s ease both;box-shadow:0 18px 48px rgba(8,29,60,.18);margin:0;max-width:min(390px,calc(100vw - 28px));position:fixed;right:18px;top:18px;width:100%;z-index:2300}
.ac-exam-return-notice.is-floating:after{animation:ac68ToastLife 5.8s linear both;background:#315cde;border-radius:0 0 14px 14px;bottom:0;content:"";height:2px;left:0;position:absolute;width:100%}
body[data-ac-learning-mode="visual_rest"] .ac-exam-return-notice{background:#242b34;border-color:#566273;color:#f3ead7}
body[data-ac-learning-mode="visual_rest"] .ac-exam-return-notice .ac-exam-return-copy strong{color:#fff3dd}
body[data-ac-learning-mode="visual_rest"] .ac-exam-return-notice .ac-exam-return-copy p{color:#d5ccb9}
body[data-ac-learning-mode="high_contrast"] .ac-exam-return-notice{background:#fff!important;border:3px solid #000!important;box-shadow:none!important;color:#000!important}
body[data-ac-learning-mode="high_contrast"] .ac-exam-return-notice .ac-exam-return-copy strong,body[data-ac-learning-mode="high_contrast"] .ac-exam-return-notice .ac-exam-return-copy p{color:#000!important}

/* Course intermediate screens: keep long topic lists useful on tablets and mobiles. */
@media(max-width:860px){
  .r23-course-shell .ac-course-sidebar{border-radius:16px!important;overflow:hidden!important}
  .r23-course-shell .r23-unit-list{max-height:min(44dvh,430px);overflow:auto;overscroll-behavior:contain;padding-right:3px;scrollbar-gutter:stable}
  .r23-course-shell .ac-sidebar-head{position:sticky;top:0;z-index:2}
}
@media(max-width:700px){
  .r23-course-shell .r23-unit-list{max-height:min(38dvh,360px)}
  .ac-exam-return-notice.is-floating{bottom:max(12px,env(safe-area-inset-bottom));right:12px;top:auto}
}

/* Service areas: information density without losing the course context. */
.r23-course-shell .ac-chip.subtle{background:#fff;border-color:#e2e8f1;color:#708096;font-weight:700}
.r23-course-shell .ac-service-card{overflow:hidden}
.r23-course-shell .ac-service-card:after{background:linear-gradient(90deg,#315cde,#6f8ee8);content:"";height:2px;left:0;opacity:.18;position:absolute;right:0;top:0}
.r23-course-shell .ac-service-head{border-bottom:1px solid #e8eef5;margin-bottom:15px;padding-bottom:13px}
.r23-course-shell .ac-message-compose textarea{min-height:132px;resize:vertical}

/* Editorial/operations pages were legacy visual islands; bring them into the same product shell. */
body.ac-editorial-shell{background:#f4f7fb!important;color:#17345f!important;min-height:100vh}
body.ac-editorial-shell .top{background:linear-gradient(135deg,#0e2b59,#173f78)!important;border-bottom:1px solid rgba(255,255,255,.12);padding:clamp(22px,4vw,38px) clamp(18px,4vw,46px)!important}
body.ac-editorial-shell .top h1{font-size:clamp(1.55rem,3vw,2.25rem)!important;letter-spacing:-.03em;line-height:1.1;margin:.55rem 0 .5rem!important}
body.ac-editorial-shell .top p{color:#dbe7f8!important;font-size:.94rem;line-height:1.55;max-width:980px!important}
body.ac-editorial-shell .top .tag{background:rgba(255,255,255,.12)!important;border:1px solid rgba(255,255,255,.2)!important;color:#fff!important}
body.ac-editorial-shell .wrap{margin:22px auto!important;max-width:1480px!important;padding:0 clamp(12px,2vw,24px)!important}
body.ac-editorial-shell .card{border:1px solid #d9e3ef!important;border-radius:18px!important;box-shadow:0 8px 28px rgba(16,36,67,.055)!important;margin-bottom:16px!important;padding:clamp(16px,2vw,24px)!important}
body.ac-editorial-shell .toolbar{align-items:flex-start!important;gap:14px!important}
body.ac-editorial-shell .toolbar h2{color:#17345f;font-size:1.08rem;letter-spacing:-.015em;margin:0 0 4px}
body.ac-editorial-shell .actions{gap:7px!important;justify-content:flex-end}
body.ac-editorial-shell :where(button,.link){align-items:center;border-radius:10px!important;display:inline-flex;justify-content:center;min-height:40px;padding:9px 13px!important}
body.ac-editorial-shell .stats{gap:10px!important}
body.ac-editorial-shell .stat{background:#f9fbfe!important;border:1px solid #dce6f1!important;border-radius:13px!important;padding:12px!important}
body.ac-editorial-shell .stat strong{color:#17345f!important;font-size:clamp(1.15rem,2vw,1.45rem)!important}
body.ac-editorial-shell .notice{border:1px solid #dce7f3;border-radius:12px!important;line-height:1.45}
body.ac-editorial-shell .filters{background:#f8fafc;border:1px solid #e2e9f1;border-radius:14px;padding:12px}
body.ac-editorial-shell .table-wrap{border-color:#dbe5ef!important;box-shadow:0 4px 16px rgba(16,36,67,.025)}
body.ac-editorial-shell th{background:#f7f9fc!important;color:#536b88!important;position:sticky!important;top:0!important;z-index:2}
body.ac-editorial-shell tbody tr:hover td{background:#fbfdff}
body.ac-editorial-shell .foot,body.ac-editorial-shell .small,body.ac-editorial-shell .hint{color:#667991!important;line-height:1.48}
@media(max-width:720px){
  body.ac-editorial-shell .wrap{margin-top:12px!important}
  body.ac-editorial-shell .toolbar{display:grid!important;grid-template-columns:1fr!important}
  body.ac-editorial-shell .actions{justify-content:stretch!important;width:100%}
  body.ac-editorial-shell .actions>*{flex:1 1 140px!important;text-align:center}
  body.ac-editorial-shell .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.ac-editorial-shell .filters{grid-template-columns:1fr!important}
}
@media(max-width:430px){body.ac-editorial-shell .stats{grid-template-columns:1fr 1fr!important}body.ac-editorial-shell .actions>*{flex:1 1 100%!important}}

@media(prefers-reduced-motion:reduce){.ac-exam-return-notice.is-floating,.ac-exam-return-notice.is-floating:after{animation:none!important}}

/* R69/V35 REV6901 · final modal and intermediate-surface cohesion */
:root{
  --ac-dialog-radius:24px;
  --ac-dialog-shadow:0 28px 80px rgba(13,35,70,.22);
}
.app-feedback-panel,.contract-config-modal,.r45-modal-panel,.r33-preview-dialog,.r35-preview-dialog,.ac-security-dialog{
  border-radius:var(--ac-dialog-radius);
  box-shadow:var(--ac-dialog-shadow);
  overscroll-behavior:contain;
}
.contract-config-modal,.r33-preview-dialog,.r35-preview-dialog{
  max-height:min(92dvh,920px);
}
:is(button,a,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid rgba(34,104,224,.42);
  outline-offset:2px;
}
@media(max-width:640px){
  .app-feedback-modal,.r45-modal,.r33-preview-overlay,.r35-preview-overlay,.ac-security-overlay{
    align-items:end;
    padding:8px;
  }
  .app-feedback-panel,.r45-modal-panel,.r33-preview-dialog,.r35-preview-dialog,.ac-security-dialog{
    width:100%;
    max-width:none;
    max-height:calc(100dvh - 16px);
    border-radius:22px 22px 16px 16px;
  }
  .contract-config-backdrop{padding:6px;align-items:end}
  .contract-config-modal{width:100%;max-width:none;max-height:calc(100dvh - 12px);border-radius:22px 22px 14px 14px}
}

/* R70/V36 REV7002 · controlled-production stabilization: runtime efficiency and pre-manual-test closeout. */

/* R71 · pre-test experience and persistence visibility */
.ac-save-status{align-items:center;background:#edf7f1;border:1px solid #c8e7d4;border-radius:999px;color:#246342;display:inline-flex;font-size:.69rem;font-weight:850;min-height:30px;padding:5px 9px;white-space:nowrap}
.ac-save-status[data-state="saving"]{background:#eef3fb;border-color:#d6e2f2;color:#315cde}
.ac-save-status[data-state="pending"]{background:#fff7e8;border-color:#efd9a6;color:#8a5b0e}
.ac-save-status[data-state="offline"]{background:#fff0f0;border-color:#ebc3c3;color:#8b3131}
.ac-assessment-brief{background:#fff;border:1px solid #dbe5f1;border-radius:24px;box-shadow:0 18px 55px rgba(16,42,76,.08);margin:0 auto;max-width:880px;padding:clamp(20px,4vw,38px)}
.ac-assessment-brief>h1{color:#17345f;font-size:clamp(1.65rem,4vw,2.5rem);margin:8px 0 10px}
.ac-assessment-brief>.r23-lead{max-width:720px}
.ac-assessment-brief-grid{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr));margin:22px 0}
.ac-assessment-brief-grid article{background:#f7f9fc;border:1px solid #e0e8f2;border-radius:16px;display:grid;gap:5px;padding:14px}
.ac-assessment-brief-grid small{color:#687b93;font-size:.72rem;font-weight:800}
.ac-assessment-brief-grid strong{color:#17345f;font-size:1rem;line-height:1.25}
.ac-assessment-brief-note{background:#edf4ff;border:1px solid #d3e2fb;border-radius:16px;color:#24436e;margin:0 0 20px;padding:14px 16px}
.ac-assessment-brief-note strong{display:block;margin-bottom:4px}.ac-assessment-brief-note p{line-height:1.5;margin:0}
.ac-assessment-brief .r23-modal-cta{justify-content:flex-start;margin-top:18px}
body[data-ac-learning-mode="visual_rest"] :where(.ac-assessment-brief,.ac-assessment-brief-grid article,.ac-assessment-brief-note){background:#242a32!important;border-color:#535e6c!important;color:#f3ead7!important}
body[data-ac-learning-mode="visual_rest"] .ac-assessment-brief :where(h1,strong,small,p){color:#f3ead7!important}
body[data-ac-learning-mode="high_contrast"] :where(.ac-assessment-brief,.ac-assessment-brief-grid article,.ac-assessment-brief-note){background:#fff!important;border:2px solid #050505!important;box-shadow:none!important;color:#050505!important}
body[data-ac-learning-mode="high_contrast"] .ac-assessment-brief :where(h1,strong,small,p){color:#050505!important}
@media(max-width:760px){.ac-assessment-brief-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ac-save-status{font-size:.64rem;min-height:28px;padding:4px 7px}.ac-assessment-actions{flex-wrap:wrap}.ac-assessment-actions .ac-save-status{order:-1}}
@media(max-width:420px){.ac-assessment-brief-grid{grid-template-columns:1fr 1fr}.ac-assessment-brief{border-radius:18px;padding:18px 14px}.ac-assessment-brief .r23-modal-cta{display:grid;grid-template-columns:1fr}.ac-assessment-brief .r23-btn{width:100%}}
