.mq-copyright {
  display:block;
  flex:0 0 auto;
  margin:0;
  color:#9aa3af;
  background:#fff;
  font:400 9px/12px system-ui,sans-serif;
  text-align:center;
}
#v1-bottom {
  grid-template-columns:repeat(5,minmax(0,1fr));
  margin-block-start:auto;
  padding:4px max(clamp(3px,1vw,14px),env(safe-area-inset-right)) 0 max(clamp(3px,1vw,14px),env(safe-area-inset-left));
  gap:clamp(2px,1vw,12px);
}
#v1-bottom a {
  --nav-icon-size:clamp(32px,4.8dvh,42px);
  /* Text, icon, gap and top edge fit in the first 90% of the button. */
  --nav-button-height:max(clamp(45px,8dvh,79px),calc((1.2em + var(--nav-icon-size) + 4px) / .90));
  min-width:0;
  min-height:var(--nav-button-height);
  font-size:clamp(11px,1.8vw,17px);
  justify-content:flex-end;
  gap:2px;
  padding:1px 1px calc(var(--nav-button-height) / 10 - 1px);
}
#v1-bottom a svg {
  width:var(--nav-icon-size);
  height:var(--nav-icon-size);
  flex:none;
}
@container(min-width:620px) {
  #v1-bottom a {--nav-icon-size:clamp(32px,5.7dvh,54px)}
}
@media(max-height:480px) {
  #v1-bottom a {--nav-icon-size:24px}
}
#v1-bottom a b{font-size:inherit}

