/* Refinement of the approved V2 layout, without replacing its design system. */
:root{--ink:#22334c;--muted:#566781;--focus:#1755c9;--petroleum:#235769}
html[data-theme=dark]{--ink:#e4ebf6;--muted:#b1bed2;--focus:#92baff;--petroleum:#9dcedb}
body{font-size:16px;line-height:1.55}
h1{font-size:34px;font-weight:600;letter-spacing:-.035em}
h2,.section-heading h2,.approval h2{font-size:20px;font-weight:600;line-height:1.4}
h3{font-size:18px;font-weight:500}strong{font-weight:600}
button,.button,input,select,textarea{font-size:16px;line-height:1.4}
button,.button{min-height:48px;font-weight:500;display:inline-flex;align-items:center;justify-content:center}
[data-external-media-gate="youtube"] button[hidden]{display:none!important}
button.primary,.button.primary{box-shadow:none}
input,select{min-height:48px}label{font-size:16px;font-weight:500}
.small,small,.muted,.pill,.notice,.error,.empty,.preview-label{font-size:14px}
.heading p{font-size:16px}.heading .eyebrow,.eyebrow{font-size:13px;letter-spacing:.09em}
.card{padding:24px}.shell main{padding-top:32px}
.topbar-inner{gap:24px;padding-top:8px;padding-bottom:8px;min-height:102px}
.brand,.brand img{width:216px;height:129px;flex-shrink:0}.brand{padding:0}
html[data-theme=dark] .brand img{padding:6px}
.header-search{max-width:320px}.header-search input{height:48px;font-size:16px}
.header-search .ui-icon{top:15px}.header-actions{gap:12px}
.preferences{gap:10px}.preferences select{width:205px;min-height:48px;font-size:15px;padding:8px}
.preferences .icon-button,.notifications-menu>summary{width:44px!important;height:44px;min-height:44px!important}
.preferences .icon-button{font-size:22px;color:var(--ink);background:var(--soft);box-shadow:none;transition:none}
.preferences #preferences-retry{font-size:14px;max-width:none}
.icon-button{font-size:22px}.account-avatar{width:40px;height:40px;font-size:14px}
.account-menu-label,.header-popover>summary{font-size:14px}.logout{font-size:14px;min-height:44px}
.notification-count{font-size:11px}.account-heading span,.account-menu .sidebar .demo-return{font-size:14px}
.account-menu .sidebar a{font-size:16px;min-height:46px}.notification{font-size:15px}
.notification button,.header-popover .notification button{font-size:14px;min-height:44px}
.popover-content{width:340px}.preference-error{font-size:14px}
.date-chip,.streak-chip{font-size:14px}.kpi-label{font-size:13px;letter-spacing:.045em}
.kpi-card{min-height:120px;align-items:flex-start}.kpi-value{font-size:32px;font-weight:600}
.kpi-value small{font-size:14px}.kpi-icon{width:38px;height:38px}.kpi-grid{gap:16px}
.progress-label,.panel-link{font-size:15px}.progress-row{margin-bottom:20px}progress{height:10px}
.chart-label,.chart-value{font-size:13px}.weekly-chart figcaption{font-size:14px}
.recent-copy strong{font-size:16px;font-weight:500}.recent-copy small{font-size:14px}
.recent-item{gap:12px;padding:14px 12px}.grade{font-size:16px}
.detail-grid>.card{padding:22px}.milestone strong{font-size:14px;font-weight:500}
.milestone>span:last-child{font-size:14px;line-height:1.4}.milestone{padding:16px 10px;min-height:140px}
.rank-head{font-size:13px;letter-spacing:.035em}.rank-entry,.rank-entry>strong{font-size:15px}
.rank-entry>strong small,.rank-person small{font-size:12px}.rank-avatar{width:32px;height:32px;font-size:13px}
.stat-grid .stat>span:not(.kpi-icon){font-size:13px;letter-spacing:.045em}
.stat-grid .stat{min-height:125px}.stat-grid .stat strong{font-size:32px;font-weight:600}
.action-row strong,.child-card strong{font-size:16px;font-weight:500}
.action-row p,.child-card small,.status-line,.profile-chip,.facts,.approval p,.approval summary,.control-row p{font-size:14px}
.tabs a{font-size:16px}.demo-card p,.demo-number{font-size:14px}.demo-card h2{font-size:20px}
.auth-grid{gap:64px;margin:24px 0 42px;align-items:center}
.auth-art{padding:0;display:block}.auth-photo{aspect-ratio:1.18;overflow:hidden;border-radius:16px;background:var(--soft)}
.auth-photo img{width:100%;max-width:none;height:100%;object-fit:cover;object-position:center 55%;display:block}
.auth-copy{padding-top:24px}.auth-art h1{font-size:34px;line-height:1.22;margin:0 0 12px;font-weight:600}
.auth-art p{font-size:16px;color:var(--muted);margin:0;max-width:470px}
.auth-form{padding:32px}.auth-form h1{font-size:30px;font-weight:600}
.auth-form label,.auth-form .check{font-size:16px}.auth-form>p,.auth-links{font-size:15px}
.auth-links{line-height:1.6}.auth-form input{min-height:48px}.auth-form input[type=checkbox]{min-height:0}
.footer-inner,footer,.preview-label{font-size:14px}.footer-inner{line-height:1.5}
/* A real focus ring, with >3:1 contrast against both themes. */
:focus-visible,html[data-theme=dark] :focus-visible{outline:3px solid var(--focus);outline-offset:3px}
/* The filters are a labelled grid, aligned at the controls' bottom edge. */
.activity-filters{display:grid;grid-template-columns:minmax(190px,1fr) minmax(230px,1.35fr) auto;gap:18px;align-items:end;margin:0 0 24px}
.activity-filters label{display:flex;flex-direction:column;gap:8px;margin:0}
.activity-filters input,.activity-filters select{margin:0;width:100%;height:48px}
.activity-filters button{height:48px;min-width:118px}
.activity-summary{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}
.activity-summary p{margin:0;color:var(--muted);font-size:14px}
.activity-row{display:grid;grid-template-columns:minmax(0,1fr) 246px;align-items:start;gap:28px;padding:22px 24px}
.activity-row h2{font-size:20px;font-weight:500;line-height:1.4;margin:10px 0 12px;color:var(--ink)}
.activity-meta,.activity-details{display:flex;align-items:center;flex-wrap:wrap;gap:8px 18px;font-size:14px;color:var(--muted)}
.activity-meta time{font-weight:500;color:var(--petroleum)}.activity-details{margin:0}
.activity-grade{display:flex;align-items:baseline;gap:6px}.activity-grade strong{font-size:18px;font-weight:500;color:var(--ink)}
.activity-grade small{font-size:14px}.activity-actions{display:flex;flex-direction:column;gap:10px;align-items:stretch;width:100%;min-width:0}
.activity-actions .primary{height:48px;min-height:48px;width:100%;flex:none;margin:0;padding:10px 14px}
.activity-actions .quiet{width:100%;font-size:14px;min-height:44px;margin:0;padding:8px 10px;background:transparent;border-color:var(--line);color:var(--blue);flex:none}
.activity-state{display:inline-flex;align-items:center;gap:6px;font-size:14px;padding:4px 9px;border-radius:7px;background:var(--soft);color:var(--petroleum)}
.activity-state[data-state=late]{color:#9f3444;background:#fff1f3}
html[data-theme=dark] .activity-state[data-state=late]{color:#ffb0bb;background:#3b2732}
.group-history{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}
.group-history h2{font-size:18px}.group-history p{font-size:14px;color:var(--muted)}
/* Restrained blue weekly palette; every state also has a text label. */
.week-grid{gap:14px}.day-column{padding:18px 14px;background:var(--card);border-top:3px solid #466c9b;min-height:0}
.day-column:nth-child(2n){border-top-color:#326575}.day-column:nth-child(3n){border-top-color:#72829a}
.day-column .eyebrow{font-size:13px}.day-column h3{font-size:16px;font-weight:500;color:var(--petroleum);margin:7px 0 18px}
.day-column>p,.calendar-event small,.calendar-event a{font-size:14px}
.calendar-event{border:1px solid var(--line);background:var(--soft);border-radius:9px;padding:13px 10px;gap:12px;margin:10px 0}
.calendar-event strong{font-size:16px;font-weight:500;line-height:1.4}.calendar-event .activity-state{padding:0;background:transparent;font-size:14px}
.calendar-event .activity-actions{margin-top:3px}.calendar-event .activity-actions button,.calendar-event .activity-actions a.button{padding-left:7px;padding-right:7px;font-size:14px}
.calendar-event .activity-actions .quiet{line-height:1.4;height:auto;min-height:48px}
.calendar-event[data-state=late]{border-left:3px solid #a64b5a}
.calendar-event[data-state=future]{background:var(--bg)}.calendar-event[data-state=completed]{border-left:3px solid #1f6538}.calendar-event[data-state=completed] .activity-state{color:#1f6538}html[data-theme=dark] .calendar-event[data-state=completed]{border-left-color:#b9e8c5}html[data-theme=dark] .calendar-event[data-state=completed] .activity-state{color:#b9e8c5}
.week-nav{font-size:14px}.planner-days select{font-size:16px}.schedule-exception{margin:22px 0;padding:18px;border:1px solid var(--line);border-radius:10px}
.schedule-exception summary{font-size:16px;font-weight:500}.schedule-exception p{font-size:14px;color:var(--muted)}
@media(max-width:1150px){.topbar-inner{gap:16px}.header-search{max-width:240px}.account-menu-label{display:none}.kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.detail-grid{grid-template-columns:1fr 1fr}.ranking-panel{grid-column:1/-1}.week-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.auth-grid{gap:32px}.rank-avatar{display:grid}}
@media(max-width:900px){.header-search{order:3;flex-basis:100%;max-width:none}.topbar-inner{flex-wrap:wrap}.header-actions{margin-left:auto}.auth-art h1{font-size:30px}.activity-row{grid-template-columns:minmax(0,1fr) 225px;gap:18px}}
@media(max-width:760px){
 .topbar-inner{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px auto;gap:10px 12px;padding:10px 16px}
 .brand,.brand img{width:168px;height:102px}.brand{grid-column:1;grid-row:1}
 .header-actions{display:contents}.notifications-menu{grid-column:2;grid-row:1}.account-menu{grid-column:3;grid-row:1}
 .header-actions>form:last-child{grid-column:4;grid-row:1;margin:0}.logout{padding:8px 4px;font-size:14px}
 .preferences{grid-column:1/-1;grid-row:2;display:flex;width:100%;justify-content:space-between;margin:0;gap:12px}
 .preferences label{flex:1}.preferences select{font-size:16px;width:100%;max-width:none;border:1px solid var(--line);border-radius:9px;padding:8px 12px}
 .preferences .icon-button{width:48px!important;min-height:48px!important;height:48px}
 .header-search{grid-column:1/-1;grid-row:3;margin:0}.header-search input{min-height:48px;height:48px;font-size:16px}
 .header-popover>summary{min-height:44px}.account-avatar{width:38px;height:38px;font-size:14px}
 .popover-content,.account-menu .sidebar{top:84px;right:16px;max-height:70vh;width:min(340px,calc(100vw - 32px))}
 .account-menu .sidebar a{font-size:16px}.preference-error{top:55px;width:100%;font-size:14px}
 .shell main{padding:26px 16px 40px}.heading h1{font-size:28px}.heading p{font-size:16px}.card{padding:20px}
 .section-heading h2{font-size:20px}.section-heading{flex-wrap:wrap}.greeting-pills{flex-wrap:wrap}
 .date-chip,.streak-chip{font-size:14px}.kpi-grid{grid-template-columns:1fr 1fr;gap:12px}.kpi-card{padding:16px;min-height:132px;flex-wrap:wrap}
 .kpi-label{font-size:13px}.kpi-value{font-size:30px}.kpi-value small{font-size:14px}.kpi-grid .kpi-card:last-child{min-height:100px;align-items:center}
 .kpi-card .kpi-icon{width:32px;height:32px}.overview-grid,.detail-grid,.two-columns{grid-template-columns:1fr}.ranking-panel{grid-column:auto}
 .recent-copy strong{font-size:16px}.recent-copy small{font-size:14px}.rank-entry,.rank-entry>strong{font-size:15px}
 .milestone strong,.milestone>span:last-child{font-size:14px}.stat-grid .stat>span:not(.kpi-icon){font-size:13px;max-width:none;padding-right:0}
 .stat-grid .stat{min-height:142px}.stat-grid .stat .kpi-icon{top:auto;bottom:17px}.tabs{gap:14px;flex-wrap:wrap;justify-content:flex-start}.tabs a{font-size:15px}
 .week-grid{grid-template-columns:1fr}.day-column:last-child{grid-column:auto}.day-column h3{font-size:17px}.calendar-event{padding:16px}
 .calendar-event strong{font-size:16px}.calendar-event small,.calendar-event a{font-size:14px}.calendar-event .activity-actions button,.calendar-event .activity-actions a.button{font-size:16px}
 .auth-grid{display:block;margin:8px auto 30px;max-width:490px}.auth-art{display:flex;flex-direction:row;align-items:center;gap:18px;margin:0 0 26px;padding:0}
 .auth-photo{width:122px;flex:0 0 122px;aspect-ratio:1.18;border-radius:12px}.auth-copy{padding:0}.auth-art h1{font-size:24px;margin:0 0 8px}.auth-art p{font-size:14px;line-height:1.5}
 .auth-form{padding:24px 20px}.auth-form h1{font-size:28px}.auth-form>p,.auth-links{font-size:15px}.auth-form label,.auth-form .check{font-size:16px}
 .activity-filters{grid-template-columns:1fr;gap:16px}.activity-filters button{width:100%}
 .activity-row{grid-template-columns:1fr;gap:20px;padding:20px}.activity-row h2{font-size:20px}.activity-meta{gap:8px 14px}
 .activity-actions .primary{height:48px}.activity-actions .quiet{font-size:15px}.activity-summary{align-items:flex-start;flex-direction:column;gap:8px}
 .footer-inner,.preview-label,.small{font-size:14px}.footer-inner{gap:16px}.footer-inner>div{flex-wrap:wrap}.planner-days select{font-size:16px}
}
@media(max-width:380px){.topbar-inner{column-gap:8px}.auth-photo{width:104px;flex-basis:104px}.auth-art{gap:14px}.auth-art h1{font-size:22px}.kpi-card{padding:14px}.kpi-card .kpi-icon{width:29px;height:29px}}

/* Keep academic-day content and its action inside narrow report viewports. */
@media(max-width:760px){
 [data-academic-report] article.ledger-row[data-academic-day]{min-width:0;flex-wrap:wrap;align-items:flex-start}
 [data-academic-report] article.ledger-row[data-academic-day]>div{flex:1 1 100%;min-width:0;max-width:100%;overflow-wrap:anywhere}
 [data-academic-report] article.ledger-row[data-academic-day]>button[data-academic-detail-open]{flex:0 1 auto;min-width:0;max-width:100%;margin-inline-start:auto;white-space:normal;overflow-wrap:anywhere}
}
#quiz-dialog #quiz-close{color:#b12929;border-color:#e15959;background:#fff1f1}html[data-theme=dark] #quiz-dialog #quiz-close{color:#ffbcbc;border-color:#e15959;background:#39222a}

/* Keep a keyboard-focused embedded activity frame visible in both themes. */
#quiz-dialog iframe[data-keyboard-focus="true"]{outline:3px solid var(--focus);outline-offset:3px}

/* REF-20261011-08/09: preserve each status label and distinguish completion visually. */
[data-academic-report] article[data-academic-day][data-status]:not([data-status="completed_on_time"]):not([data-status="completed_late"]) .pill {
    color: #4b5563;
    background: #eef1f4;
    border: 1px solid #d5dbe2;
}
[data-academic-report] article[data-academic-day][data-status="completed_on_time"] .pill,
[data-academic-report] article[data-academic-day][data-status="completed_late"] .pill {
    color: #1f6538;
    background: #e6f4ea;
    border: 1px solid #b7d9c0;
}
html[data-theme=dark] [data-academic-report] article[data-academic-day][data-status]:not([data-status="completed_on_time"]):not([data-status="completed_late"]) .pill {
    color: #d0d6de;
    background: #303943;
    border-color: #4b5662;
}
html[data-theme=dark] [data-academic-report] article[data-academic-day][data-status="completed_on_time"] .pill,
html[data-theme=dark] [data-academic-report] article[data-academic-day][data-status="completed_late"] .pill {
    color: #b9e8c5;
    background: #20392a;
    border-color: #467653;
}



/* Keep a long result title within the activity dialog on narrow screens. */
#quiz-dialog #quiz-content p.result {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}


/* Keep the modal and its children inside the visible small viewport. The report
   capture observed a 422px layout viewport for a configured 390px mobile view. */
#quiz-dialog {
    box-sizing: border-box;
    min-width: 0;
    width: min(900px, calc(100svw - 24px));
    max-width: calc(100svw - 24px);
}
#quiz-dialog #quiz-title,
#quiz-dialog #quiz-content,
#quiz-dialog #quiz-status {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}
#quiz-dialog #quiz-content > *,
#quiz-dialog #quiz-content iframe {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
}


/* Keep long attempt titles and result actions within the measured quiz content width. */
#quiz-dialog #quiz-title {
    overflow-wrap: anywhere;
}
#quiz-dialog #quiz-content button,
#quiz-dialog #quiz-content a.button {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

/* Keep activity cards inside the mobile content grid without clipping labels. */
@media(max-width:760px){
 .activity-row{grid-template-columns:minmax(0,1fr)}
 .activity-row>.activity-copy,.activity-row>.activity-actions{min-width:0;max-width:100%}
 .activity-row .activity-copy>*,
 .activity-row .activity-copy .activity-meta>*,
 .activity-row .activity-copy .activity-details>*,
 .activity-row .activity-actions>*{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal}
}


/* Keep authored activity block headings inside the mobile quiz content width.
   R971 measured #quiz-content .studio-block > h3 at 332px client / 358px scroll. */
#quiz-dialog #quiz-content .studio-block > h3 {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}


/* Keep long Studio library titles and their links inside the mobile content width. */
@media(max-width:760px){
 .studio-library-row{box-sizing:border-box;min-width:0;align-items:flex-start;flex-wrap:wrap}
 .studio-library-row>div:first-child,.studio-library-row>div:last-child{box-sizing:border-box;flex:1 1 100%;min-width:0;max-width:100%;overflow-wrap:anywhere}
 .studio-library-row>div:last-child>a{white-space:normal;overflow-wrap:anywhere}
}


/* Keep the real Studio preview headings inside the mobile page width.
   R1207 measured a 599px layout viewport for requested 390px and 320px
   previews with long, unbroken synthetic titles. */
@media(max-width:760px){
 .studio-preview-heading{min-width:0;align-items:flex-start}
 .studio-preview-heading>div:first-child{min-width:0;max-width:100%}
 .studio-preview-heading h1{box-sizing:border-box;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
 .studio-preview-composition,.studio-preview-composition>.studio-block{box-sizing:border-box;min-width:0;max-width:100%}
 .studio-preview-composition>.studio-block>h2{box-sizing:border-box;min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:normal}
}

/* Keep the 1.5-times approved brand and 44px notification/account controls
   together on narrow screens; put the full-text sign-out on its own row. */
@media(max-width:480px){
 .topbar-inner{grid-template-columns:minmax(168px,1fr) 44px 44px}
 .header-actions>form:last-child{grid-column:1;grid-row:2;justify-self:start;margin:0}
 .preferences{grid-column:1/-1;grid-row:3}
 .header-search{grid-column:1/-1;grid-row:4}
}


/* Keep the version source pill inside the preview content width. */
.studio-preview-composition ~ p.pill{box-sizing:border-box;max-width:100%;overflow-wrap:anywhere;white-space:normal}
/* Keep the account summary and sign-out control at least 44px high/wide. */
.topbar-inner .account-menu>summary{min-height:44px}
.topbar-inner .logout{min-width:44px}


/* Keep the measured mobile KPI grid within its 358px content column.
   R1478 observed a 292.641px + 109.297px intrinsic grid split while the
   visible “No assessments” value remained nowrap; the page expanded to 430px. */
@media(max-width:760px){
 .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
 .kpi-grid>.kpi-card{box-sizing:border-box;min-width:0;max-width:100%}
 .kpi-grid>.kpi-card>*{min-width:0;max-width:100%}
 .kpi-grid .kpi-value{min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .kpi-grid .kpi-value small{white-space:normal;overflow-wrap:anywhere}
}
/* Keep the empty average status readable without using the numeric KPI size. */
.kpi-grid .kpi-value-empty{font-size:16px;line-height:1.45}

/* Keep the stacked dashboard detail cards within the mobile grid track. */
@media(max-width:760px){.detail-grid{grid-template-columns:minmax(0,1fr)}.detail-grid>.card{min-width:0}}


/* Constrain the two-column dashboard detail grid at tablet widths. */
@media(min-width:761px) and (max-width:1150px){
  .detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .detail-grid>.card{min-width:0}
}


/* Let the mobile activity title wrap inside the today strip. */
@media(max-width:760px){
  .today-strip>div{width:100%;min-width:0}
  .today-strip strong{overflow-wrap:anywhere}
}


/* Keep the prepared video frame fully visible in short landscape modal viewports. */
@media (orientation: landscape) and (max-height: 500px) {
    #quiz-dialog {
        max-height: calc(100svh - 16px);
        padding: 8px 16px;
    }
    #quiz-dialog .dialog-top {
        top: -8px;
        padding: 0;
    }
    #quiz-dialog #quiz-title {
        margin: 8px 0;
    }
    #quiz-dialog #quiz-status {
        margin: 4px 0 0;
    }
    #quiz-dialog #quiz-content iframe.video {
        display: block;
        width: min(100%, calc((100svh - 150px) * 16 / 9));
        height: auto;
        aspect-ratio: 16 / 9;
    }
}


/* Keep Studio draft actions inside the card on narrow screens. */
@media(max-width:760px){
 .studio-draft-row{align-items:stretch;flex-direction:column;min-width:0}
 .studio-draft-row>:first-child{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .studio-draft-row>.button-row{align-items:stretch;box-sizing:border-box;width:100%;min-width:0;max-width:100%}
 .studio-draft-row>.button-row>a,.studio-draft-row>.button-row>form{box-sizing:border-box;width:100%;min-width:0;max-width:100%}
 .studio-draft-row>.button-row>form>button{box-sizing:border-box;width:100%;min-width:44px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
}

/* Keep weekly publication result headings and generated day titles within their scoped container. */
.weekly-publication-result-heading,
.weekly-publication-result {
    min-width: 0;
}
.weekly-publication-result-heading > div {
    min-width: 0;
    max-width: 100%;
}
.weekly-publication-result-heading > a {
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.weekly-publication-result-heading h1,
.weekly-publication-result-heading p {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}
.weekly-publication-result .action-row {
    box-sizing: border-box;
    min-width: 0;
    flex-wrap: wrap;
    align-items: flex-start;
}
.weekly-publication-result .action-row > div {
    box-sizing: border-box;
    flex: 1 1 16rem;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.weekly-publication-result .action-row > div > strong {
    overflow-wrap: anywhere;
    word-break: normal;
}
.weekly-publication-result .action-row > label {
    box-sizing: border-box;
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.weekly-publication-result .action-row > label > input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
}
.weekly-publication-result .action-row > button {
    box-sizing: border-box;
    min-width: 44px;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}
.weekly-publication-result form {
    min-width: 0;
    max-width: 100%;
}
.weekly-publication-result form .check {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.weekly-publication-result form .check input {
    min-width: 44px;
    min-height: 44px;
}
.weekly-publication-result form button {
    box-sizing: border-box;
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .weekly-publication-result-heading > div,
    .weekly-publication-result-heading > a,
    .weekly-publication-result-heading h1,
    .weekly-publication-result-heading p {
        width: 100%;
    }
    .weekly-publication-result .action-row {
        align-items: stretch;
        flex-direction: column;
    }
    .weekly-publication-result .action-row > div,
    .weekly-publication-result .action-row > label,
    .weekly-publication-result .action-row > button {
        box-sizing: border-box;
        flex: 0 1 auto;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .weekly-publication-result .action-row > button {
        min-height: 44px;
    }
    .weekly-publication-result form .check {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }
    .weekly-publication-result form .check input {
        flex: 0 0 44px;
    }
    .weekly-publication-result form button {
        width: 100%;
    }
}

/* Keep long academic-detail values inside narrow report dialogs. */
[data-academic-detail-content] dd {
    overflow-wrap: anywhere;
}

/* COMP-04: keep inactive dialog markup hidden in browsers without native dialog support. */
#quiz-dialog:not([open]){display:none}
/* The same activity renderer runs in ordinary document flow when showModal is unavailable. */
#activity-page{max-width:900px;margin:0 auto}
#activity-page .dialog-top{position:static;top:auto}
#activity-page #quiz-title,#activity-page #quiz-content,#activity-page #quiz-status,#activity-page #quiz-content>*{min-width:0;max-width:100%;overflow-wrap:anywhere}

/* Keep real passkey labels, fields and action aligned in one bounded column. */
[data-passkey-management] .form-grid{grid-template-columns:minmax(0,1fr);max-width:40rem;gap:8px;min-width:0}
[data-passkey-management] .form-grid>label{margin-bottom:0}
[data-passkey-management] .form-grid>input{min-width:0;margin-bottom:8px}
[data-passkey-management] .form-grid>[data-passkey-register]{justify-self:stretch;width:100%}

/* Keep real guardian child names inside their existing mobile text slots.
   R7840 identified intrinsic text overflow; preserve all text and controls. */
@media(max-width:760px){
 body[data-context="guardian"] .child-picker .child-card>span:last-child{flex:1;min-width:0;overflow-wrap:anywhere}
 body[data-context="guardian"] .shell main>section.card>.eyebrow{overflow-wrap:anywhere}
}

/* AUTH02: wrap the full setup key inside its existing card without shrinking text. */
.totp-setup-secret{display:inline-block;max-width:100%;overflow-wrap:anywhere;white-space:normal}
