/* All app views use the shared system. Existing IDs, card wrappers, feature
   switches and native/translation hooks remain intact. */
.app-ds { background: var(--bg); }
.app-ds .wrap { max-width: 760px; padding: 0 16px; }
.app-ds main { padding-top: 16px; }
.app-ds[data-view] main { padding-bottom: 116px; }
.app-ds h1 { font-size: 1.65rem; line-height: 1.16; margin-bottom: 9px; }
.app-ds h2 { font-size: 1.22rem; }
.app-ds h3 { font-size: .98rem; }
.app-ds section > p.muted { font-size: .86rem; line-height: 1.5; margin-bottom: 16px; }
.app-ds .appbar { background: rgba(250,248,242,.96); border-color: var(--line); }
.app-ds .appbar-inner { max-width: 760px; min-height: 58px; padding: 10px 16px; gap: 9px; }
.app-ds .appbar .brand { font-size: .95rem; gap: 6px; }
.app-ds .appbar .brand > svg { width: 27px; height: 27px; }
.app-ds .stage-chip { font-size: .68rem; padding: 5px 9px; }
.app-ds .appbar-tour { margin-left: 0; min-height: 36px; padding: 6px 12px; }
.app-ds .demo-bar { background: var(--primary-soft); border-color: #CADCCE; }
.app-ds .demo-bar-in { max-width: 760px; padding: 8px 16px; gap: 7px; }
.app-ds .demo-bar-label { flex-basis: 100%; font-size: .76rem; }
.app-ds .demo-bar-btns { width: 100%; margin: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.app-ds .demo-bar .btn { padding: 7px 6px; min-height: 36px; font-size: .7rem; white-space: normal; overflow-wrap: break-word; line-height: 1.15; }
.app-ds .demo-pill { padding: 3px 7px; }
.app-ds .card { padding: 14px; margin-bottom: 10px; border-radius: var(--radius); box-shadow: var(--ds-shadow-sm); }
.app-ds .card-head { align-items: center; min-width: 0; gap: 8px; margin-bottom: 11px; }
.app-ds .card-head h2, .app-ds .card-head h3 { min-width: 0; line-height: 1.3; }
.app-ds .card-head > .muted { font-size: .68rem; text-align: end; line-height: 1.35; }
.app-ds .card-head > .btn { flex: none; }
.app-ds .btn { min-height: 44px; padding: 10px 14px; font-size: .87rem; }
.app-ds .btn-sm { min-height: 40px; padding: 8px 11px; font-size: .78rem; }
.app-ds .field { margin-bottom: 12px; }
.app-ds .field label { font-size: .81rem; margin-bottom: 5px; }
.app-ds .field .hint { font-size: .72rem; }
.app-ds input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
.app-ds select, .app-ds textarea { min-height: 44px; font-size: 16px; }
.app-ds .field-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.app-ds .choice, .app-ds .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.app-ds .choice label { min-height: 44px; padding: 10px; align-items: center; }
.app-ds .choice.plans { display: grid; }
.app-ds .choice.plans label span { min-width: 0; flex-wrap: wrap; }
.app-ds .chip { min-height: 36px; padding: 7px 11px; margin: 0; font-size: .78rem; }

/* Daily work stays open, with the next step first. These are visual orders
   only; module insertBefore calls and stored data stay unchanged. */
.app-ds #view-today { display: flex; flex-direction: column; }
.app-ds #view-today > * { order: 6; }
.app-ds #view-today > #notices { order: 0; }
.app-ds #view-today > #stepHost { order: 1; }
.app-ds #view-today > #free-note { order: 2; }
.app-ds #view-today > #card-logit { order: 3; }
.app-ds #view-today > #card-meters { order: 4; }
.app-ds #view-today > #card-studyhall { order: 5; }
.app-ds #view-today > #ft-cheers { order: 7; }
.app-ds #view-today > #card-share-friend { order: 8; }
.app-ds .step { padding: 17px; border-left-width: 3px; box-shadow: var(--ds-shadow-md); margin-bottom: 10px; }
.app-ds .step-eyebrow { gap: 6px; font-size: .64rem; margin-bottom: 11px; }
.app-ds .sev { font-size: .6rem; padding: 3px 7px; }
.app-ds .step h2 { font-size: 1.28rem; line-height: 1.22; margin-bottom: 11px; }
.app-ds .step-why { font-size: .85rem; line-height: 1.5; margin-bottom: 12px; padding-left: 10px; }
.app-ds .step-action { padding: 12px; font-size: .87rem; line-height: 1.55; margin-bottom: 12px; }
.app-ds .step-meta { font-size: .72rem; gap: 7px; }
.app-ds .step-meta .pill { padding: 3px 8px; }
.app-ds .step-actions { gap: 7px; margin-top: 12px; }
.app-ds .step-actions .btn-primary { flex: 1; }
.app-ds .step-actions .btn-ghost { flex: 1; }
.app-ds .step .guardrail { font-size: .74rem; margin-top: 10px; padding: 9px 10px; }
.app-ds .ft-help { margin-top: 11px; }
.app-ds .ft-help > summary { min-height: 44px; padding: 10px 12px; font-size: .81rem; }
.app-ds .ft-moves, .app-ds .ft-qe { font-size: .82rem; }
.app-ds .ask-step-btn { min-height: 30px; font-size: .72rem; white-space: normal; }
.app-ds .quicklog { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.app-ds .qbtn { min-height: 44px; padding: 10px; font-size: .81rem; gap: 7px; }
.app-ds .meters { gap: 11px; }
.app-ds .meter-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 8px; margin: 0; align-items: baseline; }
.app-ds .meter-label { font-size: .78rem; gap: 6px; }
.app-ds .meter-val { font-size: .75rem; text-align: end; }
.app-ds .meter-bar { grid-column: 1 / -1; height: 6px; }
.app-ds .meter-note { grid-column: 1 / -1; font-size: .75rem; line-height: 1.4; }
.app-ds .meter-row.na { opacity: 1; }
.app-ds #card-meters > p { font-size: .75rem; line-height: 1.45; margin-top: 11px !important; }
.app-ds .habit { gap: 6px; flex-wrap: wrap; }
.app-ds .habit-days { gap: 5px; }
.app-ds .hday { width: 28px; height: 28px; font-size: .67rem; border-radius: 8px; }
.app-ds .streak { font-size: .72rem; }
.app-ds .notice { background: var(--ds-yellow-soft); border-color: #E3CB94; color: #67470C; margin-bottom: 10px; padding: 10px 12px; font-size: .78rem; }
.app-ds #dates-notice { font-size: .78rem; line-height: 1.5; }
.app-ds .ft-cheers { border-left-color: var(--ds-yellow); }
.app-ds #ft-cheers { padding: 12px; }
.app-ds #ft-cheers .card-head { margin-bottom: 5px; }
.app-ds #ft-cheers .ft-reward { margin-top: 5px; }
.app-ds #card-share-friend { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 10px; align-items: center; }
.app-ds #card-share-friend .card-head { margin: 0; }
.app-ds #card-share-friend p { grid-column: 1 / -1; grid-row: 2; margin: 0; }
.app-ds #card-share-friend .btn { grid-column: 2; grid-row: 1; }
.app-ds .ft-cheer-t { font-size: .87rem; }
.app-ds .ft-reward { font-size: .8rem; }
.app-ds .share-friend p { margin-bottom: 10px; font-size: .8rem; }

/* Roadmap and current grades. Long names wrap inside the card. */
.app-ds .yearpick { gap: 6px; margin-bottom: 14px; scrollbar-width: thin; }
.app-ds .yearpick button { min-height: 40px; padding: 8px 12px; font-size: .78rem; }
.app-ds .month { padding: 12px 0; }
.app-ds .month-head { align-items: start; gap: 8px; min-height: 34px; }
.app-ds .month-title { font-size: .87rem; }
.app-ds .month-tag { font-size: .66rem; width: 31px; flex-basis: 31px; }
.app-ds .nudges { padding-inline-start: 39px; margin-top: 7px; }
.app-ds .nudges li { font-size: .81rem; padding-top: 7px; padding-bottom: 7px; }
.app-ds .gpa-row { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.app-ds .gpa-box { padding: 12px 7px; background: var(--primary-soft); }
.app-ds .gpa-num { font-size: 1.65rem; font-weight: 750; color: var(--primary); }
.app-ds .gpa-lab { font-size: .75rem; color: var(--primary-dark); letter-spacing: .01em; }
.app-ds #gpa-note { font-size: .7rem; line-height: 1.45; }
.app-ds .course { grid-template-columns: minmax(0,1fr) 65px auto; gap: 4px 8px; padding: 9px 0; }
.app-ds .course-name { min-width: 0; flex-wrap: wrap; font-size: .82rem; gap: 4px; line-height: 1.4; }
.app-ds .course-meta { font-size: .75rem; line-height: 1.4; }
.app-ds .course-grade { width: 65px; }
.app-ds .course-grade { grid-column: 2; grid-row: 1 / span 2; }
.app-ds .course-del { grid-column: 3; grid-row: 1 / span 2; }
.app-ds .course-grade input { width: 100%; min-height: 40px; padding: 8px 5px; text-align: center; }
.app-ds .course-del { min-height: 40px; padding: 7px 5px; }
.app-ds .course-meta .course-edit { min-height: 28px; padding: 3px 5px; font: 650 .7rem/1.4 var(--sans); color: var(--primary); background: var(--primary-soft); border: 0; border-radius: 6px; cursor: pointer; }
.app-ds .course-archive { margin-top: 9px; border-top: 1px solid var(--line); }
.app-ds .course-archive > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--primary-dark); font-size: .83rem; font-weight: 650; cursor: pointer; padding: 10px 0; }
.app-ds .course-archive > summary::before { content: '+'; font-size: 1.2rem; font-weight: 450; }
.app-ds .course-archive[open] > summary::before { content: '−'; }
.app-ds .course-archive > summary { list-style: none; }
.app-ds .course-archive > summary::-webkit-details-marker { display: none; }
.app-ds .lvl { font-size: .6rem; padding: 2px 5px; }
.app-ds .sectionscore { grid-template-columns: minmax(0,1fr) 80px; gap: 5px 12px; margin-bottom: 9px; }
.app-ds .sectionscore label { font-size: .81rem; }
.app-ds .sectionscore .hint { font-size: .75rem; line-height: 1.4; }
.app-ds #score-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 12px; }
.app-ds #score-fields .sectionscore { grid-template-columns: minmax(0,1fr); align-content: start; gap: 5px; margin: 0; }
.app-ds #score-fields .sectionscore input { grid-column: 1; grid-row: 2; width: 100%; }
.app-ds #score-fields .sectionscore .hint { grid-column: 1; }
.app-ds #test-which { gap: 6px; margin-bottom: 12px !important; }
.app-ds #test-which .chip { min-height: 40px; }
.app-ds .picker-item { min-height: 44px; font-size: .82rem; }
.app-ds .goal { font-size: .82rem; }

/* History and dates: recent work and upcoming events precede optional tools. */
.app-ds .logitem { gap: 7px; padding: 9px 0; font-size: .82rem; align-items: start; }
.app-ds .logitem .when { font-size: .67rem; white-space: normal; text-align: end; max-width: 95px; }
.app-ds .sess-main { font-size: .82rem; }
.app-ds .sess .btn { min-height: 36px; padding: 6px 8px; font-size: .7rem; }
.app-ds .ft-tiles { grid-template-columns: repeat(auto-fit,minmax(92px,1fr)); gap: 7px; }
.app-ds .ft-tile { padding: 10px 8px; border-radius: var(--radius-sm); }
.app-ds .ft-tile strong { color: var(--primary); font-size: 1.25rem; }
.app-ds .ft-table { font-size: .73rem; }
.app-ds .ft-table td, .app-ds .ft-table th { padding: 7px 4px; }
.app-ds .dates-row { padding: 9px 0; gap: 8px; }
.app-ds .dates-when { flex-basis: 55px; font-size: .78rem; }
.app-ds .dates-title { font-size: .82rem; line-height: 1.4; }
.app-ds .dates-tag { font-size: .62rem; }
.app-ds .dates-item { padding: 11px; }
.app-ds .dates-item-head { font-size: .85rem; }
.app-ds .dates-side { font-size: .75rem; }
.app-ds .dates-form { padding: 11px; }
.app-ds .dates-acts .btn { min-height: 36px; padding: 6px 7px; font-size: .72rem; }
.app-ds .dates-row.past { opacity: 1; }

/* Settings and parent tools retain fold semantics, with larger row targets. */
.app-ds .fold.closed { padding: 7px 14px; margin-bottom: 6px; }
.app-ds .fold > .card-head { min-height: 34px; }
.app-ds .fold-group { font-size: .69rem; margin: 18px 0 9px; color: var(--primary-dark); letter-spacing: .07em; }
.app-ds .fold > .card-head .fold-sum { font-size: .74rem; max-width: 44%; }
.app-ds .fold > .card-head::after { width: 8px; height: 8px; margin-inline-start: 5px; }
.app-ds .ft-switch { min-height: 48px; font-size: .83rem; padding: 10px 0; }
.app-ds .ft-sub { font-size: .87rem; }
.app-ds .ft-knob { background: #94A99A; }
.app-ds .ft-kidgrid { gap: 9px; }
.app-ds .ft-kidcard { padding: 13px; }
.app-ds .ft-kid-row { font-size: .76rem; }
.app-ds .ft-psec, .app-ds .ft-kids, .app-ds .ft-presets, .app-ds .ft-seg { gap: 6px; }
.app-ds .pg-stats { gap: 7px; }
.app-ds .pg-stats .gpa-num { font-size: 1.45rem; }
.app-ds .parent-peek-row { gap: 7px; }
.app-ds .parent-peek-row .btn { flex: 1 1 calc(50% - 7px); }
.app-ds .mailprev { padding: 10px; }
.app-ds .mp-mail { padding: 14px; }
.app-ds .mp-table td { font-size: .77rem; }
.app-ds .mp-step { font-size: .79rem; }
.app-ds .ad-tiles { gap: 5px; }
.app-ds .ad-tile { padding: 8px 3px; }
.app-ds .ad-tile span { font-size: .6rem; }
.app-ds .ad-dow { color: var(--muted); }
.app-ds #settings-gpa-display { grid-column: 1 / -1; }
.app-ds.parentmode :is(#view-today, #view-roadmap, #view-grades, #view-log, #view-dates, #view-settings) :disabled {
  opacity: 1;
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--line);
  cursor: default;
}
.app-ds .parent-back { top: auto; bottom: 88px; right: 14px; min-height: 40px; padding: 9px 12px; font-size: .78rem; }

/* Sign-in, sign-up and setup use the same calm card and labeled controls. */
.app-ds #view-auth, .app-ds #view-checkemail, .app-ds #view-phone, .app-ds #view-agegate, .app-ds #view-gate,
.app-ds #view-tooyoung, .app-ds #view-parentstart, .app-ds #view-register { max-width: 560px; }
.app-ds .auth-card { margin-top: 12px; padding: 24px 20px 20px; max-width: 440px; box-shadow: var(--ds-shadow-md); }
.app-ds .auth-brand { margin-bottom: 20px; }
.app-ds .auth-logo { width: 48px; height: 48px; margin-bottom: 13px; }
.app-ds .auth-brand h1 { font-size: 1.65rem; }
.app-ds .pw-wrap input { padding-inline-end: 48px !important; }
.app-ds .pw-toggle { width: 44px; height: 44px; color: var(--ink-2); }
.app-ds .auth-divider { margin: 15px 0; }
.app-ds .auth-divider span { color: var(--muted); }
.app-ds .auth-trust { font-size: .68rem; line-height: 1.65; margin-top: 16px; }
.app-ds .agree { font-size: .8rem; gap: 9px; }
.app-ds .demo-try-btns { flex-wrap: wrap; }
.app-ds .reg-why { padding: 12px; font-size: .82rem; line-height: 1.55; background: var(--primary-soft); }
.app-ds .choice.plans .plan-price { font-size: .85rem; }
.app-ds .code-input { letter-spacing: .25em; }

/* Ask, own dialogs and the tour share sizing, shape and focus treatment. */
.app-ds .ai-fab { height: 48px; padding: 0 16px; font-size: .87rem; }
.app-ds .ai-dock { border-radius: var(--ds-radius-lg); }
.app-ds .ai-dock.ai-full { border-radius: 0; }
.app-ds .ai-dock-body { padding: 0 12px; }
.app-ds .ai-dock-btn { width: 40px; height: 40px; }
.app-ds .ai-dock .ask-head { padding: 15px 96px 10px 2px; }
.app-ds .ask-msg { font-size: .87rem; line-height: 1.55; }
.app-ds .ask-chips { flex-wrap: wrap; overflow: visible; mask-image: none; -webkit-mask-image: none; max-height: 100px; overflow-y: auto; gap: 6px; }
.app-ds .ask-chip { min-height: 34px; font-size: .73rem; padding: 6px 10px; white-space: normal; }
.app-ds .ask-form { align-items: end; gap: 7px; }
.app-ds .ask-form textarea { min-height: 46px; font-size: 16px; }
.app-ds .ask-form button { min-height: 46px; padding: 10px 13px; }
.app-ds .ask-trust { font-size: .66rem; line-height: 1.45; }
.app-ds .fdlg { padding: 22px; }
.app-ds .fdlg-t { font-size: 1.16rem; }
.app-ds .fdlg-m { font-size: .9rem; line-height: 1.55; }
.app-ds .tour-card { border: 1px solid var(--line); padding: 23px 21px 20px; border-radius: var(--ds-radius-lg); }
.app-ds .tour-card h3 { font-size: 1.24rem; }
.app-ds .tour-card p { font-size: .85rem; }
.app-ds .tour-btns .linkbtn { min-height: 40px; }
.app-ds .tour-pick { max-width: calc(100vw - 32px); }
.app-ds .tour-pick button { min-height: 52px; }
.app-ds .toast { font-size: .8rem; padding: 10px 15px; }

/* Six tabs, each with a crisp SVG icon and an explicit selected surface. */
.app-ds .tabbar { background: rgba(255,255,255,.98); border-color: var(--line); }
.app-ds .tabbar-inner { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); max-width: 760px; gap: 0; }
.app-ds .tab { min-height: 62px; min-width: 0; padding: 9px 2px 10px; font-size: .75rem; gap: 5px; border-top: 2px solid transparent; }
.app-ds .tab svg { width: 20px; height: 20px; stroke-width: 1.8; }
.app-ds .tab.active { background: var(--primary-soft); color: var(--primary-dark); border-top-color: var(--primary); }
.app-ds :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.app-ds .tab:focus-visible { outline-offset: -4px; }
/* Small labels remain readable at phone size; hierarchy comes from weight
   and spacing rather than reducing useful metadata below twelve pixels. */
.app-ds :is(.tiny,.field .hint,.card-head > .muted,.stage-chip,.demo-pill,.demo-bar .btn,
  .step-eyebrow,.sev,.step-meta,.meter-note,.hday,.streak,.lvl,.course-meta,.course-meta .course-edit,
  .sectionscore .hint,.logitem .when,.dates-tag,.dates-side,.dates-when,.fold-group,.fold-sum,
  .fold > .card-head > .muted,.ft-kid-row,.ad-dow,.ad-tile span,.auth-trust,.ask-chip,.ask-trust,
  .mp-fine,.mp-eyebrow,.mp-foot,.ai-credits) { font-size: .75rem; }
.app-ds #view-parent { display: flex; flex-direction: column; }
.app-ds #view-parent > * { order: 10; }
.app-ds #view-parent > h1 { order: 0; }
.app-ds #view-parent > #parent-sub { order: 1; }
.app-ds #view-parent > #ft-family { order: 2; }
.app-ds #view-parent > #parent-glance { order: 3; }
.app-ds #view-parent > #parent-stand { order: 4; }
.app-ds #view-parent > #parent-dates { order: 5; }
.app-ds #view-parent > #parent-peek { order: 6; }
.app-ds #view-parent > #ft-pdays { order: 7; }
.app-ds #view-parent > #ft-alerts { order: 8; }
.app-ds #view-parent > #ft-panalytics { order: 9; }

@media (max-width: 899px) {
  .app-ds .quicklog { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .app-ds .qbtn { padding: 9px 7px; gap: 5px; font-size: .75rem; }
  .app-ds #meters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 12px; }
  .app-ds #meters .meter-row { grid-template-columns: minmax(0,1fr); gap: 4px; align-content: start; }
  .app-ds #meters .meter-val { white-space: normal; text-align: start; }
  .app-ds #meters .meter-label { min-height: 18px; }
  .app-ds #meters .meter-bar { margin-top: 2px; }
  .app-ds #parent-meters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .app-ds #parent-meters .meter-row { grid-template-columns: minmax(0,1fr); }
  .app-ds #parent-meters .meter-val { white-space: normal; text-align: start; }
}
html[dir="rtl"] .app-ds .step { border-left-width: 1px; border-right-width: 3px; }
html[dir="rtl"] .app-ds .step-why { padding-left: 0; padding-right: 10px; }

@media (min-width: 900px) {
  .app-ds .wrap { max-width: 1060px; padding: 0 24px; }
  .app-ds .appbar-inner, .app-ds .demo-bar-in { max-width: 1060px; padding-inline: 24px; }
  .app-ds .appbar-inner { min-height: 66px; }
  .app-ds .appbar .brand { font-size: 1.08rem; }
  .app-ds .appbar-tour { min-height: 40px; margin-left: 6px; }
  .app-ds .demo-bar-in { flex-wrap: nowrap; }
  .app-ds .demo-bar-label { flex-basis: auto; }
  .app-ds .demo-bar-btns { display: flex; width: auto; margin-inline-start: auto; }
  .app-ds .demo-bar .btn { padding-inline: 13px; font-size: .76rem; }
  .app-ds .tabbar-inner { max-width: 1012px; padding: 6px 0; gap: 6px; }
  .app-ds .tab { min-height: 46px; flex-direction: row; padding: 10px; font-size: .85rem; border: 0; border-radius: var(--radius-sm); }
  .app-ds .tab.active { border-top-color: transparent; box-shadow: none; }
  .app-ds main { padding-top: 83px; }
  .app-ds h1 { font-size: 2rem; }
  .app-ds .card { padding: 20px; }
  .app-ds .step { padding: 24px; }
  .app-ds .step h2 { font-size: 1.65rem; }
  .app-ds .step-why { font-size: .94rem; }
  .app-ds .step-action { font-size: .96rem; padding: 15px; }
  .app-ds .card-head h3 { font-size: 1.05rem; }
  .app-ds .quicklog { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .app-ds #view-today, .app-ds #view-grades, .app-ds #view-log, .app-ds #view-dates, .app-ds #view-parent {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 18px; align-items: start;
  }
  .app-ds :is(#view-today,#view-grades,#view-log,#view-dates,#view-parent) > .card { margin-bottom: 0; }
  .app-ds :is(#view-grades,#view-log,#view-dates,#view-parent) > h1,
  .app-ds :is(#view-grades,#view-log,#view-dates,#view-parent) > p { grid-column: 1 / -1; margin: 0; }
  .app-ds #notices, .app-ds #stepHost { grid-column: 1 / -1; }
  .app-ds #stepHost > .step { margin-bottom: 0; }
  .app-ds #card-gpa { grid-column: 1 / -1; }
  .app-ds #card-gpa .gpa-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .app-ds #card-gpa .gpa-num { font-size: 2rem; }
  .app-ds #card-classes { grid-column: 1; grid-row: 4 / span 5; }
  .app-ds #card-tests { grid-column: 2; grid-row: 4; }
  .app-ds #card-study { grid-column: 2; grid-row: 5; }
  .app-ds #card-need { grid-column: 2; grid-row: 6; }
  .app-ds #card-course-gaps { grid-column: 2; grid-row: 7; }
  .app-ds #card-goals { grid-column: 2; grid-row: 8; }
  .app-ds #card-scorehist { grid-column: 2; grid-row: 9; }
  .app-ds #card-course-picker { grid-column: 1 / -1; }
  .app-ds #card-coming { grid-column: 1 / -1; }
  .app-ds #dates-coming { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; }
  .app-ds #dates-coming > :not(.dates-row) { grid-column: 1 / -1; }
  .app-ds #parent-glance { grid-column: 1; }
  .app-ds #parent-stand { grid-column: 2; }
  .app-ds #ft-family { grid-column: 1 / -1; }
  .app-ds #ft-family .ft-kidgrid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .app-ds .ai-dock { width: 420px; }
  .app-ds .ai-dock.ai-full { width: auto; }
  .app-ds .parent-back { bottom: 24px; }
  .app-ds #view-settings { max-width: 760px; }
  .app-ds #view-parent > #ft-pdays { grid-column: 1; }
  .app-ds #view-parent > #parent-peek { grid-column: 2; }
  .app-ds #view-parent > #parent-dates { grid-column: 1; }
  .app-ds #view-parent > p:not(#parent-sub) { order: 12; }
  .app-ds .fold.closed { padding: 10px 18px; }
}
@media (max-width: 420px) {
  .app-ds .appbar-inner { gap: 7px; }
  .app-ds .appbar .brand { font-size: .89rem; }
  .app-ds .appbar-tour { padding-inline: 10px; }
  .app-ds .stage-chip { max-width: 85px; }
  .app-ds #card-logit > div:last-child { flex-wrap: wrap; }
  .app-ds .card-head { flex-wrap: wrap; }
  .app-ds .card-head > .muted { flex: 1; }
  .app-ds .fold > .card-head { flex-wrap: nowrap; }
  .app-ds .fold > .card-head > h3 { font-size: .88rem; }
  .app-ds .fold > .card-head > .muted { font-size: .62rem; }
  .app-ds .ft-table { font-size: .67rem; }
  .app-ds .ft-table td, .app-ds .ft-table th { padding-inline: 3px; }
}
@media print {
  .app-ds #view-today, .app-ds #view-grades, .app-ds #view-log, .app-ds #view-dates, .app-ds #view-parent { display: block; }
  .app-ds .appbar, .app-ds .tabbar { display: none; }
}

/* QA 17 Oct 2026: these two link-style buttons had no base style and showed as grey native buttons */
#ask-stage, #btn-delete-account { background: none; border: 0; padding: 0; font: inherit; color: var(--primary, #0E6E5C); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* "Add what you know" page right after sign-up (17 Oct 2026). */
#view-setup .su-card { margin-bottom: 14px; }
#view-setup .su-card h2 { font-size: 1.05rem; margin: 0 0 4px; }
#view-setup .su-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 8px; margin: 8px 0; }
#view-setup .su-row input, #view-setup .su-row select { width: 100%; min-width: 0; min-height: 44px; }
#view-setup #su-schools .su-row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr); }
#view-setup .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#view-setup #su-save { margin-top: 6px; }
@media (max-width: 480px) {
  #view-setup .su-row { grid-template-columns: 1fr 1fr; }
  #view-setup .su-row > :first-child { grid-column: 1 / -1; }
}
#view-setup .su-row + .su-row { padding-top: 10px; border-top: 1px dashed var(--line, #e2e8e5); }
#view-family .fam-card { margin-bottom: 14px; }
#view-family .fam-card h2 { font-size: 1.05rem; margin: 0 0 6px; }
#view-family #fam-msg { margin: 10px 0 0; }

/* My info tab (18 Oct 2026): seven tabs now. */
.app-ds .tabbar-inner { grid-template-columns: repeat(7, minmax(0, 1fr)); }
#view-info #card-quickadd { border-color: var(--primary, #0E6E5C); background: var(--primary-soft, #E7F3ED); }
#view-info #card-quickadd .btn { margin-top: 6px; }

/* Missing info warning at the top of the student's app screens. */
.info-warn { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 728px; margin: 12px auto 0; padding: 12px 14px;
  background: #FFF3D7; border: 1px solid #F2B544; border-inline-start: 4px solid #F2B544; border-radius: 14px; color: #3d2e05; }
.info-warn.hidden { display: none; }
.info-warn .iw-text { flex: 1 1 220px; min-width: 0; }
.info-warn .iw-title { margin: 0 0 4px; font-weight: 700; font-size: .95rem; }
.info-warn .iw-list { margin: 0; padding-inline-start: 18px; font-size: .86rem; line-height: 1.45; }
.info-warn .btn { flex: none; min-height: 44px; }
@media (max-width: 520px) { .info-warn { margin: 10px 12px 0; } .info-warn .btn { width: 100%; } }
@media (min-width: 980px) { .info-warn { max-width: 1012px; } }