[data-program-candidates]{border:1px solid #c6bddb;border-radius:12px;padding:10px;color:#192643}
[data-program-candidates] h3{margin:8px 0 3px;font-size:15px}
[data-program-candidates] label{display:flex;gap:8px;padding:6px 0;font-size:14px;align-items:baseline}
.mq-pager{flex:none;display:flex;align-items:center;justify-content:center;gap:7px;padding:3px;background:#f5f2fb;color:#33265e;font:600 12px/1.2 system-ui}
.mq-pager button,.mq-pager select{min-height:30px;min-width:45px;border:1px solid #c6bddd;border-radius:8px;background:white;color:inherit;padding:3px 9px}
.mq-pager select{max-width:34%}.mq-pager button:disabled{opacity:.45}
@media(max-width:600px){.q-header-actions{gap:3px}.mq-wordmark strong{font-size:15px}}
.mq-finish-cup{position:absolute;right:0;bottom:3px;transform:translateX(50%);font-size:15px!important;line-height:1}
.q13-runner .mq-win{display:inline-block;position:relative;font-size:18px;line-height:1}
.mq-win i{position:absolute;bottom:56%;left:-16%;font-size:12px;font-style:normal}
.mq-dashboard .q12-ticks{align-items:center;line-height:1.15}
.mq-dashboard .q12-ticks strong{color:#24213c;font-size:clamp(10px,1.65vw,16px)}
.mq-ranking{display:grid;list-style:none;margin:0;padding:0;gap:4px}
.mq-ranking .mq-weak-stat{margin:0;min-height:29px;padding:4px 7px;line-height:1.3}
.mq-ranking .mq-weak-stat i{display:grid;place-items:center;min-width:1.5em;height:1.5em;padding:0;font-weight:bold}
.mq-ranking .mq-weak-stat span{white-space:normal;overflow-wrap:anywhere}
.mq-ranking .mq-weak-stat b{flex:none;font-size:.82em}
.mq-empty-line{margin:4px 0;color:#53617a;font-size:13px}
.mq-recent{min-height:32px}
.mq-dashboard .mq-trend{min-height:138px}
.mq-dashboard .mq-next{min-height:47px}
/* MQ header */
body.v1-active .q-header{background:#edf4fc;color:#152f58;border:1px solid #8aa9ce;border-top:2px solid #315782;border-radius:18px 18px 0 0}
body.v1-active .q-header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:auto;align-items:center;width:100%;height:auto;min-height:0;padding:6px max(12px,env(safe-area-inset-right)) 7px max(12px,env(safe-area-inset-left));gap:clamp(4px,1vw,10px)}
body.v1-active .q-header .q-brand{justify-self:start;color:#132f58;gap:9px;min-width:0;white-space:nowrap}
body.v1-active .q-header .q-brand .mq-app-icon{width:40px;height:40px;border-radius:9px}
.q-header .mq-wordmark strong{font:bold clamp(18px,2.8vw,26px)/1.05 system-ui,sans-serif}
.q-header .mq-wordmark small{font:bold clamp(11px,1.5vw,15px)/1.05 Arial,sans-serif;letter-spacing:.045em}
.q-header .mq-header-help,.q-header .mq-header-action{display:inline-flex;justify-content:center;align-items:center;gap:7px;color:#183b67;background:#f6faff;border:1px solid #9cb9dd;border-radius:11px;text-decoration:none;font:700 15px/1.1 system-ui,sans-serif;min-width:0}
.q-header .mq-header-help{padding:4px 11px;text-align:center;min-height:38px;font-size:12px;justify-self:end}
.q-header .mq-header-help svg,.q-header .mq-header-action svg{width:18px;height:18px}
.q-header .mq-header-action{min-height:38px;padding:4px 8px;box-shadow:0 1px 2px #2035541b}
.mq-tools-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mq-tools-grid a{text-decoration:none;text-align:center}
.mq-import-primary{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:8px 18px;min-height:48px;background:#175db8;color:white;border:1px solid #124e9e;border-radius:12px;font:700 16px/1.2 system-ui;cursor:pointer}
.mq-dashboard .mq-weak-stat{border:0;border-radius:7px;background:#fff0e6;cursor:pointer}
.mq-ranking .mq-weak-stat span{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mq-recent small,.mq-recent>b,.mq-weak-stat>b{white-space:nowrap;flex:none}
.mq-recent .mq-session-label{display:flex;flex-wrap:wrap;gap:0 .35em;min-width:0;align-items:baseline}
.mq-session-label em,.mq-session-label strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:inherit}
.mq-session-label strong{font-weight:650}.mq-session-label [data-short]{display:none}
.mq-question-dialog [hidden],.mq-report-dialog [hidden],.mq-tools-grid [hidden]{display:none!important}
@media(max-width:600px){
 .v1-list-heading:has(.mq-import-primary){flex-direction:column;align-items:stretch;gap:4px}
 .mq-import-primary{width:100%}
 .mq-session-label [data-long]{display:none}.mq-session-label [data-short]{display:inline}
 .mq-recent .mq-session-label{display:grid;gap:0;line-height:1.18}.mq-session-label em{font-size:.85em}
}
@media(max-width:369px){
 body.v1-active .q-header-inner{padding-inline:7px}
 .q-header .mq-header-action{font-size:13px;gap:3px}
 .q-header .mq-wordmark strong{font-size:18px!important}
}
@media(max-height:490px) and (orientation:landscape){
 body.v1-active .q-header-inner{padding-block:2px;gap:2px}.q-header .mq-header-action{min-height:30px}
 body.v1-active .q-header .q-brand .mq-app-icon{height:29px;width:29px}.q-header .mq-header-help{min-height:28px;font-size:10px}
}

.mq-local-notes{display:grid;gap:12px;overflow:auto;align-content:start;min-height:0;padding:2px}
.mq-local-notes article{display:grid;gap:6px}
.mq-local-notes h2,.mq-local-notes h3,.mq-local-notes p{margin:0}
.mq-note-text{white-space:pre-wrap;overflow-wrap:anywhere}
.mq-local-notes details summary{cursor:pointer}
.mq-note-form{display:grid;gap:10px}
.mq-note-form input,.mq-note-form textarea{display:block;width:100%;box-sizing:border-box;padding:8px;font:inherit}

/* Keep the five home sections in reading and keyboard order. */
body.v1-active[data-mqpage=home] #app{padding:clamp(4px,1vh,12px) clamp(6px,1.8vw,24px)}
body[data-mqpage=home] .v1-screen{min-height:0;padding:0;gap:clamp(3px,.65dvh,9px);overflow:auto}
body[data-mqpage=home] .v1-heading{flex:none;min-height:32px;padding:0;align-items:center}
body[data-mqpage=home] .v1-heading>.mq-home-tools{display:flex;gap:clamp(9px,2vw,18px);align-items:center;margin-left:auto}
.mq-home-tools button{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:3px clamp(5px,1.2vw,15px);min-height:32px;border:1px solid #b8b1eb;border-radius:8px;background:#faf9ff;color:#42348d;font:650 clamp(.76rem,1.82vw,1.05rem)/1.2 system-ui;white-space:nowrap}
.mq-home-tools button svg{width:1.1em;height:1.1em}
.mq-dashboard{display:grid;flex:1 0 auto;align-content:start;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(4.5rem,1fr) auto auto auto;grid-template-areas:"stats" "trend" "rank" "history" "next";gap:clamp(3px,.75dvh,10px);overflow:visible}
.mq-dashboard>.mq-dash-stats{grid-area:stats;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);align-items:stretch;gap:clamp(4px,1vw,16px);padding:clamp(4px,.7dvh,12px)}
.mq-month-progress{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.04fr);align-items:center;gap:clamp(3px,.6vw,10px);min-width:0;container-type:inline-size}
.mq-dashboard .mq-ring{width:min(100%,24dvh);max-width:100%}
.mq-dashboard .mq-ring>span{font-size:clamp(9px,7.25cqi,1.55rem);line-height:1.15;white-space:nowrap}
.mq-dashboard .mq-ring b{font-size:clamp(11px,calc(43cqi / (var(--digits) + .65)),4rem);line-height:1.13}
.mq-dashboard .mq-goals{min-width:0;gap:0}
.mq-dashboard .mq-goals>div{display:grid;gap:.14em;line-height:1.12;font-size:clamp(11px,7.7cqi,1.65rem);padding:clamp(4px,2.3cqi,12px) 0}
.mq-dashboard .mq-goals span,.mq-dashboard .mq-goals b{white-space:nowrap}
.mq-dashboard .mq-goals b{font-size:clamp(16px,11.4cqi,2.5rem);margin:0}
.mq-dashboard[data-trend-open=false]{flex:0 0 auto;grid-template-rows:auto auto auto auto auto}
.mq-dashboard .mq-trend h2{margin:0}
.mq-dashboard .mq-trend h2 [data-toggle-trend]{display:flex;align-items:center;gap:.45em;width:100%;min-height:26px;margin:0;padding:2px 0;text-align:left;font:inherit;color:inherit;cursor:pointer}
[data-toggle-trend]>span{font-size:.85em;color:#6844ac}
#mq-trend-content[hidden]{display:none}
#mq-trend-content{display:flex;flex-direction:column;flex:1;min-height:0;gap:3px}
.mq-dashboard [data-expand-level]{cursor:zoom-in}
.mq-dashboard .mq-level{height:auto;min-height:0;padding:clamp(4px,.65vh,9px);gap:2px}
.mq-dashboard .mq-level>b{font-size:clamp(1.16rem,3.85vw,1.95rem);line-height:1.1}
.mq-dashboard .mq-level>small,.mq-dashboard .mq-level>span:not(.q13-course){font-size:clamp(.69rem,1.85vw,1rem);line-height:1.15}
.mq-dashboard .q13-course{margin:16px auto 1px}
.mq-dashboard .q12-ticks{align-items:center;line-height:1.15}
.mq-dashboard .q12-ticks strong{font-size:clamp(.64rem,1.8vw,1.05rem);color:#24213c}
.mq-dashboard .mq-dash-panel{padding:clamp(4px,.7dvh,11px) clamp(6px,1.3vw,17px);min-height:0}
.mq-dashboard .mq-dash-panel h2{margin:0 0 3px;flex-wrap:nowrap;line-height:1.12;font-size:clamp(.94rem,2.2dvh,1.5rem)}
.mq-dashboard .mq-dash-panel h2 svg{width:1.1em;height:1.1em}
.mq-dashboard .mq-dash-panel h2 button{font-size:clamp(.71rem,1.65dvh,1.05rem);padding:2px 1px}
.mq-dashboard>.mq-trend{grid-area:trend;min-height:0}
.mq-dashboard .mq-segment{flex:none}
.mq-dashboard [data-trend-plot]{min-height:1.7rem}
.mq-dashboard [data-trend-plot] svg,.mq-dashboard .mq-chart-empty{position:absolute;inset:0;width:100%;height:100%}
.mq-dashboard>.mq-rank-panel{grid-area:rank}
.mq-dashboard>.mq-history-panel{grid-area:history}
.mq-dashboard .mq-dash-list{overflow:visible}
.mq-dashboard .mq-ranking{gap:2px}
.mq-dashboard .mq-recent,.mq-dashboard .mq-weak-stat{min-height:24px;font-size:clamp(.81rem,1.78dvh,1.13rem);padding-block:2px;line-height:1.12}
.mq-dashboard .mq-empty-line,.mq-dashboard .mq-dash-list>p{margin:1px 0;line-height:1.22;font-size:clamp(.81rem,1.8dvh,1.14rem)}
.mq-dashboard>.mq-next{grid-area:next;display:grid;grid-template-columns:max-content minmax(0,1fr) max-content;align-items:center;gap:3px .55em;min-height:39px;padding:4px 8px}
.mq-dashboard .mq-next>span,.mq-dashboard .mq-next button{max-width:none;white-space:nowrap;font-size:clamp(.84rem,1.81dvh,1.16rem)}
.mq-dashboard .mq-next>b{font-size:clamp(.89rem,2dvh,1.3rem)}
.mq-dashboard .mq-next button{min-height:28px}
@media(max-width:36em){
 .mq-dashboard>.mq-next{grid-template-columns:minmax(0,1fr) max-content;grid-template-areas:"label action" "title title"}
 .mq-next>span{grid-area:label}.mq-next>button{grid-area:action}
 .mq-dashboard .mq-next>b{grid-area:title;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;white-space:normal;overflow-wrap:anywhere;line-height:1.15}
}
@media(max-width:429px){
 body.v1-active .q-header-inner{padding-inline:5px;gap:4px}
 body.v1-active .q-header .q-brand{gap:4px}
 body.v1-active .q-header .q-brand .mq-app-icon{width:31px;height:31px}
 .q-header .mq-wordmark strong{font-size:15px!important}
 .q-header .mq-wordmark small{font-size:10px}
 .q-header .mq-header-help,.q-header .mq-header-action{gap:3px;padding-inline:4px}
 .q-header .mq-header-help{font-size:11px}
 .q-header .mq-header-action{font-size:13px}
 .mq-home-tools button svg{display:none}
}
@media(min-width:48em) and (orientation:landscape),(min-width:64em){
 .mq-dashboard{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(7rem,1fr) auto auto auto;grid-template-areas:"stats trend" "stats rank" "history history" "next next"}
}
@media(max-height:800px),(max-height:850px) and (max-width:575px){
 .mq-dashboard .mq-ranking>li:nth-child(n+3),.mq-dashboard .mq-dash-list>.mq-recent:nth-child(n+4){display:none}
}
@media(max-height:690px){
 .mq-dashboard .mq-ranking>li:nth-child(n+2),.mq-dashboard .mq-dash-list>.mq-recent:nth-child(n+3){display:none}
}
@media(max-height:590px){
 .mq-dashboard .mq-dash-list>.mq-recent:nth-child(n+2){display:none}
}
@media(orientation:landscape) and (max-height:550px) and (min-width:550px){
 .mq-dashboard{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(4.6rem,1fr) auto auto auto;grid-template-areas:"stats trend" "stats rank" "history history" "next next"}
 .mq-dashboard .mq-ring{width:min(100%,22dvh)}
 .mq-dashboard .mq-level{gap:1px;padding:2px}
 .mq-dashboard .q13-course{margin-top:13px}
 .mq-dashboard .mq-next{grid-template-columns:max-content minmax(0,1fr) max-content;grid-template-areas:none}
 .mq-dashboard .mq-next>*{grid-area:auto}
}
/* Match the two authoring controls without narrowing the import button in practice. */
.mq-create [data-config-row=exportType]{grid-template-columns:minmax(max-content,1fr) max-content;gap:8px}
.mq-create [data-config-row=exportType]>span:first-child{white-space:nowrap}
.mq-create [data-config-row=exportType] .mq-select{width:clamp(5.2rem,19vw,8rem)}
.mq-create .is-author .mq-split,.mq-create>.mq-import{width:85%;margin-inline:auto}
.mq-create .mq-split{grid-template-columns:minmax(0,1fr) max(42px,18%)}
.mq-create .mq-split button,.mq-create>.mq-import{min-height:42px;line-height:1.15;gap:clamp(3px,1vw,12px)}
.mq-create .mq-capsule-icon{font-size:clamp(18px,4vw,27px);line-height:1}

.v1-side-actions:has([data-nav=questionHistory]){display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
@media(orientation:landscape) and (max-height:450px) and (min-width:550px){
 body.v1-active[data-mqpage=home] #app{padding-block:2px}
 .mq-dashboard .mq-level>b{font-size:18px}
 .mq-dashboard .mq-level>small,.mq-dashboard .q12-ticks span,.mq-dashboard .q12-ticks strong{font-size:10px}
 .mq-dashboard .q13-course{margin-top:12px}
 .mq-dashboard .mq-dash-panel{padding-block:3px}
}

.v1-resume{display:grid;grid-template-columns:minmax(0,1fr) max-content}
.v1-resume b{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.v1-resume button{white-space:nowrap}

.mq-paste{display:grid;gap:6px}
.mq-paste-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.mq-paste-head label{margin:0;font-size:14px;font-weight:650}
.mq-paste .mq-paste-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:36px}
.mq-paste-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px}
.mq-paste-actions button{min-height:40px}
.mq-paste-actions .mq-paste-button{margin-inline-start:auto;min-height:40px}
.mq-paste textarea{display:block;min-width:0;min-height:4em;font-size:16px}
.mq-paste-feedback{margin:0;font-size:13px}
.mq-paste-feedback:empty{display:none}
.v1-audio-script summary{width:fit-content;padding:6px 0;min-height:32px}
.v1-audio-script .mq-font-control{width:fit-content;margin:4px 0}

@media(min-width:48em) and (orientation:landscape),(min-width:64em),(min-width:550px) and (max-height:550px) and (orientation:landscape){
 .mq-dashboard[data-trend-open=false]{grid-template-rows:max-content auto auto auto}
}
.mq-level-dialog{width:min(92vw,45rem);max-height:92dvh}
.mq-level-dialog .mq-close{width:auto;min-width:4em;min-height:36px;padding:4px 10px;font:600 14px/1.3 system-ui}
.mq-level-dialog .mq-dialog-body{display:grid;gap:10px;padding:clamp(8px,2vmin,20px)}
.mq-level-dialog .mq-level-detail{gap:clamp(5px,1.1dvh,12px);padding:clamp(12px,3.5vmin,32px);text-align:center;line-height:1.25}
.mq-level-detail>b{font-size:clamp(32px,8vmin,68px);line-height:1.1;overflow-wrap:anywhere}
.mq-level-detail>small,.mq-level-detail>span:not(.q13-course){font-size:clamp(14px,3.7vmin,24px)}
.mq-level-detail .q13-course{width:88%;height:8px!important;margin:clamp(25px,5dvh,46px) auto 5px}
.mq-level-detail .q13-runner,.mq-level-detail .mq-finish-cup,.mq-level-detail .mq-win{font-size:clamp(25px,5vmin,40px)!important}
.mq-level-detail .mq-win i{font-size:.65em}
.mq-level-detail .q12-ticks{width:100%;align-items:center;gap:6px}
.mq-level-detail .q12-ticks span{font-size:clamp(12px,3vmin,20px)}
.mq-level-detail .q12-ticks strong{font-size:clamp(13px,3.25vmin,22px);color:#292141}
.mq-level-dialog .mq-dialog-body>[data-nav=settings]{justify-self:center;min-height:38px;padding:5px 15px}

.mq-task-heading{display:flex;align-items:center;gap:clamp(4px,1vw,12px);margin-block-end:3px}
.mq-dashboard .mq-task-heading h2{margin:0;flex:none}
.mq-task-heading [data-task-picker]{min-width:0;flex:1}
.mq-task-heading [data-all-ranks]{flex:none;border:0;background:transparent;color:#624098;padding:3px 0;font:700 clamp(.71rem,1.65dvh,1.05rem)/1.2 system-ui;cursor:pointer}
.mq-task-filter{display:inline-flex;align-items:center;gap:.4em;color:#413b56;max-width:100%;font:600 clamp(.72rem,1.6dvh,1rem)/1.2 system-ui}
.mq-task-filter span{white-space:nowrap}
.mq-task-filter select{min-width:0;max-width:12em;flex:0 1 auto;border:1px solid #bcb1d6;border-radius:7px;background:#fbf9ff;color:#453173;padding:3px 2px;font:inherit}
.mq-task-heading .mq-task-filter select{width:8.2em}
.mq-dialog-body [data-task-picker]{margin-block-end:10px}
.mq-dialog-body .mq-ranking .mq-weak-stat span{white-space:normal}
.mq-dashboard .mq-recent small,.mq-dashboard .mq-recent>b{font-size:.91em}
@media(max-width:430px),(orientation:landscape) and (max-width:850px){
 .mq-task-heading .mq-task-filter span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
@media(max-height:650px){
 body.v1-active[data-mqpage=home] #app{padding-block:2px}
 body[data-mqpage=home] .v1-screen,.mq-dashboard{gap:3px}
 .mq-dashboard .mq-dash-panel{padding-block:3px}
 .mq-dashboard .mq-level{padding:3px;gap:1px}
 .mq-dashboard .mq-next>b{-webkit-line-clamp:1;line-clamp:1;white-space:nowrap;display:block}
 .mq-dashboard .mq-next{min-height:32px;padding:3px 6px;gap:1px .4em}
 .mq-dashboard [data-trend-plot]{min-height:18px}
 .mq-dashboard .mq-trend h2 [data-toggle-trend]{min-height:22px;padding-block:0}
 .mq-dashboard .mq-recent,.mq-dashboard .mq-weak-stat{padding-block:1px}
 .mq-dashboard .mq-dash-panel h2{margin-bottom:1px}
}
@media(max-width:355px) and (max-height:610px){
 .mq-dashboard .mq-level>small,.mq-dashboard .mq-level>span:not(.q13-course){font-size:10px}
 .mq-dashboard .q12-ticks strong{font-size:9px}
 .mq-dashboard .q13-course{margin-top:12px}
 .mq-dashboard .mq-recent .mq-session-label{line-height:1.04}
 .mq-dashboard .mq-dash-stats{padding:3px}
}
@media(orientation:landscape) and (max-height:450px) and (min-width:550px){
 .mq-dashboard .mq-next{grid-template-columns:max-content minmax(0,1fr) max-content}
 .mq-dashboard .mq-next>b{line-height:1.1}
 .mq-dashboard .mq-task-filter select{padding-block:1px}
 .mq-dashboard .mq-history-panel .mq-recent{min-height:21px}
 .mq-dashboard .mq-rank-panel .mq-weak-stat{min-height:21px}
 .mq-dashboard .mq-trend h2 [data-toggle-trend]{min-height:19px}
}

/* Home sections expand inline and share one open state. */
.mq-dashboard.mq-folds{
 display:flex;flex-flow:column nowrap;align-items:stretch;flex:0 0 auto;min-width:0;
 gap:clamp(5px,.85dvh,10px);padding:1px 1px 5px;
}
.mq-home-card{
 --card-accent:#504c68;--card-tint:#f5f4f9;
 min-width:0;border:1px solid #d4d8e6;border-radius:13px;background:#fff;
 box-shadow:0 2px 4px #1624430a;
}
.mq-trend-panel{--card-accent:#653ba6;--card-tint:#f7f3fd}
.mq-rank-panel{--card-accent:#a64028;--card-tint:#fff5ee}
.mq-history-panel{--card-accent:#285d98;--card-tint:#f1f6ff}
.mq-next-panel{--card-accent:#653b9a;--card-tint:#f8f4fc}
.mq-home-card>h2{margin:0;font-size:clamp(1.05rem,2.2dvh,1.45rem);line-height:1.2}
.mq-card-toggle{
 display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.6em;
 width:100%;min-height:clamp(44px,7.8dvh,70px);border:0;border-radius:12px;
 background:linear-gradient(105deg,var(--card-tint),#fff 90%);padding:.6em .8em;color:#18253d;
 font:700 1em/1.25 system-ui;text-align:left;cursor:pointer;
}
.mq-card-toggle>svg{width:1.35em;height:1.35em;color:var(--card-accent)}
.mq-chevron{width:.55em;height:.55em;border:solid var(--card-accent);border-width:0 2px 2px 0;transform:rotate(45deg);margin:-.25em .25em 0}
.mq-card-toggle[aria-expanded=true]{border-radius:12px 12px 0 0}
.mq-card-toggle[aria-expanded=true] .mq-chevron{transform:rotate(225deg);margin-top:.25em}
.mq-card-toggle:focus-visible,.mq-home-card button:focus-visible{outline:2px solid #2c66bc;outline-offset:-3px}
.mq-card-content{min-width:0;padding:clamp(8px,1.4vw,16px);border-top:1px solid #e2e3ed}
.mq-card-content[hidden]{display:none}
.mq-folds .mq-task-heading{display:block;margin-bottom:8px}
.mq-folds .mq-task-filter{font-size:clamp(.85rem,1.7dvh,1rem)}
.mq-folds .mq-task-filter span{position:static;width:auto;height:auto;clip-path:none}
.mq-folds .mq-task-filter select{min-height:36px;width:auto;max-width:100%}
.mq-folds .mq-ranking,.mq-folds .mq-ranking>li,.mq-folds [data-task-list],.mq-folds .mq-dash-list{min-width:0;max-width:100%;width:100%;box-sizing:border-box}
.mq-folds .mq-ranking{grid-template-columns:minmax(0,1fr);gap:5px}
.mq-folds .mq-ranking>li:nth-child(n){display:block}
.mq-folds .mq-ranking .mq-weak-stat,.mq-folds .mq-dash-list>.mq-recent:nth-child(n){
 display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 8px;align-items:start;
 max-width:100%;min-width:0;box-sizing:border-box;padding:8px;min-height:38px;
}
.mq-folds .mq-dash-list>.mq-recent:nth-child(n){grid-template-columns:auto minmax(0,1fr) auto auto}
.mq-folds .mq-weak-stat span,.mq-folds .mq-session-label strong,.mq-folds .mq-session-label em,.mq-folds .mq-next>b,.mq-folds .mq-session-label{
 min-width:0;white-space:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;display:block;line-height:1.4;
}
.mq-folds .mq-session-label [data-short]{display:none}
.mq-folds .mq-session-label em{font-size:.85em}
.mq-folds .mq-next{display:flex;flex-wrap:wrap;align-items:center;border:0;background:none;padding:0;gap:8px}
.mq-folds .mq-next>b{flex:1 1 14rem;-webkit-line-clamp:unset;line-clamp:unset}
.mq-folds .mq-next button{margin-left:auto}
.mq-folds .mq-dash-stats{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:10px;border:0;box-shadow:none}
.mq-folds .mq-level{min-width:0;overflow-wrap:anywhere}
.mq-folds .q12-ticks,.mq-level-detail .q12-ticks{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr) minmax(0,1fr);gap:3px;width:100%;align-items:start}
.mq-folds .q12-ticks>*,.mq-level-detail .q12-ticks>*{white-space:normal;overflow-wrap:anywhere;min-width:0}
.mq-folds .mq-graph-button,.mq-graph-detail{display:block;position:relative;width:100%;height:clamp(140px,24dvh,300px);margin-top:8px;background:#fff;border:0;padding:0;cursor:zoom-in}
.mq-graph-detail{height:clamp(185px,36dvh,440px);cursor:default}
.mq-graph-detail svg,.mq-graph-detail .mq-chart-empty{position:absolute;inset:0;width:100%;height:100%}
.mq-graph-detail svg text{font:11px system-ui;fill:#475374}
.mq-trend-entry{display:flex;align-items:baseline;justify-content:space-between;gap:10px;border-bottom:1px solid #e3e4ec;padding-block:6px;margin:0}
.mq-trend-entry span,.mq-dialog-body:has(.mq-task-actions){min-width:0;overflow-wrap:anywhere}
.mq-trend-entry b{white-space:nowrap}
.mq-task-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(52px,18%);margin-top:15px}
.mq-task-actions button{display:inline-flex;gap:.45em;align-items:center;justify-content:center;min-height:44px;color:white;background:#af2838;border:1px solid #912332;font:700 1.07rem/1.2 system-ui;cursor:pointer}
.mq-task-actions button:first-child{border-radius:11px 0 0 11px}
.mq-task-actions button:last-child{border-left:1px solid #e6b8c2;border-radius:0 11px 11px 0;font-size:1.25rem}
.mq-task-status:empty{display:none}
@media(max-width:520px){
 .mq-folds .mq-dash-stats{grid-template-columns:minmax(0,1fr)}
 .mq-folds .mq-month-progress{max-width:27rem;width:100%;margin:auto}
 .mq-folds .mq-level{padding:10px}
}
@media(max-height:450px) and (orientation:landscape){
 .mq-dashboard.mq-folds{gap:3px}
 .mq-card-toggle{min-height:34px;padding:.3em .7em}
}

.mq-level, .mq-level b, .q12-ticks > span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }

/* Keep the home navigation and all card headers visible. */
body.v1-active[data-mqpage=home] #app,
body.v1-active[data-mqpage=home] #app .v1-screen {overflow:hidden;min-height:0}
body[data-mqpage=home] .mq-dashboard.mq-folds {
 flex:1 1 0;min-height:0;overflow:hidden;
}
.mq-folds>.mq-home-card {display:flex;flex-flow:column;flex:none;min-height:0}
.mq-folds>.mq-home-card:has(.mq-card-toggle[aria-expanded=true]) {flex:1 1 0;overflow:hidden}
.mq-folds>.mq-home-card>h2 {flex:none}
.mq-folds .mq-card-content:not([hidden]) {
 flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;
}
.mq-folds .mq-card-toggle {min-height:clamp(38px,6dvh,58px);padding-block:.32em}
@media(max-height:480px) and (orientation:landscape) {
 body[data-mqpage=home] .mq-dashboard.mq-folds {
  display:grid;grid-template-columns:minmax(9rem,36%) minmax(0,1fr);
  grid-template-rows:repeat(5,minmax(0,1fr));grid-template-areas:none;
 }
 .mq-dashboard.mq-folds>.mq-home-card {display:contents}
 .mq-folds>.mq-home-card>h2 {grid-column:1;min-height:0}
 .mq-folds .mq-card-toggle {min-height:0;height:100%;font-size:.85rem;padding-block:0}
 .mq-folds .mq-card-content:not([hidden]) {grid-column:2;grid-row:1 / 6;border:1px solid #d4d8e6;border-radius:10px}
}

#card-stats {padding:clamp(4px,1dvh,10px)}
#card-stats .mq-dash-stats {margin-inline:auto;box-sizing:border-box;max-width:none;gap:5px;padding:2px}
#card-stats .mq-month-progress {
 width:100%;max-width:300px;grid-template-columns:auto minmax(0,1fr);
 column-gap:clamp(20px,6vw,32px);justify-self:center;align-self:center;
}
#card-stats .mq-ring {width:clamp(60.9px,9.45dvh,88.2px);container-type:inline-size}
#card-stats .mq-ring>span {font-size:12.8cqi}
#card-stats .mq-ring b {font-size:clamp(18px,3.2dvh,29px)}
#card-stats .mq-goals>div {
 display:flex;align-items:baseline;justify-content:flex-start;gap:.5em;
 font-size:clamp(12px,1.8dvh,16px);padding-block:3px;
}
#card-stats .mq-goals b {font-size:clamp(15px,2.4dvh,21px)}

#card-stats.mq-card-content {position:relative;overflow:clip}
#card-stats .mq-dash-stats {position:absolute;left:50%;width:calc(100% - 2 * clamp(4px,1dvh,10px));transform-origin:top center}

#card-stats {padding-bottom:0}
#card-stats .mq-dash-stats {padding-bottom:0;align-content:stretch}
#card-trend:not([hidden]) {display:flex;flex-direction:column;padding-bottom:2px}
#card-trend .mq-segment {flex:none;container-type:inline-size}
#card-trend .mq-segment button {
 flex:1 1 auto;white-space:nowrap;font-size:clamp(12px,4.5cqi,22px);
 min-height:clamp(36px,6dvh,48px);padding:.35em .25em;line-height:1.2
}
#card-trend .mq-graph-button {flex:1 1 0;height:auto;min-height:0}
