:root {
  --bg:#f4f3ef; --card:#fff; --ink:#202832; --muted:#69717a; --line:#e2e4e5;
  --accent:#984638; --ok:#356957; --warn:#956324; --add:#eaf3ed; --del:#f9ece9; --info:#edf2f7;
  --sel:#e9eeed; --hover:#f0f2f0; --serif:"Noto Serif",Georgia,serif;
  --sans:"Noto Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
  --top:76px; --list-width:44%;
}
* { box-sizing:border-box; }
html,body { margin:0; height:100%; background:var(--bg); color:var(--ink); font:15px/1.5 var(--sans); }
body { overflow:hidden; }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:7px 13px; background:#fff; color:var(--ink); border:1px solid #d8dcdf; border-radius:6px; font-size:13px; font-weight:550; cursor:pointer; transition:background .12s,border-color .12s; }
button:hover:not(:disabled) { background:#f0f2f2; border-color:#aab2b9; }
button:disabled { opacity:.42; cursor:default; }
button.primary { background:var(--ink); color:#fff; border-color:var(--ink); }
button.primary:hover:not(:disabled) { background:#394554; }
button.pub { background:var(--ok); color:#fff; border-color:var(--ok); }
button.pub:hover:not(:disabled) { background:#254f40; }
button.danger { color:#954c43; border-color:transparent; background:transparent; }
button.ghost { background:transparent; border-color:transparent; }
button.sm { min-height:30px; font-size:12px; padding:4px 9px; }
:focus-visible { outline:2px solid #637f92; outline-offset:3px; }
kbd { font:11px/1.6 var(--sans); display:inline-block; min-width:19px; text-align:center; border:1px solid #d6dbdd; border-radius:4px; background:#fff; color:#677079; }
.muted { color:var(--muted); }
.pad { padding:28px; }
.err { color:var(--accent); }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.row.end { justify-content:flex-end; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.eyebrow { display:block; font-size:10px; font-weight:650; text-transform:uppercase; letter-spacing:.15em; color:#79818a; }
/* Global chrome: one deliberate ink band, no dashboard clutter. */
.top { height:var(--top); background:#202832; color:#eef0ef; display:flex; align-items:center; gap:30px; padding:0 28px; }
.brand { display:flex; align-items:center; gap:12px; font-size:16px; letter-spacing:-.3px; white-space:nowrap; }
.brand strong { font-weight:650; }
.brand-mark { width:33px; height:37px; display:grid; place-items:center; color:#e2c5a2; }
.brand-mark svg { width:28px; height:28px; }
.top nav { align-self:stretch; display:flex; align-items:stretch; gap:22px; flex:1; }
.top nav a { position:relative; display:flex; align-items:center; gap:7px; color:#aeb8c0; font-size:13px; font-weight:500; white-space:nowrap; }
.top nav a:hover { color:#fff; }
.top nav a.on { color:#fff; }
.top nav a.on::after { content:""; position:absolute; bottom:0; height:3px; left:0; right:0; background:#dbc09f; }
.top nav b { display:inline-flex; min-width:19px; height:19px; padding:0 5px; align-items:center; justify-content:center; background:#37424e; color:#dce3e8; font-size:10px; font-weight:550; border-radius:4px; }
.top nav b:empty { display:none; }
.env { display:flex; align-items:center; gap:7px; color:#b8c1c8; font-size:11px; white-space:nowrap; }
.env::before { content:""; width:5px; height:5px; border-radius:50%; background:#c9ac80; }
button.ask { color:#262e36; background:#ece4d8; border-color:#ece4d8; font-size:12px; white-space:nowrap; }
button.ask:hover { background:#fff4e4; }
/* Two equally important work surfaces. Divider width is persisted by JS. */
.mail { display:grid; grid-template-columns:minmax(340px,var(--list-width)) 7px minmax(0,1fr); height:calc(100dvh - var(--top)); }
.listpane { min-width:0; min-height:0; display:flex; flex-direction:column; background:#f6f7f5; }
.listintro { padding:24px 32px 16px; }
.listintro h1 { font:400 34px/1.15 var(--serif); letter-spacing:-.8px; margin:8px 0; }
.listintro p { margin:0; font-size:15px; color:#59646c; }
.listhead { padding:0 32px 18px; display:grid; gap:14px; border-bottom:1px solid var(--line); }
.listhead input,.listhead select { width:100%; min-width:0; border:1px solid #dbe0df; background:#fff; border-radius:6px; color:var(--ink); padding:9px 11px; font-size:15px; }
.listhead input { height:42px; padding-left:36px; background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%237a858c' stroke-width='1.5'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='m10.5 10.5 4 4'/%3E%3C/svg%3E") no-repeat 12px center; }
.listhead .two { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.folders { display:flex; flex-wrap:wrap; gap:5px; }
.folders button { min-height:32px; font-size:12px; background:transparent; border-color:transparent; color:#717980; padding:5px 9px; }
.folders button.on { background:#fff; border-color:#d7dddb; color:#243b35; box-shadow:0 1px 2px #18282208; }
.folders button i { font-style:normal; font-size:10px; font-variant-numeric:tabular-nums; opacity:.65; }
.listfoot { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; color:#59646c; font-size:13px; }
.listfoot button { font-size:13px; }
.listfoot label { display:flex; align-items:center; gap:7px; }
.listfoot select { padding:3px 6px; }
.list { min-height:0; flex:1; overflow-y:auto; padding:8px 16px 20px; scrollbar-width:thin; scrollbar-color:#c7ceca transparent; }
.li { position:relative; padding:14px 16px; border:1px solid transparent; border-bottom-color:#e4e8e4; border-radius:0; cursor:pointer; }
.li:hover { background:var(--hover); }
.li.on { background:var(--sel); border-color:#d3deda; border-radius:7px; }
.li .l1 { display:flex; gap:14px; align-items:baseline; justify-content:space-between; }
.li .t { min-width:0; font-size:18px; font-weight:600; letter-spacing:-.15px; line-height:1.45; overflow-wrap:anywhere; }
.li .when { font-size:13px; color:#59646c; white-space:nowrap; }
.li .l2 { color:#515e65; font-size:16px; margin-top:5px; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.li .l3 { display:flex; gap:7px; align-items:center; flex-wrap:wrap; margin-top:7px; }
.li .chip { font-size:13px; padding:2px 8px; }
.li .l3 .when { margin-left:auto; }
.li .n { font-size:14px; color:#946248; font-variant-numeric:tabular-nums; white-space:nowrap; }
.li.dim .t { color:#7e868b; font-weight:400; }
.listbottom { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 30px; border-top:1px solid var(--line); font-size:10px; color:#7b848b; }
.listbottom kbd { margin-right:2px; }
.divider { cursor:col-resize; position:relative; background:#ecefeb; border-left:1px solid #dde2df; border-right:1px solid #dde2df; touch-action:none; z-index:5; }
.divider span { position:absolute; top:50%; left:1px; width:3px; height:32px; background:#bac6c0; border-radius:3px; }
.divider:hover,.divider:focus-visible { background:#d2ddd7; }
body.resizing { cursor:col-resize; user-select:none; }
.readpane { position:relative; min-width:0; overflow-y:auto; background:#fff; container-type:inline-size; scrollbar-width:thin; scrollbar-color:#d6dadd transparent; }
.readpane .empty { min-height:100%; display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; padding:36px; color:var(--muted); }
.empty-mark { color:#b6c1bf; font-size:32px; font-family:var(--serif); margin-bottom:12px; }
.empty h2 { color:#4a555f; font:400 26px var(--serif); margin:0 0 10px; }
.empty p { font-size:13px; max-width:310px; margin:0; line-height:1.7; }
/* Reader chrome stays compact; the document is a measured column. */
.rhead { position:sticky; top:0; z-index:3; padding:18px 28px; background:#fff; border-bottom:1px solid var(--line); }
.rhead .meta1 { display:flex; align-items:center; gap:6px; flex-wrap:wrap; font-size:11px; min-height:25px; }
.rhead .meta1>.muted { max-width:65%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rhead h1 { font:550 17px/1.45 var(--sans); letter-spacing:-.3px; margin:12px 0 14px; }
.rhead .acts { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-top:12px; }
.rhead .acts .sp { flex:1; }
.rhead .nav2 { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.nav2 button { border:1px solid var(--line); min-width:29px; }
.viewtabs { display:inline-flex; flex-wrap:wrap; align-items:center; gap:3px; border-radius:6px; padding:3px; background:#f1f3f3; }
.viewtabs button { border:0; border-radius:4px; background:transparent; min-height:27px; padding:4px 9px; font-size:11px; color:var(--muted); }
.viewtabs button.on { background:#fff; color:var(--ink); box-shadow:0 1px 3px #17293813; }
.review-views { margin-top:12px; padding-top:12px; border-top:1px solid #eff0f1; }
.rbody { width:100%; max-width:880px; margin:0 auto; padding:40px 44px 64px; }
.rbody:has(.split:not(.one)) { max-width:1600px; }
.split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:36px; }
.split.one { grid-template-columns:minmax(0,1fr); }
.pane { min-width:0; }
.pane>h4 { font:600 10px/1.5 var(--sans); letter-spacing:.1em; text-transform:uppercase; margin:0 0 24px; color:var(--muted); }
@container (max-width:1000px) { .split:not(.one) { grid-template-columns:minmax(0,1fr); } }
.doc { font:17px/1.85 var(--serif); color:#303942; overflow-wrap:anywhere; }
.student-frame { display:block; width:100%; min-height:100px; border:0; background:transparent; border-radius:8px; }
.doc .meta { color:var(--muted); font:12px/1.8 var(--sans); padding-bottom:24px; margin-bottom:28px; border-bottom:1px solid var(--line); }
.doc .meta .t { display:block; font:400 32px/1.25 var(--serif); letter-spacing:-.7px; color:#1e2934; margin-bottom:15px; }
.doc .meta .chip { background:#f1f3f2; color:#7a8288; font-size:10px; }
.doc h2 { font:600 11px/1.5 var(--sans); text-transform:uppercase; letter-spacing:.13em; color:#966348; margin:34px 0 14px; }
.doc h3 { font:600 18px/1.55 var(--serif); margin:24px 0 10px; }
.doc p { margin:12px 0; }
.doc ul,.doc ol { padding-left:23px; }
.doc li { margin:6px 0; }
.doc table { width:100%; border-collapse:collapse; margin:20px 0; font-size:15px; }
.doc th,.doc td { padding:9px 12px; border:1px solid var(--line); }
.doc th { background:#f5f6f4; }
.doc .katex-display { overflow-x:auto; overflow-y:hidden; padding:8px 0; margin:18px 0; }
.doc .katex { font-size:1.04em; }
.doc code { background:#f3f4f1; font-size:13px; padding:2px 4px; border-radius:3px; }
.doc .katex-error { background:var(--del); }
.doc.src { font:12px/1.85 ui-monospace,SFMono-Regular,Consolas,monospace; white-space:pre-wrap; background:#f7f8f6; border:1px solid var(--line); padding:22px; border-radius:6px; }
.doc pre { white-space:pre-wrap; }
.diffline { display:block; }
.diffline.add { background:var(--add); }
.diffline.del { background:var(--del); color:#99534c; text-decoration:line-through; }
.chip { display:inline-flex; align-items:center; font:500 10px/1.5 var(--sans); padding:3px 7px; border-radius:4px; color:#505b61; background:#edf0ee; max-width:100%; overflow-wrap:anywhere; }
.chip.review { background:#f6eedf; color:#936729; }
.chip.working,.chip.redo,.chip.queued,.chip.running { background:var(--info); color:#55718b; }
.chip.approved,.chip.done,.chip.published { background:#e6efe9; color:#43755f; }
.chip.failed,.chip.err { background:var(--del); color:#9b5046; }
.chip.discarded,.chip.ignore { background:#eee; color:#888; }
.chip.new { background:#eeeaf3; color:#77638a; }
.metachg { font-size:12px; background:var(--info); border-radius:5px; padding:10px 12px; margin-top:12px; }
.metachg del { color:#99564c; } .metachg ins { color:var(--ok); text-decoration:none; }
.checks { font:12px/1.7 var(--sans); margin-top:10px; }
.checks .e { color:var(--accent); } .checks .w { color:var(--warn); }
/* Conversation is part of the document, not another dashboard card. */
.threadbox { margin-top:52px; padding-top:28px; border-top:1px solid var(--line); }
.threadbox h4 { font:600 11px var(--sans); letter-spacing:.09em; text-transform:uppercase; color:#728078; margin:0 0 24px; }
.msg { font-size:13px; line-height:1.7; margin:20px 0; }
.msg .who { font-size:10px; color:#818a90; margin-bottom:6px; }
.msg .b { padding:14px 16px; border-radius:6px; background:#f2f4f2; white-space:pre-wrap; }
.msg.duc .b { background:#eef1f5; }
.msg.system .b { background:transparent; padding:0; color:#828a90; font-size:12px; }
.msg.system.error .b { color:var(--accent); }
.compose { margin-top:18px; padding:14px; border:1px solid #d8dedd; border-radius:7px; background:#fff; }
.compose:focus-within { border-color:#8ea89d; box-shadow:0 0 0 2px #8ea89d15; }
.compose textarea { width:100%; font:13px/1.7 var(--sans); min-height:90px; border:0; outline:0; resize:vertical; color:var(--ink); }
.compose textarea::placeholder { color:#97a0a4; }
.compose .row { margin-top:10px; padding-top:10px; border-top:1px solid #eef0ef; }
.pending { font-size:12px; color:#577187; background:var(--info); padding:9px 12px; border-radius:5px; margin-top:12px; }
.spin { display:inline-block; height:10px; width:10px; border:2px solid #68879b; border-right-color:transparent; border-radius:50%; animation:s .8s linear infinite; margin-right:6px; }
@keyframes s { to { transform:rotate(360deg); } }
/* Missing concepts and activity use the same editorial rhythm. */
.kv { display:grid; grid-template-columns:125px minmax(0,1fr); gap:16px 20px; font-size:13px; padding-bottom:30px; margin:0 0 30px; border-bottom:1px solid var(--line); }
.kv div:nth-child(odd) { color:#818990; font-size:12px; }
.kv code { font-size:11px; overflow-wrap:anywhere; }
.kv .chip { margin:0 4px 4px 0; }
.cand { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:18px 0; border-bottom:1px solid var(--line); }
.cand .ct { font-size:14px; font-weight:600; margin-bottom:4px; }
.cand>.row { justify-content:flex-end; flex-shrink:0; max-width:42%; }
.cand.exact .ct { color:var(--ok); }
.cand button { border-color:#dce1df; }
.jobres { font-size:14px; line-height:1.85; white-space:pre-wrap; overflow-wrap:anywhere; }
dialog { border:1px solid #d8dedb; border-radius:12px; padding:0; width:min(600px,94vw); box-shadow:0 24px 90px #121e2c30; }
dialog::backdrop { background:#1c2a3b66; }
.ask-form { padding:32px; }
.ask-form h2 { font:400 28px/1.3 var(--serif); letter-spacing:-.5px; margin:10px 0; }
.ask-form p { font-size:13px; line-height:1.7; }
.ask-form textarea { width:100%; padding:14px; font-size:14px; line-height:1.7; border:1px solid #d9dfdc; border-radius:6px; margin:12px 0 20px; resize:vertical; }
#toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); z-index:20; padding:12px 22px; border-radius:6px; background:var(--ink); color:#fff; font-size:13px; box-shadow:0 4px 16px #14223126; opacity:0; pointer-events:none; transition:opacity .15s; }
#toast.on { opacity:1; }
.back { display:none; }
@media (min-width:1900px) { .listintro { padding-top:28px; } .li { padding-top:16px; padding-bottom:16px; } .listintro,.listhead { padding-left:40px; padding-right:40px; } .list { padding-left:24px; padding-right:24px; } }
@media (max-width:1200px) { .top { gap:20px; padding:0 20px; } .top nav { gap:15px; } .env { display:none; } .rhead { padding:16px 20px; } .rbody { padding:30px; } .listintro,.listhead { padding-left:24px; padding-right:24px; } .resize-hint { display:none; } }
@media (max-width:900px) {
  :root { --top:110px; }
  .top { height:var(--top); flex-wrap:wrap; gap:0 16px; padding:10px 20px 0; }
  .brand { flex:1; }
  .top nav { order:3; flex-basis:100%; gap:24px; height:45px; }
  .mail { grid-template-columns:minmax(0,1fr); }
  .divider { display:none; }
  .mail.reading .listpane { display:none; }
  .mail:not(.reading) .readpane { display:none; }
  .back { display:inline-flex; }
  .listintro { padding-top:24px; }
  .listintro h1 { font-size:30px; }
}
@media (max-width:520px) {
  .top { padding-left:16px; padding-right:16px; }
  .brand { font-size:14px; gap:6px; }
  .brand-mark { width:25px; }
  .top nav { gap:18px; }
  .top nav a { font-size:11px; gap:4px; }
  button.ask { font-size:11px; padding:7px 9px; }
  .listintro,.listhead { padding-left:20px; padding-right:20px; }
  .list { padding-left:8px; padding-right:8px; }
  .listbottom { padding:10px 20px; }
  .rhead { padding:12px 16px; }
  .rbody { padding:28px 22px; }
  .doc { font-size:16px; }
  .doc .meta .t { font-size:27px; }
  .kv { grid-template-columns:95px minmax(0,1fr); gap:14px 12px; }
  .cand { align-items:flex-start; }
  .cand>.row { max-width:38%; }
  button { min-height:40px; }
  .ask-form { padding:24px; }
}
@media (prefers-reduced-motion:reduce) { * { transition:none!important; animation:none!important; } }
body.login { display:grid; place-items:center; min-height:100dvh; overflow:auto; background:#202832; }
.login-box { background:#f7f6f2; padding:36px; border-radius:10px; display:grid; gap:16px; width:340px; max-width:92vw; box-shadow:0 16px 60px #0003; }
.login-box h1 { font:400 28px var(--serif); margin:0; }
.login-box input { width:100%; min-width:0; border:1px solid #d0d7d3; background:#fff; border-radius:6px; padding:12px; font:22px var(--sans); letter-spacing:.35em; text-align:center; }
