/* Student UI system — 20261122-student2
   Single source for student surfaces, lists, controls and navigation.
   Scope: #student only. Teacher and admin pages are intentionally untouched.
   Flat, quiet surfaces: borders carry hierarchy, shadows are not used. */
#student{
  --stu-bg:#F5F6F8;
  --stu-surface:#FFFFFF;
  --stu-surface-2:#F8F9FB;
  --stu-surface-3:#F1F4F8;
  --stu-line:#E4E7EC;
  --stu-line-strong:#D5DAE3;
  --stu-text:#1F2430;
  --stu-text-2:#4A5262;
  --stu-muted:#7A8290;
  --stu-brand:#2457D6;
  --stu-brand-ink:#1E48B8;
  --stu-brand-soft:#EEF3FF;
  --stu-brand-line:#C9D6F8;
  --stu-success:#16845B;
  --stu-success-soft:#EAF7F1;
  --stu-warning:#A5620A;
  --stu-warning-soft:#FFF5E6;
  --stu-danger:#B42318;
  --stu-danger-soft:#FDEEEC;
  --stu-card-radius:12px;
  --stu-control-radius:10px;
  --stu-chip-radius:10px;
  /* 旧控制层用 --ctl-r / --bs-r-c；在学生端把它们收口到同一控制圆角。 */
  --ctl-r:var(--stu-control-radius);
  --bs-r-c:var(--stu-control-radius);
  --inp-r:var(--stu-control-radius);
  --stu-card-pad:16px;
  --stu-card-gap:12px;
  --stu-gap:14px;
  --stu-shadow:none;
  --stu-shadow-hover:none;
  --stu-shadow-focus:none;
  --stu-blur:none;
  --stu-card-hover-transform:none;
  --stu-focus:#7FA6F2;
  --stu-font:13px;
  --stu-line-height:1.65;
}
#student{background:var(--stu-bg);color:var(--stu-text);font-size:var(--stu-font);line-height:var(--stu-line-height)}
#student .pg.on{color:var(--stu-text)}
#student .pg.on>.page-h{margin:0 0 var(--stu-gap)}
#student .pg.on>.page-h h2{font-size:22px;line-height:1.3;letter-spacing:-.02em;color:var(--stu-text);margin:0}
#student .pg.on>.page-h .st{font-size:12px;line-height:1.55;color:var(--stu-muted);margin-top:3px}

/* Cards: one radius, one border, one padding, no elevation. */
#student .pg.on .card{background:var(--stu-surface);border:1px solid var(--stu-line);border-radius:var(--stu-card-radius);box-shadow:var(--stu-shadow);padding:var(--stu-card-pad);margin:0 0 var(--stu-card-gap);color:var(--stu-text)}
#student .pg.on .card.tight{padding:12px 14px}
#student .pg.on .card:hover{border-color:var(--stu-line-strong);box-shadow:var(--stu-shadow)}
#student .pg.on .card>.h{font-size:14px;line-height:1.5;font-weight:650;letter-spacing:0;color:var(--stu-text);margin:0 0 8px;display:flex;align-items:center;gap:8px}
#student .pg.on .card>.h .rt,#student .pg.on .card>.h .card-more{font-size:12px;font-weight:500;color:var(--stu-brand);background:transparent;border:0;padding:4px 0;min-height:28px}
#student .pg.on .card>:last-child{margin-bottom:0}
#student .pg.on .card .muted,#student .pg.on .card small{color:var(--stu-muted)}

/* Lists: separators live inside one container, not in repeated white cards. */
#student .pg.on .row{background:transparent;border:0;border-top:1px solid var(--stu-line);border-radius:0;box-shadow:none;padding:12px 2px;margin:0}
#student .pg.on .row:first-child,#student .pg.on .row:first-of-type{border-top:0}
#student .pg.on .row:hover{background:var(--stu-surface-2)}
#student .pg.on .row b{font-size:13.5px;line-height:1.5;color:var(--stu-text);font-weight:600}
#student .pg.on .row small{font-size:12px;line-height:1.55;color:var(--stu-muted)}

