/* Teacher tools: dashboard (/en/teach), public pages (/en/teachers), student assignment and shared collection pages.
   Built on the public page system in courses.css and brand.css (same tokens, buttons and form fields). */
.teach-app{min-height:320px}
.teach-loading,.teach-empty{color:var(--muted)}
.teach-help{font-size:14px;color:var(--muted);margin:2px 0 8px;line-height:1.5}
.teach-meta{font-size:14px;color:var(--muted);margin:2px 0 8px}
.teach-h{margin:30px 0 12px}
.teach-status{margin:12px 0;padding:10px 14px;border-radius:10px;background:#e9f6ef;color:#135c3a;font-weight:600;font-size:15px}
.teach-status:empty{display:none}
.teach-status.bad{background:#fdecea;color:#9b2a1f}
.teach-callout{border:1px solid #dde3ff;background:var(--brand-soft);border-radius:var(--radius);padding:18px 20px;margin:0 0 20px}
.teach-callout h2,.teach-callout h3{margin:0 0 6px}
.teach-callout p{margin:4px 0 10px}
.teach-callout.ok{background:#eef8f2;border-color:#cbe9d8}
.teach-callout.small{font-size:15px;padding:12px 14px;background:var(--pencil-wash);border-color:#f0d78e}
.teach-callout.handoff{background:var(--pencil-wash);border-color:#f0d78e}
.link-btn{background:none;border:0;padding:0;color:var(--brand);font:inherit;font-weight:600;text-decoration:underline;text-underline-offset:3px;cursor:pointer;text-align:left}
.button.small{min-height:38px;padding:7px 12px;font-size:14px}
.button.danger{color:#9b2a1f;border-color:#efc4be}
.button.danger:hover{background:#fdecea;border-color:#e3a39a}
.button[hidden],.teach-copy-actions a[hidden]{display:none}
.teach-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:10px 0}

/* Tabs */
.teach-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;font-size:14px;color:var(--muted);margin:-8px 0 14px}
.teach-top p{margin:0;overflow-wrap:anywhere}
.teach-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:18px;overflow-x:auto;scrollbar-width:none}
.teach-tabs::-webkit-scrollbar{display:none}
.teach-tabs [role=tab]{flex:0 0 auto;background:none;border:0;border-bottom:3px solid transparent;padding:12px 16px;min-height:46px;font:inherit;font-weight:650;font-size:16px;color:var(--muted);margin-bottom:-1px}
.teach-tabs [role=tab]:hover{color:var(--ink)}
.teach-tabs [role=tab][aria-selected=true]{color:var(--brand);border-bottom-color:var(--brand)}

/* Forms */
.teach-form{display:grid;gap:12px;max-width:720px}
.teach-form label{display:grid;gap:6px;font-size:15px;font-weight:650}
.teach-form label.teach-check{display:flex;align-items:flex-start;gap:10px;font-weight:500}
.teach-check input{width:20px;height:20px;margin-top:2px;accent-color:var(--brand);flex-shrink:0}
.teach-form input[type=email],.teach-form input[type=password],.teach-form input[type=date],.teach-form input[type=number],.teach-form input[type=search]{border:1px solid var(--line-strong);border-radius:9px;background:#fff;padding:10px 12px;color:var(--ink);min-width:0;width:100%;font-size:16px;min-height:44px}
.teach-form select{width:100%}
.teach-form optgroup{font-style:normal}
.teach-cols{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.teach-cols.narrow{max-width:420px;grid-template-columns:1fr;margin-bottom:14px}
.teach-cols label{display:grid;gap:6px;font-size:15px;font-weight:650}
.teach-fieldset{border:1px solid var(--line);border-radius:12px;padding:12px 14px 6px;margin:0;min-width:0}
.teach-fieldset legend{font-weight:700;padding:0 6px}
.teach-picker{display:grid;grid-template-columns:1fr 1.4fr;gap:12px}
.teach-box{border:1px solid var(--line);border-radius:var(--radius);background:#fbfcff;padding:4px 18px;margin:0 0 18px}
.teach-box[open]{padding-bottom:18px}
.teach-box>summary{font-family:var(--font-display);font-size:19px;font-weight:700;color:var(--ink);padding:12px 0;margin:0;list-style-position:inside}
.teach-sub{margin-top:8px;border-top:1px solid #edf0f6;padding-top:8px}
.teach-sub>summary{font-size:15px;margin:0}

/* Cards and chips */
.teach-cards{display:grid;gap:14px}
.teach-card{border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;background:#fff;min-width:0}
.teach-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.teach-card-head h3{font-size:19px;margin:0 0 2px;overflow-wrap:anywhere}
.teach-card-head .teach-row{margin:0}
.teach-chips{list-style:none;display:flex;flex-wrap:wrap;gap:6px;padding:0;margin:10px 0}
.teach-chips li{display:inline-flex;align-items:center;gap:2px;border:1px solid var(--line-strong);border-radius:999px;padding:2px 4px 2px 12px;font-size:14px;background:#fff}
.teach-x{display:inline-grid;place-items:center;min-width:32px;min-height:32px;border:0;border-radius:50%;background:none;color:var(--muted);font-size:20px;line-height:1;padding:0}
.teach-x:hover{background:#fdecea;color:#9b2a1f}
.teach-badge{display:inline-block;border-radius:999px;padding:3px 10px;font-size:13px;font-weight:700;background:var(--wash);color:var(--muted);white-space:nowrap}
.teach-badge.ok{background:#e4f4ea;color:#17613d}
.teach-badge.no{background:#fdecea;color:#9b2a1f}
.teach-badge.wait{background:var(--pencil-wash);color:#7a5a14}
.teach-link{margin:10px 0}
.teach-link label{display:block;font-size:14px;font-weight:650;margin-bottom:4px}
.teach-link-row{display:flex;gap:8px}
.teach-link-row input{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px}
.teach-items,.teach-chosen{list-style:none;padding:0;margin:10px 0;display:grid;gap:6px}
.teach-items li,.teach-chosen li{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;border:1px solid #edf0f6;border-radius:10px;padding:6px 6px 6px 12px;font-size:15px}
.teach-items li>span:first-child,.teach-chosen li>span{min-width:0;overflow-wrap:anywhere}
.teach-items small{color:var(--muted);margin-left:4px}
.teach-items .teach-row{margin:0}

/* Progress grid and assignment results */
.teach-grid-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);margin:4px 0 12px}
.teach-grid{border-collapse:collapse;width:100%;font-size:14px}
.teach-grid th,.teach-grid td{padding:10px 12px;border-bottom:1px solid #edf0f6;text-align:left;vertical-align:top;white-space:nowrap}
.teach-grid thead th{background:var(--wash);font-weight:650;min-width:130px;white-space:normal}
.teach-grid thead th small{display:block;font-weight:500;color:var(--muted)}
.teach-grid tbody th{position:sticky;left:0;background:#fff;font-weight:650;z-index:1;box-shadow:1px 0 0 #edf0f6}
.teach-grid thead th:first-child{position:sticky;left:0;z-index:2}
.teach-grid th:first-child{width:200px;min-width:120px}
.teach-prose{max-width:900px}
.teach-cell{display:inline-block;border-radius:8px;padding:3px 8px;font-weight:700;font-variant-numeric:tabular-nums}
.teach-cell small{font-weight:500;margin-left:4px}
.teach-cell.good{background:#e4f4ea;color:#17613d}
.teach-cell.mid{background:var(--pencil-wash);color:#7a5a14}
.teach-cell.low{background:#fdecea;color:#9b2a1f}
.teach-none{color:var(--muted)}
.teach-wait{display:block;color:#7a5a14;font-weight:600}
.teach-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px;align-items:start}
.teach-detail h3{font-size:19px;margin:16px 0 10px}
.teach-qstats{padding-left:22px;margin:0}
.teach-qstats li{margin-bottom:14px}
.teach-qprompt{margin:0 0 2px;font-weight:600;white-space:pre-wrap;overflow-wrap:anywhere}
.teach-bar{height:10px;border-radius:6px;background:#e6eaf6;overflow:hidden;margin:6px 0 2px;max-width:420px}
.teach-bar span{display:block;height:100%;background:var(--brand);border-radius:6px}
.teach-subm{border:1px solid var(--line);border-radius:12px;padding:4px 14px;margin-bottom:8px;background:#fff}
.teach-subm>summary{display:flex;justify-content:space-between;gap:10px;margin:0;padding:8px 0;color:var(--ink)}
.teach-review{padding-left:0;list-style:none;margin:8px 0;display:grid;gap:10px}
.teach-review>li{border-top:1px solid #edf0f6;padding-top:8px}
.teach-review-top{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.teach-response{white-space:pre-wrap;overflow-wrap:anywhere;margin:4px 0}
.teach-mark{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.teach-mark label{display:grid;gap:4px;font-size:14px;font-weight:650}
.teach-mark input{width:110px;border:1px solid var(--line-strong);border-radius:9px;padding:8px 10px;font-size:16px;min-height:40px}

/* Signed out */
.teach-signin{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:32px;align-items:start}
.teach-signin h2{margin-top:0}
.teach-ticks{padding-left:20px;line-height:1.8}
.teach-auth{border:1px solid var(--line);border-radius:var(--radius);padding:18px;background:#fbfcff}
.teach-auth-tabs{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line-strong);border-radius:10px;overflow:hidden}
.teach-auth-tabs button{border:0;background:#fff;padding:10px;font:inherit;font-weight:650;min-height:44px;color:var(--muted)}
.teach-auth-tabs button[aria-pressed=true]{background:var(--brand);color:#fff}

/* Public page */
.teach-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:10px}
.teach-feature{border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;background:#fff}
.teach-feature h2{font-size:19px;margin:0 0 6px}
.teach-feature p{margin:0;font-size:15px;color:var(--muted);line-height:1.55}
.teach-steps li{margin-bottom:8px}

/* Student assignment page */
.teach-student{max-width:860px}
.teach-student-head p{margin-bottom:4px}
.teach-due{font-weight:650;color:var(--ink)!important;font-size:16px!important}
.teach-who{border:1px solid var(--line);border-radius:var(--radius);background:#fbfcff;padding:14px 16px;margin:0 0 18px;display:grid;gap:6px;max-width:520px}
.teach-who legend{font-weight:700;padding:0 6px}
.teach-who label{font-weight:650;font-size:15px}
.teach-instructions{white-space:pre-wrap;background:var(--wash);border-radius:10px;padding:12px 14px}
.teach-q .teach-q-body{clear:both}
.teach-q .diagram{display:block;width:220px;max-width:100%;height:auto;margin:0 0 10px}
.teach-q textarea{width:100%}
.teach-answer-row{display:flex;align-items:center;gap:8px;max-width:420px}
.teach-q-points{font-size:13px;color:var(--muted);margin:8px 0 0}
.teach-passage{border:1px solid var(--line-strong);border-radius:12px;padding:14px 16px;margin:18px 0 6px;background:#fbfcff}
.teach-passage h2{font-size:18px;margin:0 0 6px}
.teach-passage p{white-space:pre-wrap;margin:0}
.teach-submit{position:sticky;bottom:0;background:rgba(255,255,255,.95);padding:12px 0;margin-top:8px;border-top:1px solid var(--line);display:flex;gap:14px;align-items:center;flex-wrap:wrap;z-index:5}
.teach-submit .teach-status{margin:0}
.teach-result{margin:0 0 24px}
.teach-result:focus{outline:none}
.teach-score{border:1px solid #cbe9d8;background:#eef8f2;border-radius:var(--radius);padding:18px 20px;margin-bottom:12px}
.teach-score h2{margin:2px 0 8px}
.teach-score .teach-bar{background:#d3eadd}
.teach-score .teach-bar span{background:var(--ok)}
.teach-explain{color:var(--muted);font-size:15px;white-space:pre-wrap}
.teach-privacy-note{font-size:14px;color:var(--muted);margin-top:22px;border-top:1px solid var(--line);padding-top:12px}

/* Shared collection page */
.teach-sheets{list-style:none;padding:0;margin:0;display:grid;gap:10px}
.teach-sheet{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap;border:1px solid var(--line);border-radius:var(--radius);padding:14px 18px}
.teach-sheet h2{font-size:18px;margin:0 0 2px;overflow-wrap:anywhere}
.teach-sheet p{margin:0;color:var(--muted);font-size:14px}
.teach-sheet-actions,.teach-copy-actions{display:flex;gap:8px;flex-wrap:wrap}
.teach-copy{align-items:center}

@media(max-width:860px){
 .teach-detail,.teach-signin{grid-template-columns:1fr}
 .teach-features{grid-template-columns:1fr}
}
@media(max-width:600px){
 .teach-cols,.teach-picker{grid-template-columns:1fr}
 .teach-box{padding:2px 14px}
 .teach-card{padding:14px}
 .teach-link-row{flex-direction:column}
 .teach-link-row .button{width:100%}
 .teach-sheet-actions,.teach-sheet-actions .button{width:100%}
 .teach-tabs{display:grid;grid-template-columns:repeat(4,auto);gap:0}
 .teach-tabs [role=tab]{padding:10px 4px;font-size:14px}
}
@media print{.teach-submit,.teach-privacy-note,.teach-tabs{display:none}}
