@import url("/paper-scope.css");
@import url("/prototypes/v23/site/motion.css");
/* v2.5 shared student interface */
:root{color-scheme:light;--bg:#edf7ff;--surface:#fff;--ink:#101b30;--muted:#54647a;--accent:var(--student-primary,#006dcc);--line:#d9e6f2;--soft:#e0f0ff;--danger:#a02e3a;--success:#24664f;font-family:"Segoe UI","Noto Sans TC",sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none;accent-color:var(--accent);scrollbar-color:#91b2ce var(--bg)}
*{box-sizing:border-box}body{margin:0;font-size:1rem;line-height:1.65}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.65}a{color:inherit;text-underline-offset:4px}[hidden]{display:none!important}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:"Noto Sans TC",sans-serif;overflow-wrap:anywhere}h1{font-weight:750;font-size:3rem;line-height:1.2;letter-spacing:-.025em}h2{font-size:1.5rem;line-height:1.4;font-weight:700}h3{font-size:1.125rem;font-weight:700}p{overflow-wrap:anywhere}svg{display:block;flex-shrink:0}::selection{background:#bedfff;color:#101b30}input,textarea{caret-color:var(--accent)}
:where(button,a,summary,input,select,textarea,[tabindex]):focus-visible{outline:3px solid var(--accent);outline-offset:4px}input,select,summary,button,a{scroll-margin-block:90px 100px}
.skip{position:fixed;top:-100px;left:16px;padding:12px;background:var(--surface);z-index:100}.skip:focus{top:12px}.sr-only{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.muted{color:var(--muted);font-size:.875rem}.eyebrow{font-size:.875rem;color:var(--muted)}.page-edition,.heading-dot,.sidebar-note{display:none}
.shell-header{display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:76px;padding:0 40px;background:var(--surface);color:var(--ink);border-bottom:1px solid var(--line);position:relative;z-index:30}.brand{display:flex;align-items:center;gap:8px;text-decoration:none;font-size:1.5rem;font-weight:750;white-space:nowrap;flex-shrink:0}.brand-symbol{color:var(--accent);font-weight:800}.brand-sub{font-size:inherit;color:inherit}.account{display:flex;align-items:center;gap:10px;min-height:44px;max-width:180px;min-width:0;flex-shrink:0;text-decoration:none;font-size:.875rem}.account svg{width:22px;height:22px;color:var(--muted)}#accountName{overflow-wrap:anywhere}
/* Desktop destinations remain in one row; only the navigation scrolls at narrow widths. */
.navigation-rail{display:flex;flex:1;min-width:0;align-self:stretch}
.navigation-scroll{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:44px;min-height:44px;padding:8px;border:0;border-radius:0;background:var(--surface);color:var(--accent)}
.navigation-scroll:hover:enabled{background:var(--soft)}
.navigation-scroll svg{width:20px;height:20px}
#navigation{display:flex;flex:1;min-width:0;align-self:stretch;align-items:stretch;justify-content:safe center;gap:8px;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#91b2ce var(--surface)}
#navigation a,#navigation button{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:12px 8px;border:0;border-bottom:3px solid transparent;border-radius:0;background:none;color:var(--ink);text-decoration:none;font-size:1rem;white-space:nowrap}
#navigation .nav-group-start{margin-left:16px}
#navigation .nav-group-start::before{content:"";position:absolute;left:-12px;top:50%;height:20px;width:1px;background:var(--line);transform:translateY(-50%)}
#navigation svg{display:none;width:22px;height:22px}#navigation [aria-current=page]{color:var(--accent);border-bottom-color:var(--accent);font-weight:700}#navigation a:hover,#navigation button:hover{color:var(--accent);background:#f4f9ff}
#navigation a:focus-visible,#navigation button:focus-visible{outline-offset:-4px}
#navigation #openMore{display:none}
@media(min-width:768px){.assignments-page .assignment-header{display:none}}
main{max-width:1440px;padding:40px 40px 64px;margin:auto;min-width:0;container-type:inline-size}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px}.page-heading>div:first-child{min-width:0}.primary{display:inline-flex;align-items:center;justify-content:center;gap:16px;min-height:48px;padding:10px 24px;background:var(--accent);color:#fff;border:0;border-radius:28px;text-decoration:none;font-weight:600;font-size:1rem}.primary:hover{background:var(--student-primary-hover,#005eb2)}.text-button{border:0;padding:8px 0;background:none;text-decoration:underline;text-underline-offset:4px;font-size:.875rem;color:var(--accent);min-height:44px}.page-footer,.site-footer{display:flex;justify-content:space-between;gap:16px;margin:40px auto 0;border-top:1px solid var(--line);padding:24px 0;font-size:.875rem;color:var(--muted)}.site-footer{max-width:1360px;margin:0 auto;padding:24px 40px}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.dialog-heading button{min-height:44px;border:1px solid var(--line);border-radius:24px;padding:8px 18px;background:var(--surface);color:var(--ink)}dialog{width:min(560px,calc(100% - 32px));max-height:85dvh;overflow:auto;padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink)}dialog::backdrop{background:#152b4c66}#moreLinks a{display:flex;align-items:center;gap:16px;padding:18px 0;border-bottom:1px solid var(--line);text-decoration:none}#moreLinks a:hover{color:var(--accent)}
@media(max-width:1100px) and (min-width:768px){.shell-header{padding:0 24px;gap:12px}.brand{font-size:1.125rem}#navigation{gap:4px}.account{max-width:140px}main{padding:32px 24px 56px}}
@media(max-width:767px){.navigation-rail{display:contents}}
@media(max-width:767px){h1{font-size:2.125rem}h2{font-size:1.375rem}.shell-header{min-height:68px;padding:12px 20px;gap:16px}.brand{font-size:1.2rem;min-width:0;white-space:normal;flex-shrink:1}.account{max-width:40%;font-size:.8rem}.account svg{width:20px;height:20px}#navigation{position:fixed;z-index:40;inset:auto 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:0;min-height:64px;padding:5px 8px calc(5px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface);overflow:visible}#navigation a,#navigation button{flex-direction:column;gap:2px;padding:4px 0;border:0;font-size:.75rem;min-height:50px;white-space:normal}#navigation .desktop-tool{display:none}#navigation #openMore{display:flex}#navigation svg{display:block}#navigation [aria-current=page]{border:0;color:var(--accent)}main{padding:26px 20px calc(100px + env(safe-area-inset-bottom))}.page-heading{gap:16px;margin-bottom:22px}.page-footer,.site-footer{flex-wrap:wrap;font-size:.8rem}.site-footer{padding:20px 20px 100px}.page-footer span:last-child{display:none}dialog{padding:20px}.journal-page.keyboard-open #navigation{visibility:hidden}.assignments-page .assignment-shell{display:none}}
@media(max-width:767px){.shell-header{flex-wrap:wrap}.shell-header .brand{flex-shrink:0;white-space:nowrap;max-width:100%}.shell-header .account{max-width:calc(100% - 64px)}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* Mobile: all public tools first, then the personal destination and overflow. */
#moreLinks small{margin-left:auto;font-size:.75rem;color:var(--muted);white-space:nowrap}
@media(max-width:767px){
  #navigation{grid-template-columns:repeat(6,minmax(0,1fr))}
  #navigation a[data-mobile-order]{display:flex;min-width:44px;margin-left:0}
  #navigation [data-mobile-order="0"]{order:0}#navigation [data-mobile-order="1"]{order:1}
  #navigation [data-mobile-order="2"]{order:2}#navigation [data-mobile-order="3"]{order:3}
  #navigation [data-mobile-order="4"]{order:4}#navigation #openMore{order:5;min-width:44px}
  #navigation a span{max-width:100%;text-align:center;overflow-wrap:anywhere;line-height:1.35}
  #navigation .nav-group-start::before{left:-1px}
  #navigation:has([data-mcq-entry][hidden]){grid-template-columns:repeat(5,minmax(0,1fr))}
}