/* Buttons: shared height, radius and type scale. Width remains component-owned. */
#student .pg.on .btn{min-height:40px;padding:8px 14px;border-radius:var(--stu-control-radius);font-size:13px;font-weight:600;box-shadow:none;line-height:1.5}
#student .pg.on .btn.primary,#student .pg.on .btn.blue,#student .pg.on .btn:not(.ghost):not(.link):not(.warn):not(.danger):where(.is-primary){background:var(--stu-brand);border-color:var(--stu-brand);color:#fff}
#student .pg.on .btn:focus-visible,#student .pg.on button:focus-visible,#student .pg.on summary:focus-visible,#student .pg.on a:focus-visible{outline:2px solid var(--stu-focus);outline-offset:2px}
#student .pg.on button:disabled{opacity:.55;cursor:not-allowed}

/* Inputs: one border, one radius, fixed label rhythm. */
#student .pg.on :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){border:1px solid var(--stu-line);border-radius:var(--stu-control-radius);background:#fff;color:var(--stu-text);font-size:13px;line-height:1.5;box-shadow:none}
#student .pg.on :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea):focus{border-color:var(--stu-brand-line);outline:2px solid rgba(36,87,214,.12);outline-offset:1px}
#student .pg.on label{color:var(--stu-text-2);font-size:12.5px;line-height:1.5}

/* Chips and status tags share geometry without becoming pills everywhere. */
#student .pg.on .tag,#student .pg.on .chip,#student .pg.on .sd-todo-chip{border-radius:var(--stu-chip-radius);font-size:11.5px;line-height:1.5;padding:2px 7px;box-shadow:none}
#student .pg.on .tag.gray,#student .pg.on .chip{background:var(--stu-surface-3);color:var(--stu-text-2);border-color:var(--stu-line)}
#student .pg.on .tag.warn,#student .pg.on .chip.warn{background:var(--stu-warning-soft);color:var(--stu-warning);border-color:#F5D9AE}
#student .pg.on .tag.ok,#student .pg.on .chip.ok{background:var(--stu-success-soft);color:var(--stu-success);border-color:#CDEADF}
#student .pg.on .tag.bad{background:var(--stu-danger-soft);color:var(--stu-danger);border-color:#F3D2CE}

/* Bottom navigation: flat, opaque, one separator. */
#student>.tabbar,#student .tabbar{background:#fff;border-top:1px solid var(--stu-line);box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none}
#student .tabbar>button{color:var(--stu-muted);font-size:12px}
#student .tabbar>button.on,#student .tabbar>button[aria-current="page"]{color:var(--stu-brand)}

