/* CET teacher-theme.css and teacher dashboard: warm cards, scoped orange palette. */
.teaching-center { min-width: 0; }
.teaching-center .tc-draft-panel { padding: 14px; border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; min-width: 0; }
.teaching-center .tc-draft-panel p { margin: 0 0 10px; font-size: .87rem; }
.teaching-center .tc-draft-compare { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.teaching-center .tc-draft-compare h3 { margin-bottom: 8px; font-size: .9rem; }
.teaching-center .tc-draft-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.7; background: white; border: 1px solid #cbd5e1; border-radius: 10px; padding: 12px; max-height: 300px; overflow: auto; }
.teaching-center [data-live-draft-conflict] .tc-draft-text { border-color: #f59e0b; }
.teaching-center .tc-stale-draft { border-top: 1px solid #e2e8f0; padding-top: 14px; margin-top: 18px; }
@media (max-width:650px) { .teaching-center .tc-draft-compare { grid-template-columns: 1fr; } }
.teaching-center.teacher-shell {
  --primary: #F97316; --primary-hover: #EA580C; --primary-shadow: #C2410C;
  --primary-light: #FB923C; --primary-lighter: #FFEDD5;
}
.teaching-center h1, .teaching-center h2, .teaching-center h3 { overflow-wrap: anywhere; }
.teaching-center .tc-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin: 12px 0 24px; }
.teaching-center .tc-heading h1 { margin: 4px 0 8px; font-size: clamp(1.45rem, 4vw, 2rem); }
.teaching-center .tc-heading p { margin: 0; color: var(--muted, #64748b); line-height: 1.65; }
.teaching-center .tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.teaching-center .tc-actions .button { white-space: normal; text-align: center; }
.teaching-center .tc-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.teaching-center .tc-tabs a { padding: 8px 13px; border: 2px solid var(--card-border); border-radius: 14px; text-decoration: none; background: white; font-weight: 700; }
.teaching-center .tc-tabs a[aria-current] { border-color: var(--primary-light); background: var(--primary-lighter); color: var(--primary-shadow); }
.teaching-center .tc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.teaching-center .tc-card { padding: 22px; background: white; border: 2px solid var(--card-border); border-bottom-width: 5px; border-radius: 22px; min-width: 0; box-shadow: var(--clay-shadow); }
.teaching-center .tc-card h2, .teaching-center .tc-card h3 { margin: 0 0 12px; }
.teaching-center .tc-card p { line-height: 1.7; overflow-wrap: anywhere; }
.teaching-center .tc-card .tc-actions { margin-top: 14px; }
.teaching-center .tc-card-link { display: block; text-decoration: none; color: inherit; transition: border-color .2s; }
.teaching-center .tc-card-link:hover { border-color: var(--primary-light); }
.teaching-center .tc-stat-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.teaching-center .tc-stat { padding: 17px 10px; text-align: center; border: 2px solid var(--card-border); border-radius: 18px; background: white; min-width: 0; }
.teaching-center .tc-stat strong { display: block; color: var(--primary-shadow); font-size: 1.6rem; }
.teaching-center .tc-stat span { display: block; margin-top: 6px; font-size: .8rem; color: #64748b; overflow-wrap: anywhere; }
.teaching-center .tc-section { margin: 24px 0; }
.teaching-center .tc-section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.teaching-center .tc-section-header h2 { margin: 0; font-size: 1.2rem; }
.teaching-center .tc-stack { display: grid; gap: 14px; }
.teaching-center .tc-form { display: grid; gap: 14px; max-width: 760px; }
.teaching-center .tc-form label { display: grid; gap: 7px; font-weight: 700; font-size: .92rem; min-width: 0; }
.teaching-center input:not([type=radio]), .teaching-center select, .teaching-center textarea {
  width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 2px solid var(--card-border); border-radius: 14px; background: white; color: var(--foreground); font: inherit; font-weight: 400;
}
.teaching-center textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.teaching-center input:focus, .teaching-center textarea:focus, .teaching-center select:focus { outline: 3px solid var(--primary-lighter); border-color: var(--primary-light); }
.teaching-center .tc-form-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.teaching-center .tc-note { color: #64748b; font-size: .87rem; line-height: 1.7; overflow-wrap: anywhere; }
.teaching-center .tc-empty { padding: 26px 20px; border: 2px dashed var(--card-border); border-radius: 20px; text-align: center; background: rgba(255,255,255,.65); }
.teaching-center .tc-empty h2, .teaching-center .tc-empty h3 { margin: 0 0 8px; }
.teaching-center .tc-error { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; padding: 12px 14px; line-height: 1.6; overflow-wrap: anywhere; }
.teaching-center .tc-error[hidden] { display: none; }
.teaching-center [data-tc-action="audio-resume"][hidden] { display: none; }
.teaching-center .tc-status { display: inline-block; padding: 4px 9px; border-radius: 9px; background: var(--primary-lighter); color: var(--primary-shadow); font-size: .78rem; font-weight: 700; }
.teaching-center .tc-status.dim { background: #f1f5f9; color: #64748b; }
.teaching-center .tc-code { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.teaching-center .tc-code input { width: 150px; font-family: ui-monospace, monospace; letter-spacing: .12em; font-weight: 700; text-align: center; }
.teaching-center .tc-list { list-style: none; margin: 0; padding: 0; }
.teaching-center .tc-list li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--card-border); }
.teaching-center .tc-list li:last-child { border-bottom: 0; }
.teaching-center .tc-list li > div { min-width: 0; overflow-wrap: anywhere; }
.teaching-center .tc-person { display: flex; align-items: center; gap: 12px; }
.teaching-center .tc-person-symbol { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 14px; background: var(--primary-lighter); color: var(--primary-shadow); font-weight: 800; }
.teaching-center .tc-table-scroll { overflow-x: auto; max-width: 100%; }
.teaching-center .tc-table { border-collapse: collapse; width: 100%; text-align: left; font-size: .9rem; }
.teaching-center .tc-table th, .teaching-center .tc-table td { padding: 12px 10px; border-bottom: 1px solid var(--card-border); overflow-wrap: anywhere; }
.teaching-center .tc-table th { color: #64748b; font-size: .8rem; }
.teaching-center .tc-table .button { padding: 8px 12px; }
.teaching-center details > summary { cursor: pointer; font-weight: 700; line-height: 1.6; }
.teaching-center details[open] > summary { margin-bottom: 18px; }
.teaching-center .tc-question { font-family: inherit; line-height: 1.8; }
.teaching-center .tc-question .markdown { overflow-wrap: anywhere; }
.teaching-center .tc-question img { max-width: 100%; height: auto; }
.teaching-center .tc-choice-list { display: grid; gap: 10px; margin: 18px 0; }
.teaching-center .tc-choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 2px solid var(--card-border); border-radius: 14px; font-weight: 400; cursor: pointer; line-height: 1.6; }
.teaching-center .tc-choice:has(input:checked) { border-color: var(--primary-light); background: var(--primary-lighter); }
.teaching-center .tc-form label.tc-choice { display: flex; align-items: flex-start; font-weight: 400; min-height: 52px; }
.teaching-center .tc-form .tc-choice input[type="radio"] { width: 18px; height: 18px; min-height: 18px; min-width: 18px; max-width: 18px; padding: 0; margin: 5px 0 0; accent-color: var(--primary); flex: 0 0 18px; }
.teaching-center .tc-choice span { overflow-wrap: anywhere; min-width: 0; }
.teaching-center .tc-live-top { padding: 24px; background: var(--navy); color: white; border-radius: 22px; margin: 0 0 18px; }
.teaching-center .tc-live-top h1 { margin: 6px 0 10px; }
.teaching-center .tc-live-top .tc-note { color: #cbd5e1; }
.teaching-center .tc-live-stat { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 14px; font-size: .9rem; }
.teaching-center .tc-live-stat strong { font-size: 1.3rem; }
.teaching-center .tc-live-sync { display: block; min-height: 1.4em; font-size: .8rem; color: #cbd5e1; margin-top: 12px; }
.teaching-center [data-classroom-audio] { display: block; width: 100%; margin: 18px 0 10px; min-width: 0; }
.teaching-center .tc-distribution { display: grid; gap: 9px; margin: 16px 0; }
.teaching-center .tc-distribution-row { display: grid; grid-template-columns: 28px 1fr 45px; gap: 10px; align-items: center; }
.teaching-center .tc-distribution progress { width: 100%; height: 13px; accent-color: var(--primary); }
.teaching-center .tc-review-answer { padding: 14px; background: #f8fafc; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
.teaching-center .tc-source-note { border-left: 3px solid #d97706; padding: 8px 12px; background: #fffbeb; color: #92400e; font-size: .85rem; line-height: 1.6; margin: 12px 0; }
.tc-confirm-dialog { max-width: min(480px, calc(100vw - 32px)); width: 100%; box-sizing: border-box; border: 2px solid #E8E0D4; border-radius: 22px; padding: 24px; color: #1A1F36; }
.tc-confirm-dialog::backdrop { background: rgba(26,31,54,.45); }
.tc-confirm-dialog h2 { margin: 0 0 12px; }
.tc-confirm-dialog p { line-height: 1.7; overflow-wrap: anywhere; }
.tc-confirm-dialog .tc-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 650px) {
  .teaching-center .tc-grid, .teaching-center .tc-form-columns { grid-template-columns: 1fr; }
  .teaching-center .tc-heading { flex-direction: column; margin-bottom: 18px; }
  .teaching-center .tc-card { padding: 18px 16px; border-radius: 18px; }
  .teaching-center .tc-live-top { padding: 20px 16px; }
  .teaching-center .tc-table th, .teaching-center .tc-table td { padding: 10px 6px; }
  .teaching-center .tc-table { font-size: .8rem; }
  .teaching-center .tc-table .button { padding: 6px 8px; font-size: .8rem; }
}
@media (max-width: 700px) {
  .reference-theme #navigation [data-nav="resources"],
  .reference-theme #navigation [data-nav="teacher"] { display: none; }
}
@media (prefers-reduced-motion: reduce) { .teaching-center * { transition: none !important; } }
