/*
 * The instructor panel (/teach) and the public instructor page.
 * On top of site.css; uses its tokens (--teal, --line, --panel …).
 */

.teach-page { min-width: 0; }
.teach-gap { margin-top: 16px; }
.teach-section { margin-top: 20px; }
.teach-subtitle { margin: 26px 0 12px; font-size: 16px; }
.teach-crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.teach-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.teach-head .page-title { margin: 0; }
.teach-head .page-lede { margin: 2px 0 0; }
.teach-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.teach-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.req { color: var(--red); }
.panel-user .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* applying */
.teach-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.teach-intro > div { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px; display: grid; gap: 4px; }
.teach-intro b { font-size: 15px; }
.teach-intro span { color: var(--muted); font-size: 13.5px; }
.teach-state { display: flex; gap: 16px; align-items: flex-start; }
.teach-state b { font-size: 16px; display: block; margin-bottom: 4px; }
.teach-state p { color: var(--ink-2); margin-bottom: 10px; }
.teach-state-icon { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--amber-soft); position: relative; }
.teach-state-icon::after { content: ''; position: absolute; inset: 13px; border: 3px solid var(--amber); border-radius: 50%; border-top-color: transparent; }
.teach-state-icon.is-stop { background: var(--red-soft); }
.teach-state-icon.is-stop::after { border-color: var(--red); }

/* review status of a course or class */
.teach-review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-radius: 16px; padding: 14px 18px; margin-bottom: 16px; background: var(--panel); box-shadow: var(--shadow); border-inline-start: 4px solid var(--muted); }
.teach-review > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.teach-review b { font-size: 15px; }
.teach-review span { color: var(--ink-2); font-size: 13.5px; }
.teach-review.is-ok { border-color: var(--teal); }
.teach-review.is-wait { border-color: var(--amber); background: #fffbf2; }
.teach-review.is-fix { border-color: var(--red); background: #fff8f7; }
.teach-studio-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; padding: 18px 22px; }
.teach-studio-cta > div { display: grid; gap: 2px; flex: 1 1 280px; }
.teach-studio-cta span { color: var(--ink-2); font-size: 13.5px; }

/* forms */
.teach-cover, .teach-avatar-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.teach-cover img { width: 200px; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--teal-soft); }
.teach-cover .field, .teach-avatar-row .field { flex: 1 1 240px; }
.teach-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--teal-soft); }
.teach-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.teach-iban { display: flex; align-items: center; gap: 0; direction: ltr; }
.teach-iban > span { padding: 11px 12px; border: 1px solid var(--line); border-inline-end: 0; border-radius: 12px 0 0 12px; background: var(--ground); font-weight: 700; }
.teach-iban .input { border-radius: 0 12px 12px 0; }
.teach-file-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.teach-file-row .input { flex: 1 1 220px; width: auto; }
.teach-danger { margin-top: 20px; text-align: left; }
.teach-details summary { cursor: pointer; font-weight: 700; color: var(--teal-dark); margin: 6px 0 12px; }
.teach-history { font-size: 12.5px; margin: 6px 0 0; }
.teach-keys { display: grid; gap: 8px; }
.teach-keys > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; align-items: center; }
.teach-keys span { color: var(--muted); font-size: 13px; }
.teach-keys code { background: var(--ground); border-radius: 8px; padding: 7px 10px; overflow-x: auto; white-space: nowrap; font-size: 12.5px; }
.teach-secret { filter: blur(5px); cursor: pointer; transition: filter .2s; }
.teach-secret:hover, .teach-secret.is-shown, .teach-secret:focus { filter: none; }