/* Home: brief strip = open area + independent refresh area. */
#pgHome .sd-airow{grid-template-columns:minmax(0,1fr) 160px;border:1px solid var(--stu-line);border-radius:var(--stu-card-radius);background:var(--stu-surface);box-shadow:none}
#pgHome .sd-airow>.sd-agent-bar{display:grid;grid-template-columns:minmax(0,1fr) 48px;align-items:stretch;gap:0;padding:0;border:0;border-radius:0;background:var(--stu-brand-soft);box-shadow:none;overflow:hidden}
#pgHome .sd-agent-bar .sd-agent-open{display:flex;align-items:center;gap:11px;min-width:0;min-height:76px;padding:12px 8px 12px 14px;border:0;border-radius:0;background:transparent;color:var(--stu-text);font:inherit;text-align:left;cursor:pointer}
#pgHome .sd-agent-bar .sd-agent-open:hover{background:#E8EFFF}
#pgHome .sd-agent-bar .sd-agent-open:active{background:#DFE9FF}
#pgHome .sd-agent-bar .sd-agent-open:focus-visible{outline:2px solid var(--stu-focus);outline-offset:-3px}
#pgHome .sd-agent-bar .ta-bar-left{display:flex;align-items:center;gap:10px;min-width:0;flex:1;flex-wrap:nowrap}
#pgHome .sd-agent-bar .ta-bar-ic{width:34px;height:34px;border-radius:50%;background:var(--stu-brand);color:#fff;display:flex;align-items:center;justify-content:center;flex:none;box-shadow:none}
#pgHome .sd-agent-bar .ta-bar-ic svg{width:22px;height:22px;color:#fff}
#pgHome .sd-agent-bar .ta-bar-copy{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
#pgHome .sd-agent-bar .ta-bar-tag{font-size:12px;line-height:1.4;font-weight:650;color:var(--stu-brand-ink);letter-spacing:0;white-space:nowrap}
#pgHome .sd-agent-bar .ta-bar-text{display:block;font-size:12.5px;line-height:1.5;color:var(--stu-text-2);overflow-wrap:anywhere}
#pgHome .sd-agent-bar .ta-bar-go{display:none}
#pgHome .sd-agent-bar .sd-agent-refresh{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;margin:auto 6px auto 0;padding:0;border:1px solid var(--stu-brand-line);border-radius:var(--stu-control-radius);background:#fff;color:var(--stu-text-2);cursor:pointer}
#pgHome .sd-agent-bar .sd-agent-refresh:hover{background:#fff;border-color:var(--stu-brand);color:var(--stu-brand)}
#pgHome .sd-agent-bar .sd-agent-refresh:active{background:var(--stu-brand-soft)}
#pgHome .sd-agent-bar .sd-agent-refresh:focus-visible{outline:2px solid var(--stu-focus);outline-offset:2px}
#pgHome .sd-agent-bar .sd-agent-refresh[aria-busy="true"] svg{animation:stuRefreshSpin .9s linear infinite}
@keyframes stuRefreshSpin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#pgHome .sd-agent-bar .sd-agent-refresh[aria-busy="true"] svg{animation:none}}
#pgHome .sd-airow>.sd-ana-card{border-left:1px solid var(--stu-line);background:transparent;padding:13px 14px}
#pgHome .sd-airow>.sd-ana-card .ana-copy b{font-size:14px;font-weight:600;color:var(--stu-text)}
#pgHome .sd-airow>.sd-ana-card .ana-copy small{font-size:11.5px;color:var(--stu-muted)}
#pgHome .sd-airow>.sd-ana-card em{color:var(--stu-brand);font-size:16px}

/* Mistake book: outer groups stay cards, questions become rows inside them. */
#pgMistake .wrong-card,#pgMistake .mistake-card{padding:14px 16px}
#pgMistake .wrong-card .card,#pgMistake .mistake-card .card{border:0;border-top:1px solid var(--stu-line);border-radius:0;margin:0;padding:12px 0;box-shadow:none;background:transparent}
#pgMistake .wrong-card .card:first-child,#pgMistake .mistake-card .card:first-child{border-top:0}

/* Compact and wide breakpoints: only two content breakpoints plus the thin-phone guard. */
@media(max-width:899px){
  #pgHome .sd-airow{grid-template-columns:minmax(0,1fr) 140px}
  #student .pg.on>.page-h h2{font-size:20px}
  #student .pg.on .card{padding:14px}
}
@media(max-width:640px){
  #student{--stu-card-pad:13px;--stu-card-radius:11px;--stu-gap:12px}
  #student .pg.on .card{padding:var(--stu-card-pad);margin-bottom:10px}
  #student .pg.on .row{padding:11px 1px}
  #pgHome .sd-airow{grid-template-columns:1fr}
  #pgHome .sd-airow>.sd-ana-card{border-left:0;border-top:1px solid var(--stu-line)}
}
@media(max-width:479px){
  #pgHome .sd-airow>.sd-agent-bar{grid-template-columns:minmax(0,1fr) 46px}
  #pgHome .sd-agent-bar .sd-agent-open{min-height:74px;padding:10px 4px 10px 12px}
  #pgHome .sd-agent-bar .ta-bar-ic{width:32px;height:32px}
  #student #pgHome .sd-agent-bar .ta-bar-ic svg{width:20px;height:20px}
}