/* curriculum */
.teach-branch { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.teach-branch-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.teach-inline-edit { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; }
.teach-inline-edit .input { padding: 7px 10px; font-weight: 700; }
.teach-tools { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.teach-tools button, .teach-tools a { border: 0; background: var(--ground); color: var(--ink-2); border-radius: 8px; padding: 2px 9px; font-size: 12.5px; cursor: pointer; }
.teach-tools button:hover, .teach-tools a:hover { background: var(--line); }
.teach-tools .is-danger { color: var(--red); }
.teach-lessons { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.teach-lessons li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 10px; background: var(--ground); font-size: 14px; }
.teach-lessons li > .num { color: var(--muted); min-width: 18px; }
.teach-add-section { display: flex; gap: 8px; margin-top: 8px; }
.teach-add-section .input { flex: 1; }
.teach-pane { margin-top: 12px; }
.teach-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.teach-bar { flex-basis: 100%; height: 8px; border-radius: 4px; background: var(--ground); overflow: hidden; }
.teach-bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }
.teach-video { width: 100%; max-width: 560px; border-radius: 12px; margin-top: 12px; background: #000; }

/* lists */
.teach-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 20px; align-items: start; }
.teach-columns > .panel { min-width: 0; }
.teach-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.teach-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.7; }
.teach-items li:last-child { border-bottom: 0; }
.teach-items li > * { grid-column: 1; min-width: 0; }
.teach-items li > :first-child { font-weight: 700; }
.teach-items li > :last-child:not(:first-child):not(.muted) { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.teach-items .muted { font-size: 12.5px; }
.teach-struck { text-decoration: line-through; color: var(--muted); }
.teach-link { display: block; }
.stat small { display: block; font-size: 12px; }

/* money */
.teach-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.teach-split > div { border-radius: 14px; background: var(--ground); padding: 12px 14px; display: grid; }
.teach-split span { color: var(--muted); font-size: 13px; }
.teach-split b { font-size: 24px; font-weight: 800; }
.teach-split .is-you { background: var(--teal-soft); }
.teach-split .is-you b { color: var(--teal-dark); }
.teach-balance { display: grid; gap: 2px; margin-bottom: 16px; }
.teach-balance > span { color: var(--muted); font-size: 13px; }
.teach-balance b { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.teach-balance b small { font-size: 14px; font-weight: 500; color: var(--muted); }
.teach-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: 14px; }

/* reports */
.teach-poll { margin-top: 12px; }
.teach-poll-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 140px) 44px; gap: 10px; align-items: center; font-size: 13.5px; margin-top: 6px; }
.teach-poll-row .bar, .row-progress .bar { display: block; height: 8px; border-radius: 4px; background: var(--ground); overflow: hidden; }
.teach-poll-row .bar i { display: block; height: 100%; background: var(--teal); }
.teach-feedback { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-height: 380px; overflow-y: auto; }
.teach-feedback li { border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: 14px; }
.teach-feedback p { margin: 4px 0 0; color: var(--ink-2); }
.teach-stars { color: #f59e0b; letter-spacing: 1px; }
.teach-stars i { font-style: normal; color: var(--line); }

/* questions */
.teach-questions { display: grid; gap: 14px; }
.teach-q-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.teach-q-body { margin: 8px 0; white-space: pre-line; }
.teach-q-reply { background: var(--ground); border-radius: 10px; padding: 8px 12px; margin-top: 6px; font-size: 14px; }
.teach-q-reply.is-staff { background: var(--teal-soft); }
.teach-q-form { display: grid; gap: 8px; margin-top: 10px; justify-items: start; }

/* the public instructor page */
.teacher-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-top: 24px; }
.teacher-hero > img { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; background: var(--teal-soft); flex: none; }
.teacher-hero > div { flex: 1 1 280px; min-width: 0; }
.teacher-hero h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.teacher-headline { color: var(--ink-2); margin: 4px 0 14px; }
.teacher-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.teacher-facts b { font-size: 20px; font-weight: 800; display: block; }
.teacher-facts span { color: var(--muted); font-size: 13px; }
.teacher-bio { margin: 0; color: var(--ink-2); max-width: 72ch; }

@media (max-width: 640px) {
    .teach-split { grid-template-columns: 1fr; }
    .teach-inline-edit { flex-basis: 100%; }
    .teach-tools { margin-inline-start: 0; }
    .teacher-hero { padding: 20px; }
    .teacher-hero > img { width: 96px; height: 96px; }
}
