/* Teacher-only layout. Shared student tokens remain the visual source of truth. */
.teacher-workspace{margin:0;background:var(--surface-subtle);color:var(--text-primary);font-family:var(--font-body);font-size:14px;line-height:1.6}
.teacher-workspace *{box-sizing:border-box}
.teacher-workspace svg{width:20px;height:20px;flex-shrink:0}
.teacher-workspace [hidden]{display:none!important}
.teacher-workspace a{color:inherit;text-decoration:none}
.teacher-workspace button,.teacher-workspace input,.teacher-workspace select,.teacher-workspace textarea{font:inherit}
.teacher-workspace button,.teacher-workspace a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.teacher-workspace button{cursor:pointer}
.teacher-workspace button:disabled{opacity:.5;cursor:not-allowed}
.teacher-workspace :focus-visible{outline:3px solid var(--accent-primary);outline-offset:3px}
.teacher-workspace h1,.teacher-workspace h2,.teacher-workspace h3{font-family:var(--font-heading);color:var(--text-primary);letter-spacing:-.035em;line-height:1.2}
.teacher-workspace h1{font-size:clamp(1.9rem,3.2vw,2.7rem);margin:6px 0 10px}
.teacher-workspace h2{font-size:1.2rem;margin:0 0 8px}
.teacher-workspace h3{font-size:1.03rem;margin:0 0 5px}
.teacher-workspace p{margin:0 0 12px}
.tw-muted,.tw-hint{color:var(--text-secondary)}
.tw-hint{font-size:12px}
.tw-eyebrow{font-size:10px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--accent-primary)}
.tw-brand{font-family:var(--font-heading);font-size:25px;font-weight:700;letter-spacing:-1px;display:block}.tw-brand span{color:var(--accent-primary)}
.tw-skip{position:fixed;top:-100px;left:20px;z-index:200;background:var(--surface-bg);padding:12px}.tw-skip:focus{top:12px}
.tw-sidebar{position:fixed;inset:0 auto 0 0;width:268px;padding:24px 14px 16px;background:var(--surface-bg);border-right:1px solid var(--line-subtle);display:none;flex-direction:column;z-index:1100;overflow-y:auto;overscroll-behavior:contain;height:100dvh}
.tw-brand-block{padding:2px 10px 28px;display:flex;align-items:center}.tw-brand-block .tw-brand{font-size:23px;color:#1d4ed8;font-weight:800;letter-spacing:-.02em}
.tw-nav{display:flex;flex-direction:column;gap:3px}
.tw-nav a{position:relative;display:flex;align-items:center;gap:12px;padding:6px 10px 6px 6px;min-height:46px;border-radius:12px;color:var(--text-secondary);font-weight:600;font-size:13.5px;transition:background .18s ease,color .18s ease}
.tw-nav-icon{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;flex:none;transition:background .18s ease,color .18s ease,box-shadow .18s ease}.tw-nav-icon .tw-i{font-size:15px}
.tw-nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tw-nav a:hover{background:var(--surface-subtle);color:var(--text-primary)}.tw-nav a:hover .tw-nav-icon{background:var(--surface-bg);color:var(--accent-primary)}
.tw-nav a[aria-current=page]{background:var(--accent-soft);color:var(--accent-primary)}
.tw-nav a[aria-current=page] .tw-nav-icon{background:var(--accent-primary);color:#fff;box-shadow:0 6px 14px -6px var(--accent-primary)}
.tw-nav a[aria-current=page]::before{content:'';position:absolute;left:-14px;top:11px;bottom:11px;width:3px;border-radius:0 4px 4px 0;background:var(--accent-primary)}
.tw-nav svg{width:19px;height:19px;flex:none}
.tw-sidebar-foot{margin-top:auto;padding-top:20px;display:grid;gap:10px}
.tw-foot-tools{display:grid;grid-template-columns:1fr 1fr;gap:8px}.tw-foot-tools .tw-foot-btn{width:100%;height:42px;border:1px solid var(--line-subtle);display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;font-size:12.5px;font-weight:700}
.tw-drawer-theme-icon{position:relative;width:18px;height:18px;flex:none;display:inline-block}
.tw-foot-btn{width:34px;height:34px;flex:none;border:0;border-radius:10px;background:transparent;color:var(--text-secondary);display:grid;place-items:center;cursor:pointer;font-family:inherit;transition:background .18s ease,color .18s ease,border-color .18s ease}
.tw-foot-btn:hover{background:var(--surface-subtle);color:var(--accent-primary);border-color:var(--accent-primary)}.tw-foot-btn .tw-i{font-size:14px}
.tw-logout-btn:hover{color:var(--danger);background:color-mix(in srgb,var(--danger) 10%,var(--surface-bg))}
.tw-user{display:flex;gap:10px;align-items:center;padding:8px 6px 8px 8px;border:1px solid var(--line-subtle);border-radius:14px;background:var(--surface-subtle)}
.tw-user strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.tw-avatar{width:36px;height:36px;border-radius:12px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-weight:700;flex-shrink:0}
.tw-user .tw-avatar{position:relative}
.tw-avatar-dot{position:absolute;right:-3px;bottom:-3px;width:11px;height:11px;border-radius:50%;border:2px solid var(--surface-subtle);background:var(--text-muted)}
.tw-avatar-dot.active{background:var(--success)}.tw-avatar-dot.pending{background:var(--warning)}.tw-avatar-dot.suspended{background:var(--danger)}.tw-avatar-dot.admin{background:var(--accent-primary)}
/* Student-matched top desktop navbar (.tr-navbar) */
.tr-navbar.tw-header{position:sticky;top:0;z-index:1000;width:100%;margin-left:0;background:rgba(255,255,255,.94);color:#0f172a;border-bottom:1px solid rgba(2,6,23,.08);box-shadow:0 8px 30px rgba(15,23,42,.08);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-family:var(--font-body,'Manrope',system-ui,-apple-system,sans-serif);padding:0}
.tr-navbar__container{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;height:68px;max-width:1200px;margin:0 auto;padding:0 20px;box-sizing:border-box;position:relative}
.tr-navbar__logo{display:inline-flex;align-items:center;text-decoration:none;flex-shrink:0}
.tr-navbar__brand{color:#1d4ed8;font-family:var(--font-body,'Manrope',sans-serif);font-size:clamp(1.35rem,1.1rem + 1.1vw,1.9rem);font-weight:800;letter-spacing:-.02em;line-height:1}
.tr-navbar__nav{display:flex;align-items:center;gap:18px;list-style:none;margin:0 auto 0 clamp(14px,2vw,26px);padding:0}
.tr-navbar__link{position:relative;color:inherit;text-decoration:none;font-size:.95rem;font-weight:600;padding:8px 0;border-radius:8px;display:inline-flex;align-items:center;gap:6px;white-space:nowrap;transition:all .2s ease}
.tr-navbar__link::after{content:'';position:absolute;left:0;right:0;bottom:-12px;height:2px;border-radius:999px;background:transparent;transition:all .2s ease}
.tr-navbar__link:hover,.tr-navbar__link:focus-visible,.tr-navbar__link.active,.tr-navbar__link[aria-current=page]{color:#1d4ed8}
.tr-navbar__link:hover::after,.tr-navbar__link:focus-visible::after,.tr-navbar__link.active::after,.tr-navbar__link[aria-current=page]::after{background:#1d4ed8}
.tr-navbar__link--home{display:inline-flex;align-items:center;justify-content:center;font-size:1.05rem;padding:8px 6px}
.tr-navbar__link--home i{display:inline-flex;align-items:center;justify-content:center;font-size:1.05rem;line-height:1}
.tr-navbar__link--home:hover,.tr-navbar__link--home:focus-visible{color:#1d4ed8;transform:translateY(-1px)}
.tr-navbar__user-info{display:flex;align-items:center;gap:10px;min-width:0;flex-shrink:0}
.tr-navbar__user-avatar{position:relative;width:34px;height:34px;border-radius:999px;border:2px solid rgba(29,78,216,.35);background:#dbeafe;color:#1d4ed8;display:grid;place-items:center;font-weight:700;font-size:.88rem;flex-shrink:0}
.tr-navbar__user-avatar .tw-avatar-dot{right:-2px;bottom:-2px;width:10px;height:10px;border-color:#fff}
.tr-navbar__logout-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 14px;height:38px;line-height:1;background:rgba(239,68,68,.06);color:#b91c1c;border:1px solid rgba(239,68,68,.22);border-radius:10px;font-size:.85rem;font-weight:600;font-family:inherit;cursor:pointer;white-space:nowrap;transition:all .2s ease;flex-shrink:0}
.tr-navbar__logout-btn:hover,.tr-navbar__logout-btn:focus-visible{background:rgba(239,68,68,.12);color:#991b1b;border-color:rgba(239,68,68,.4);transform:translateY(-1px)}
.tr-navbar__logout-btn i{display:inline-flex;align-items:center;justify-content:center;font-size:.88rem;line-height:1;width:1em;height:1em}
/* Elevated Animated Theme Button */
.tr-navbar__theme-btn{position:relative;width:40px;height:40px;min-height:40px;padding:0;border-radius:12px;border:1px solid rgba(15,23,42,0.09);background:rgba(255,255,255,0.85);color:#475467;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;box-shadow:0 1px 3px rgba(16,24,40,0.05),inset 0 1px 0 rgba(255,255,255,0.9);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:transform 0.25s cubic-bezier(0.34,1.56,0.64,1),background 0.25s ease,border-color 0.25s ease,box-shadow 0.25s ease,color 0.25s ease;flex-shrink:0}
.tr-navbar__theme-btn:hover{background:#ffffff;border-color:rgba(245,158,11,0.4);color:#d97706;box-shadow:0 4px 14px -2px rgba(245,158,11,0.3),0 2px 6px -1px rgba(0,0,0,0.06);transform:translateY(-2px)}
.tr-navbar__theme-btn:focus-visible{outline:2px solid var(--accent-primary,#1d4ed8);outline-offset:2px}
.tr-navbar__theme-btn:active{transform:scale(0.92) translateY(0);transition-duration:0.1s}
body.dark .tr-navbar__theme-btn,body.tr-dark .tr-navbar__theme-btn,html[data-theme='dark'] .tr-navbar__theme-btn{background:rgba(15,23,42,0.75);border-color:rgba(255,255,255,0.12);color:#94a3b8;box-shadow:0 2px 8px rgba(0,0,0,0.35),inset 0 1px 0 rgba(255,255,255,0.08)}
body.dark .tr-navbar__theme-btn:hover,body.tr-dark .tr-navbar__theme-btn:hover,html[data-theme='dark'] .tr-navbar__theme-btn:hover{background:rgba(30,41,59,0.95);border-color:rgba(56,189,248,0.45);color:#38bdf8;box-shadow:0 4px 16px -2px rgba(56,189,248,0.35),0 2px 6px -1px rgba(0,0,0,0.4);transform:translateY(-2px)}
.tr-navbar__theme-btn .tr-navbar__icon-sun,.tr-navbar__theme-btn .tr-navbar__icon-moon,
.tw-drawer-theme-btn .tr-navbar__icon-sun,.tw-drawer-theme-btn .tr-navbar__icon-moon{position:absolute;top:50%;left:50%;font-size:1.15rem;line-height:1;transition:transform 0.5s cubic-bezier(0.34,1.56,0.64,1),opacity 0.28s cubic-bezier(0.4,0,0.2,1),filter 0.3s ease,color 0.3s ease;pointer-events:none;display:inline-block!important}
.tr-navbar__theme-btn .tr-navbar__icon-sun,.tw-drawer-theme-btn .tr-navbar__icon-sun{opacity:1;transform:translate(-50%,-50%) rotate(0deg) scale(1);color:#f59e0b;filter:drop-shadow(0 0 6px rgba(245,158,11,0.55))}
.tr-navbar__theme-btn .tr-navbar__icon-moon,.tw-drawer-theme-btn .tr-navbar__icon-moon{opacity:0;transform:translate(-50%,-50%) rotate(-110deg) scale(0.15);color:#38bdf8;filter:drop-shadow(0 0 4px rgba(56,189,248,0))}
.tr-navbar__theme-btn:hover .tr-navbar__icon-sun,.tw-drawer-theme-btn:hover .tr-navbar__icon-sun{transform:translate(-50%,-50%) rotate(45deg) scale(1.14);filter:drop-shadow(0 0 10px rgba(245,158,11,0.8))}
body.dark .tr-navbar__theme-btn .tr-navbar__icon-sun,body.tr-dark .tr-navbar__theme-btn .tr-navbar__icon-sun,html[data-theme='dark'] .tr-navbar__theme-btn .tr-navbar__icon-sun,
body.dark .tw-drawer-theme-btn .tr-navbar__icon-sun,body.tr-dark .tw-drawer-theme-btn .tr-navbar__icon-sun,html[data-theme='dark'] .tw-drawer-theme-btn .tr-navbar__icon-sun{opacity:0;transform:translate(-50%,-50%) rotate(110deg) scale(0.15);filter:drop-shadow(0 0 4px rgba(245,158,11,0))}
body.dark .tr-navbar__theme-btn .tr-navbar__icon-moon,body.tr-dark .tr-navbar__theme-btn .tr-navbar__icon-moon,html[data-theme='dark'] .tr-navbar__theme-btn .tr-navbar__icon-moon,
body.dark .tw-drawer-theme-btn .tr-navbar__icon-moon,body.tr-dark .tw-drawer-theme-btn .tr-navbar__icon-moon,html[data-theme='dark'] .tw-drawer-theme-btn .tr-navbar__icon-moon{opacity:1;transform:translate(-50%,-50%) rotate(0deg) scale(1);color:#38bdf8;filter:drop-shadow(0 0 8px rgba(56,189,248,0.65))}
body.dark .tr-navbar__theme-btn:hover .tr-navbar__icon-moon,body.tr-dark .tr-navbar__theme-btn:hover .tr-navbar__icon-moon,html[data-theme='dark'] .tr-navbar__theme-btn:hover .tr-navbar__icon-moon,
body.dark .tw-drawer-theme-btn:hover .tr-navbar__icon-moon,body.tr-dark .tw-drawer-theme-btn:hover .tr-navbar__icon-moon,html[data-theme='dark'] .tw-drawer-theme-btn:hover .tr-navbar__icon-moon{transform:translate(-50%,-50%) rotate(-18deg) scale(1.18);filter:drop-shadow(0 0 12px rgba(56,189,248,0.9))}
.tw-foot-tools .tw-drawer-theme-btn{position:relative;overflow:hidden}
.tr-navbar__hamburger{display:none;width:44px;height:44px;border-radius:10px;border:1px solid transparent;background:transparent;color:inherit;cursor:pointer;padding:0;align-items:center;justify-content:center;flex-direction:column;gap:4px}
.tr-navbar__hamburger:hover,.tr-navbar__hamburger:focus-visible{background:#eef2ff}
.tr-navbar__hamburger-line{width:18px;height:2px;border-radius:999px;background:currentColor;transition:all .2s ease}
.tr-navbar__hamburger[aria-expanded=true] .tr-navbar__hamburger-line:nth-child(1){transform:translateY(6px) rotate(45deg)}
.tr-navbar__hamburger[aria-expanded=true] .tr-navbar__hamburger-line:nth-child(2){opacity:0}
.tr-navbar__hamburger[aria-expanded=true] .tr-navbar__hamburger-line:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
body.dark .tr-navbar.tw-header,body.tr-dark .tr-navbar.tw-header,html[data-theme=dark] .tr-navbar.tw-header{background:rgba(9,14,24,.94);color:#f1f5f9;border-bottom-color:rgba(148,163,184,.22)}
body.dark .tr-navbar__link:hover,body.dark .tr-navbar__link:focus-visible,body.tr-dark .tr-navbar__link:hover,body.tr-dark .tr-navbar__link:focus-visible,html[data-theme=dark] .tr-navbar__link:hover,html[data-theme=dark] .tr-navbar__link:focus-visible{color:#93c5fd}
body.dark .tr-navbar__theme-btn:hover,body.dark .tr-navbar__hamburger:hover,body.tr-dark .tr-navbar__theme-btn:hover,body.tr-dark .tr-navbar__hamburger:hover,html[data-theme=dark] .tr-navbar__theme-btn:hover,html[data-theme=dark] .tr-navbar__hamburger:hover{background:rgba(59,130,246,.18)}
body.dark .tr-navbar__logout-btn,body.tr-dark .tr-navbar__logout-btn,html[data-theme=dark] .tr-navbar__logout-btn{background:rgba(248,113,113,.1);border-color:rgba(248,113,113,.25);color:#fca5a5}
body.dark .tr-navbar__logout-btn:hover,body.tr-dark .tr-navbar__logout-btn:hover,html[data-theme=dark] .tr-navbar__logout-btn:hover{background:rgba(248,113,113,.18);border-color:rgba(248,113,113,.45);color:#fff}
body.dark .tr-navbar__user-avatar .tw-avatar-dot,body.tr-dark .tr-navbar__user-avatar .tw-avatar-dot,html[data-theme=dark] .tr-navbar__user-avatar .tw-avatar-dot{border-color:#090e18}
.tw-theme-btn{cursor:pointer}.tw-icon-btn{width:44px;height:44px;border:1px solid var(--line-subtle);border-radius:12px;background:var(--surface-bg);color:var(--text-secondary);display:inline-grid;place-items:center}.tw-icon-btn svg{width:19px;height:19px}
.tw-main{margin:0 auto;max-width:1280px;padding:32px 24px 48px;min-width:0}.tw-page-head{display:flex;gap:18px;align-items:center;justify-content:space-between;margin-bottom:28px}.tw-page-head p{max-width:640px;color:var(--text-secondary);margin:0}.tw-page-head>div{min-width:0}
.tw-button{border:1px solid var(--line-subtle);border-radius:10px;background:var(--surface-bg);color:var(--text-primary);padding:11px 16px;font-size:13px;font-weight:700;min-height:44px;display:inline-flex;justify-content:center;align-items:center;gap:8px;text-align:center}.tw-button svg{width:17px;height:17px;flex-shrink:0}
.tw-button:hover{border-color:var(--accent-primary);color:var(--accent-primary)}.tw-button.primary{background:var(--accent-primary);border-color:var(--accent-primary);color:white}.tw-button.primary:hover{background:var(--accent-primary-hover)}.tw-button.danger{color:var(--danger)}.tw-button.small{padding:8px 12px;font-size:12px}
.tw-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tw-panel{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:16px;padding:22px;min-width:0}.tw-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:20px}.tw-panel-head p{font-size:12px;color:var(--text-secondary);margin:0}
.tw-grid{display:grid;gap:20px;grid-template-columns:minmax(0,1.7fr) minmax(270px,1fr)}.tw-stack{display:grid;gap:20px;align-content:start}.tw-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:24px 0}.tw-stat{padding:20px;background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:14px;min-width:0}.tw-stat span{font-size:12px;color:var(--text-secondary)}.tw-stat strong{font-family:var(--font-heading);font-size:clamp(1.3rem,2.4vw,2rem);display:block;letter-spacing:-.04em;margin:7px 0;overflow-wrap:anywhere}.tw-stat small{display:block;font-size:11px;color:var(--text-muted)}
.tw-feature{padding:28px;border-radius:18px;border:1px solid color-mix(in srgb,var(--accent-primary) 22%,var(--line-subtle));background:linear-gradient(115deg,var(--surface-bg),var(--accent-soft));display:flex;align-items:center;justify-content:space-between;gap:24px;position:relative;overflow:hidden}.tw-feature h2{font-size:clamp(1.3rem,2vw,1.8rem);max-width:560px;margin:8px 0 10px}.tw-feature p{color:var(--text-secondary);max-width:580px;font-size:13px}.tw-feature-art{width:140px;height:140px;flex:none;display:grid;place-items:center;border:1px solid color-mix(in srgb,var(--accent-primary) 20%,transparent);border-radius:50%;background:var(--accent-soft);color:var(--accent-primary)}.tw-feature-art svg{width:60px;height:60px}
.tw-tag{display:inline-flex;gap:5px;align-items:center;max-width:100%;padding:4px 9px;font-size:10px;font-weight:700;border-radius:6px;background:var(--surface-muted);color:var(--text-secondary);text-transform:capitalize}.tw-tag.published,.tw-tag.active,.tw-tag.paid{background:color-mix(in srgb,var(--success) 12%,var(--surface-bg));color:var(--success)}.tw-tag.in_review,.tw-tag.pending{background:var(--accent-soft);color:var(--accent-primary)}.tw-tag.changes_requested,.tw-tag.suspended{background:color-mix(in srgb,var(--warning) 12%,var(--surface-bg));color:var(--warning)}
.tw-list{display:grid}.tw-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:17px 0;border-bottom:1px solid var(--line-subtle)}.tw-row:last-child{border-bottom:0}.tw-row-main{min-width:0;flex:1}.tw-row-main h3,.tw-row-main strong{overflow-wrap:anywhere}.tw-row-main p{font-size:12px;color:var(--text-secondary);margin:5px 0 0}.tw-row-side{text-align:right;flex:none}.tw-row-side small{display:block;font-size:11px;color:var(--text-muted)}
.tw-class-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.tw-class-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:16px;overflow:hidden}.tw-class-band{height:7px;background:var(--accent-primary);opacity:.8}.tw-class-body{padding:22px}.tw-class-top{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:16px}.tw-subject-icon{width:42px;height:42px;border-radius:12px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center}.tw-subject-icon svg{width:22px;height:22px}.tw-class-card h2{margin:0 0 9px;font-size:1.2rem}.tw-class-card p{color:var(--text-secondary);font-size:12px}.tw-class-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:var(--text-secondary);padding:15px 0}.tw-class-footer{border-top:1px solid var(--line-subtle);padding-top:15px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.tw-filterbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:20px}.tw-filterbar label{flex:1;min-width:140px;max-width:280px}.tw-filterbar label:first-child{max-width:none}.tw-field{display:grid;gap:7px;margin-bottom:18px}.tw-field>span,.tw-filterbar label>span{display:block;font-size:12px;font-weight:700;margin-bottom:5px}.tw-input,.teacher-workspace select,.teacher-workspace textarea{width:100%;min-height:46px;border:1px solid var(--line-subtle);border-radius:10px;background:var(--surface-bg);color:var(--text-primary);padding:11px 12px;outline-offset:2px}.teacher-workspace textarea{resize:vertical;min-height:110px}.tw-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.tw-full{grid-column:1/-1}.tw-checks{display:flex;gap:10px;flex-wrap:wrap}.tw-check{display:flex;align-items:center;gap:7px;border:1px solid var(--line-subtle);border-radius:8px;padding:9px 12px;min-height:44px;font-size:12px}
.tw-empty{padding:48px 20px;text-align:center;border:0;background:transparent}.tw-empty svg{width:38px;height:38px;color:var(--accent-primary);margin-bottom:12px;opacity:.85}.tw-empty p{max-width:420px;margin:8px auto 18px;color:var(--text-secondary);font-size:13px}.tw-notice{padding:12px 18px;border-radius:12px;background:var(--accent-soft);border:1px solid color-mix(in srgb,var(--accent-primary) 18%,transparent);color:var(--text-secondary);margin-bottom:20px;font-size:13px;line-height:1.5}.tw-notice.error{color:var(--danger);background:color-mix(in srgb,var(--danger) 8%,var(--surface-bg));border-color:color-mix(in srgb,var(--danger) 22%,transparent)}
.tw-tabs,.tw-steps{display:flex;gap:8px;margin-bottom:22px;overflow-x:auto;padding:2px 2px 6px}.tw-tabs button{border:1px solid var(--line-subtle);background:var(--surface-bg);color:var(--text-secondary);padding:10px 15px;border-radius:9px;min-height:44px;white-space:nowrap;font-weight:600;font-size:12px}.tw-tabs button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent-primary);color:var(--accent-primary)}.tw-steps{gap:12px;border-bottom:1px solid var(--line-subtle);padding-bottom:12px}.tw-steps button{border:0;background:transparent;color:var(--text-secondary);padding:8px 14px;border-radius:10px;min-height:40px;white-space:nowrap;font-weight:600;font-size:13px;display:inline-flex;align-items:center;gap:8px;transition:all .15s ease}.tw-steps button:hover{color:var(--text-primary);background:var(--surface-subtle)}.tw-steps button b{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--surface-muted);color:var(--text-muted);font-size:10px;font-weight:700}.tw-steps button[aria-current=step]{background:var(--accent-soft);color:var(--accent-primary)}.tw-steps button[aria-current=step] b{background:var(--accent-primary);color:#fff}
.tw-editor{max-width:1000px}.tw-editor .tw-panel{padding:28px}.tw-editor-foot{position:sticky;bottom:0;z-index:25;background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:12px;margin-top:20px;padding:12px 16px;display:flex;justify-content:space-between;align-items:center;gap:12px;box-shadow:var(--shadow-sm)}.tw-editor-foot small{font-size:11px;color:var(--text-secondary)}
.tw-lesson{padding:18px;border:1px solid var(--line-subtle);border-radius:12px;margin-bottom:14px;background:var(--surface-subtle)}.tw-lesson-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:12px}.tw-lesson-head strong{font-size:12px}.tw-lesson .tw-field:last-child{margin-bottom:0}
.tw-progress{height:5px;background:var(--surface-muted);border-radius:99px;overflow:hidden;margin:7px 0}.tw-progress span{height:100%;display:block;background:var(--accent-primary);border-radius:99px}.tw-progress-label{display:flex;justify-content:space-between;font-size:11px;color:var(--text-secondary)}
.tw-chart{display:flex;align-items:end;height:190px;gap:8px;padding-top:16px;border-bottom:1px solid var(--line-subtle);margin-bottom:10px}.tw-chart-col{flex:1;height:100%;display:flex;flex-direction:column;justify-content:end;align-items:center;gap:7px;min-width:0}.tw-chart-col i{width:min(100%,44px);min-height:2px;background:var(--accent-primary);border-radius:5px 5px 0 0;display:block}.tw-chart-col small{font-size:9px;white-space:nowrap;color:var(--text-muted)}.tw-chart-col span{font-size:10px;color:var(--text-secondary)}
.tw-table-wrap{overflow-x:auto}.tw-table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}.tw-table th{color:var(--text-secondary);font-weight:600;background:var(--surface-subtle)}.tw-table th,.tw-table td{padding:12px;border-bottom:1px solid var(--line-subtle)}
.tw-thread{padding:20px 0;border-bottom:1px solid var(--line-subtle)}.tw-thread:last-child{border:0}.tw-thread-body{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0!important}.tw-reply{border-left:2px solid var(--accent-primary);padding:8px 14px;margin:12px 0;background:transparent;border-radius:0}.tw-reply p{margin:5px 0;font-size:13px}.tw-inline-form{display:flex;gap:8px}.tw-inline-form input{flex:1;min-width:0}
.tw-start{max-width:560px;margin:14vh auto;padding:28px}.tw-start p{color:var(--text-secondary);margin-top:20px}.tw-skeleton{height:140px;margin-top:22px;border-radius:16px;background:linear-gradient(100deg,var(--surface-muted),var(--surface-bg),var(--surface-muted));background-size:200%;animation:tw-shimmer 1.5s infinite}@keyframes tw-shimmer{to{background-position:-200%}}
#workspace-toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--text-primary);color:var(--surface-bg);padding:12px 18px;border-radius:12px;max-width:calc(100vw - 32px);z-index:150;box-shadow:var(--shadow-md);display:none;font-size:13px}#workspace-toast.show{display:block}
#workspace-dialog{border:1px solid var(--line-subtle);border-radius:18px;padding:26px;width:min(620px,calc(100vw - 28px));max-height:85dvh;overflow-y:auto;background:var(--surface-bg);color:var(--text-primary);box-shadow:var(--shadow-md)}#workspace-dialog::backdrop{background:rgba(15,23,42,.5);backdrop-filter:blur(3px)}.tw-dialog-head{display:flex;justify-content:space-between;gap:16px;margin-bottom:16px}.tw-dialog-head h2{margin:0}.tw-preview-lesson{padding:18px 0;border-bottom:1px solid var(--line-subtle)}.tw-preview-lesson a{color:var(--accent-primary);text-decoration:underline}
.tw-stat strong{overflow-wrap:anywhere}.tw-row-main{overflow-wrap:anywhere}.tw-mobile-menu,.tw-bottom-nav,.tw-drawer-close,.tw-scrim{display:none}
@media(max-width:1200px){.tw-main{padding:26px 24px}.tw-grid{grid-template-columns:minmax(0,1fr)}.tw-feature-art{width:112px;height:112px}}
@media(max-width:1023px){.tr-navbar__nav,.tr-navbar__user-info{display:none!important}.tr-navbar__theme-btn{margin-left:auto}.tr-navbar__hamburger.tw-mobile-menu{display:inline-flex}.tw-sidebar{display:flex;transform:translateX(-105%);width:268px;transition:transform .2s ease;box-shadow:var(--shadow-md)}.tw-sidebar.open{transform:none}.tw-drawer-close{display:inline-grid;position:absolute;top:20px;right:16px}.tw-scrim.open{display:block;position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1050}.tw-stats{gap:12px}}
@media(max-width:639px){.teacher-workspace{font-size:14px}.tr-navbar__container{padding:0 14px}.tr-navbar__brand{font-size:1.45rem}.tw-main{padding:22px 16px calc(100px + env(safe-area-inset-bottom))}.tw-page-head{align-items:flex-start;flex-direction:column;gap:14px;margin-bottom:20px}.tw-page-head .tw-actions{width:100%}.tw-page-head .tw-actions .tw-button{flex:1}.teacher-workspace h1{font-size:1.9rem}.tw-page-head p{font-size:13px;line-height:1.6}.tw-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin:18px 0;gap:10px}.tw-stat{padding:15px}.tw-stat strong{font-size:1.65rem}.tw-stat span{font-size:11px}.tw-stat small{font-size:10px}.tw-feature{padding:21px}.tw-feature-art{display:none}.tw-feature h2{font-size:1.5rem}.tw-panel{padding:18px}.tw-panel-head{gap:8px;flex-wrap:wrap}.tw-grid,.tw-stack{gap:16px}.tw-class-grid{grid-template-columns:1fr}.tw-class-body{padding:19px}.tw-class-footer .tw-button{min-height:44px}.tw-filterbar{gap:8px}.tw-filterbar label{min-width:calc(50% - 8px);max-width:none}.tw-filterbar label:first-child{flex-basis:100%}.tw-input,.teacher-workspace select,.teacher-workspace textarea{font-size:16px}.tw-form-grid{grid-template-columns:1fr}.tw-editor .tw-panel{padding:18px}.tw-editor-foot{bottom:calc(72px + env(safe-area-inset-bottom));padding:10px;flex-wrap:wrap}.tw-editor-foot .tw-actions{flex:1;justify-content:flex-end}.tw-editor-foot small{width:100%}.tw-editor-foot .tw-button{font-size:12px;padding:10px 12px}.tw-steps{gap:6px}.tw-steps button{flex:1;padding:10px 8px}.tw-row{gap:10px;align-items:flex-start;flex-wrap:wrap}.tw-row .tw-avatar{width:32px;height:32px}.tw-row-side{font-size:12px}.tw-row .tw-actions{width:100%}.tw-row .tw-actions .tw-button{flex:1}.tw-bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;bottom:0;left:0;right:0;z-index:40;background:var(--surface-bg);border-top:1px solid var(--line-subtle);padding:7px 8px max(7px,env(safe-area-inset-bottom));box-shadow:0 -4px 16px rgba(16,24,40,.04)}.tw-bottom-nav a,.tw-bottom-nav button{min-height:54px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;font-size:10px;font-weight:700;border:0;background:transparent;border-radius:10px;color:var(--text-secondary)}.tw-bottom-nav svg{width:20px;height:20px}.tw-bottom-nav [aria-current=page]{color:var(--accent-primary);background:var(--accent-soft)}#workspace-toast{bottom:calc(90px + env(safe-area-inset-bottom))}.tw-inline-form{flex-wrap:wrap}.tw-inline-form button{width:100%}.tw-table.responsive thead{display:none}.tw-table.responsive tr{display:block;border:1px solid var(--line-subtle);border-radius:12px;margin-bottom:12px;padding:8px}.tw-table.responsive td{display:flex;justify-content:space-between;gap:16px;border:0;padding:7px;font-size:12px;overflow-wrap:anywhere}.tw-table.responsive td::before{content:attr(data-label);color:var(--text-muted);flex-shrink:0}.tw-chart{gap:5px;height:170px}.tw-chart-col small{font-size:8px}.tw-lesson{padding:13px}.tw-lesson-head .tw-icon-btn{width:40px;height:44px}#workspace-dialog{padding:20px}.tw-check{flex:1 0 45%}.tw-help{display:none}}
@media(prefers-reduced-motion:reduce){.teacher-workspace *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Dashboard: let the information breathe instead of putting each sentence in a card. */
.tw-dashboard{max-width:1320px;margin:0 auto}
.tw-dashboard .tw-page-head{align-items:flex-end;margin-bottom:18px;padding:8px 0 28px;border-bottom:1px solid var(--line-subtle)}
.tw-dashboard .tw-page-head h1{font-size:clamp(2.15rem,4vw,3.25rem);letter-spacing:-.055em;margin:8px 0}
.tw-dashboard .tw-page-head p{font-size:14px}
.tw-dashboard .tw-dash-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 0 36px;padding:12px 0 22px;border-bottom:1px solid var(--line-subtle)}
.tw-dashboard .tw-dash-stats .tw-stat{padding:12px 22px;border:0;border-right:1px solid var(--line-subtle);border-radius:0;background:transparent}
.tw-dashboard .tw-dash-stats .tw-stat:first-child{padding-left:0}
.tw-dashboard .tw-dash-stats .tw-stat:last-child{border-right:0}
.tw-dashboard .tw-dash-stats .tw-stat>span{font-size:11px;letter-spacing:.035em}
.tw-dashboard .tw-dash-stats .tw-stat>strong{font-size:clamp(1.45rem,2.5vw,2rem);margin:6px 0 2px}
.tw-dashboard .tw-dash-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,.8fr);gap:clamp(28px,5vw,76px)}
.tw-dashboard .tw-dash-section{min-width:0}
.tw-dashboard .tw-dash-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:16px}
.tw-dashboard .tw-dash-section-head .tw-eyebrow{font-size:9px}
.tw-dashboard .tw-dash-section-head h2{font-size:1.3rem;margin:5px 0 3px;letter-spacing:-.035em}
.tw-dashboard .tw-dash-section-head p{font-size:12px;color:var(--text-secondary);margin:0}
.tw-dashboard .tw-dash-section-head>.tw-button{min-height:38px;padding:7px 12px;font-size:12px}
.tw-dashboard .tw-dash-list{border-top:1px solid var(--line-subtle)}
.tw-dashboard .tw-dash-class{display:grid;grid-template-columns:10px minmax(0,1fr) auto 18px;align-items:center;gap:14px;padding:17px 2px;border-bottom:1px solid var(--line-subtle);color:var(--text-primary);transition:background-color .16s ease}
.tw-dashboard .tw-dash-class:hover{background:var(--surface-bg)}
.tw-dashboard .tw-dash-class-mark{width:8px;height:8px;border-radius:50%;background:var(--accent-primary)}
.tw-dashboard .tw-dash-class-copy{min-width:0;display:grid;gap:4px}
.tw-dashboard .tw-dash-class-copy strong{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.tw-dashboard .tw-dash-class-copy small,.tw-dashboard .tw-dash-state{font-size:11px;color:var(--text-secondary)}
.tw-dashboard .tw-dash-state{text-transform:capitalize;white-space:nowrap}
.tw-dashboard .tw-dash-class>svg,.tw-dashboard .tw-dash-task>svg{width:17px;height:17px;color:var(--text-muted)}
.tw-dashboard .tw-dash-subsection{margin-top:38px}
.tw-dashboard .tw-dash-subsection .tw-dash-section-head{margin-bottom:8px}
.tw-dashboard .tw-dash-activity-list{border-top:1px solid var(--line-subtle)}
.tw-dashboard .tw-dash-activity{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:11px;padding:13px 0;border-bottom:1px solid var(--line-subtle)}
.tw-dashboard .tw-dash-avatar{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:var(--accent-soft);color:var(--accent-primary);font-weight:700;font-size:12px}
.tw-dashboard .tw-dash-activity>span:nth-child(2){min-width:0;display:grid;gap:3px}
.tw-dashboard .tw-dash-activity strong{font-size:12px;overflow-wrap:anywhere}
.tw-dashboard .tw-dash-activity small,.tw-dashboard .tw-dash-activity time{font-size:10px;color:var(--text-secondary)}
.tw-dashboard .tw-dash-activity time{white-space:nowrap}
.tw-dashboard .tw-dash-aside{border-left:1px solid var(--line-subtle);padding-left:clamp(22px,3vw,42px)}
.tw-dashboard .tw-dash-task-list{display:grid;border-top:1px solid var(--line-subtle)}
.tw-dashboard .tw-dash-task{display:grid;grid-template-columns:minmax(0,1fr) 18px;gap:3px 10px;align-items:center;padding:15px 0;border-bottom:1px solid var(--line-subtle);color:var(--text-primary)}
.tw-dashboard .tw-dash-task>span{font-size:12px;font-weight:700}
.tw-dashboard .tw-dash-task>small{grid-column:1;color:var(--text-secondary);font-size:10px;line-height:1.5}
.tw-dashboard .tw-dash-task>svg{grid-column:2;grid-row:1/3}
.tw-dashboard .tw-dash-task:hover>span,.tw-dashboard .tw-dash-task:hover>svg{color:var(--accent-primary)}
.tw-dashboard .tw-dash-note{margin-top:26px;padding-top:15px;border-top:1px solid var(--line-subtle);font-size:11px;line-height:1.7;color:var(--text-secondary)}
.tw-dashboard .tw-dash-empty{padding:24px 0;display:grid;justify-items:start;gap:7px}
.tw-dashboard .tw-dash-empty p{font-weight:700;margin:0}
.tw-dashboard .tw-dash-empty>span,.tw-dashboard .tw-dash-muted{font-size:12px;color:var(--text-secondary)}
.tw-dashboard .tw-dash-empty .tw-button{margin-top:8px}
@media(max-width:1023px){.tw-dashboard .tw-dash-grid{grid-template-columns:minmax(0,1fr);gap:30px}.tw-dashboard .tw-dash-aside{border-left:0;border-top:1px solid var(--line-subtle);padding:24px 0 0}}
@media(max-width:639px){.tw-dashboard .tw-page-head{padding-bottom:20px;margin-bottom:14px}.tw-dashboard .tw-page-head h1{font-size:2rem}.tw-dashboard .tw-page-head p{font-size:12px}.tw-dashboard .tw-dash-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:26px;padding:4px 0 14px}.tw-dashboard .tw-dash-stats .tw-stat{padding:12px 10px;border-right:0;border-bottom:1px solid var(--line-subtle)}.tw-dashboard .tw-dash-stats .tw-stat:nth-child(odd){padding-left:0;border-right:1px solid var(--line-subtle)}.tw-dashboard .tw-dash-stats .tw-stat:nth-child(even){padding-right:0}.tw-dashboard .tw-dash-stats .tw-stat:nth-child(n+3){border-bottom:0}.tw-dashboard .tw-dash-stats .tw-stat>span{font-size:10px}.tw-dashboard .tw-dash-stats .tw-stat>strong{font-size:1.45rem}.tw-dashboard .tw-dash-section-head h2{font-size:1.15rem}.tw-dashboard .tw-dash-class{grid-template-columns:8px minmax(0,1fr) 16px;gap:10px;padding:14px 0}.tw-dashboard .tw-dash-class-copy strong{font-size:12px}.tw-dashboard .tw-dash-class-copy small{font-size:10px}.tw-dashboard .tw-dash-state{display:none}.tw-dashboard .tw-dash-activity{grid-template-columns:32px minmax(0,1fr);gap:10px}.tw-dashboard .tw-dash-activity time{grid-column:2}.tw-dashboard .tw-dash-aside{padding-top:21px}}

/* My Classes: an editorial feature and an open teaching library. */
.tw-classes-page{max-width:1320px;margin:0 auto}
.tw-classes-page .tw-page-head{align-items:flex-end;margin-bottom:16px;padding:8px 0 28px;border-bottom:1px solid var(--line-subtle)}
.tw-classes-page .tw-page-head h1{font-size:clamp(2.3rem,4.4vw,3.6rem);letter-spacing:-.06em;margin:0 0 8px}
.tw-classes-page .tw-page-head p{font-size:14px}
.tw-class-tools .tw-filterbar{align-items:end;gap:18px;padding:8px 0 14px;margin:0 0 8px;border-bottom:0}
.tw-class-tools .tw-filterbar label{flex:1;min-width:160px;max-width:none}
.tw-class-tools .tw-filterbar label:first-child{flex:2}
.tw-class-tools .tw-filterbar label>span{font-size:10px;letter-spacing:.07em;text-transform:uppercase;color:var(--text-secondary)}
.tw-class-tools .tw-input,.tw-class-tools select{min-height:44px;padding:8px 10px;border:0;border-bottom:1px solid var(--line-subtle);border-radius:0;background:transparent}
.tw-class-tools .tw-input:focus,.tw-class-tools select:focus{border-bottom-color:var(--accent-primary);outline:0;box-shadow:0 1px 0 var(--accent-primary)}
.tw-portfolio-tabs{display:flex;gap:25px;overflow-x:auto;scrollbar-width:thin;border-bottom:1px solid var(--line-subtle);margin-bottom:17px}
.tw-portfolio-tabs button{min-height:50px;display:inline-flex;align-items:center;gap:9px;flex:none;padding:3px 0 1px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--text-secondary);font-size:12px;font-weight:700;white-space:nowrap}
.tw-portfolio-tabs button strong{font-size:10px;color:var(--text-muted);font-weight:600}
.tw-portfolio-tabs button:hover,.tw-portfolio-tabs button[aria-pressed=true]{color:var(--accent-primary)}
.tw-portfolio-tabs button[aria-pressed=true]{border-bottom-color:var(--accent-primary)}
.tw-portfolio-tabs button[aria-pressed=true] strong{color:var(--accent-primary)}
.tw-portfolio-count{display:flex;justify-content:space-between;gap:16px;align-items:center;color:var(--text-secondary);font-size:11px;margin:0 0 18px}
.tw-portfolio-count span:first-child{color:var(--text-primary);font-weight:700}
.tw-portfolio-feature{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(270px,.78fr);position:relative;overflow:hidden;border-radius:20px;background:radial-gradient(circle at 93% 12%,rgba(148,188,255,.3),transparent 35%),linear-gradient(125deg,#194597,#102c68 58%,#11265b);color:#fff}
.tw-portfolio-feature:before{content:"";position:absolute;width:340px;height:340px;right:-155px;top:-185px;border:1px solid rgba(255,255,255,.18);border-radius:50%;pointer-events:none}
.tw-portfolio-feature-copy{padding:clamp(28px,4vw,50px);position:relative;z-index:1}
.tw-portfolio-overline{display:flex;align-items:center;gap:10px;color:#cbdcfb;letter-spacing:.12em;font-size:10px;font-weight:700;text-transform:uppercase}
.tw-portfolio-overline i,.tw-portfolio-row-subject i{width:4px;height:4px;flex:none;border-radius:50%;background:currentColor}
.tw-portfolio-subject{display:block;margin-top:35px;color:#bdcff4;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.tw-portfolio-feature h2{max-width:680px;margin:9px 0 15px;font-size:clamp(2rem,3.25vw,3.25rem);line-height:1.08;letter-spacing:-.055em;color:#fff;overflow-wrap:anywhere}
.tw-portfolio-feature-copy>p{max-width:580px;color:#dce7fc;font-size:13px;line-height:1.7;margin:0}
.tw-portfolio-feedback{display:grid;gap:4px;margin-top:17px;padding-left:12px;border-left:2px solid #b9d4ff;font-size:11px;color:#e7efff;line-height:1.5}
.tw-portfolio-feedback strong{color:#fff}
.tw-portfolio-feature-facts{display:flex;gap:15px 30px;flex-wrap:wrap;max-width:650px;padding:20px 0 0;margin-top:25px;border-top:1px solid rgba(255,255,255,.22)}
.tw-portfolio-feature-facts span{display:grid;gap:2px;color:#cddcf7;font-size:10px}
.tw-portfolio-feature-facts strong{font-family:var(--font-heading);font-size:19px;color:#fff;line-height:1.2}
.tw-portfolio-feature-action{display:inline-flex;align-items:center;gap:10px;margin-top:25px;padding-bottom:5px;border-bottom:1px solid rgba(255,255,255,.6);color:#fff!important;font-weight:700;font-size:12px}
.tw-portfolio-feature-action:hover{border-bottom-color:#fff}
.tw-portfolio-feature-action svg{width:16px;height:16px}
.tw-portfolio-feature-side{display:flex;flex-direction:column;justify-content:center;min-width:0;padding:34px clamp(24px,3vw,45px);border-left:1px solid rgba(255,255,255,.17);background:linear-gradient(165deg,rgba(255,255,255,.08),rgba(255,255,255,.025))}
.tw-portfolio-side-label{font-size:10px;font-weight:700;letter-spacing:.14em;color:#c4d7fb}
.tw-portfolio-feature-side ol{list-style:none;margin:18px 0 12px;padding:0}
.tw-portfolio-feature-side li{display:flex;gap:14px;align-items:baseline;padding:15px 0;border-bottom:1px solid rgba(255,255,255,.17);min-width:0}
.tw-portfolio-feature-side li>span{font-family:var(--font-heading);font-size:11px;color:#a7c8ff}
.tw-portfolio-feature-side li strong{font-size:12px;font-weight:600;color:#fff;line-height:1.5;overflow-wrap:anywhere}
.tw-feature-no-lessons{max-width:240px;margin:20px 0;color:#dce7fc;font-size:12px}
.tw-portfolio-more{margin-top:auto;color:#c4d7fb;font-size:11px}
.tw-portfolio-section{margin-top:44px}
.tw-portfolio-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:15px;margin-bottom:17px}
.tw-portfolio-section-head h2{font-size:clamp(1.4rem,2.3vw,1.9rem);margin:5px 0;letter-spacing:-.04em}
.tw-portfolio-section-head p{font-size:12px;color:var(--text-secondary);margin:0}
.tw-portfolio-section-head>span{font-size:11px;color:var(--text-secondary);white-space:nowrap}
.tw-portfolio-list{border-top:1px solid var(--line-subtle)}
.tw-portfolio-row{display:grid;grid-template-columns:40px minmax(0,1.8fr) repeat(3,minmax(65px,.36fr)) minmax(125px,.65fr);gap:16px;align-items:center;padding:24px 4px;border-bottom:1px solid var(--line-subtle)}
.tw-portfolio-index{font-family:var(--font-heading);font-size:22px;color:var(--accent-primary);opacity:.55}
.tw-portfolio-row-main{min-width:0}
.tw-portfolio-row-subject{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--accent-primary)}
.tw-portfolio-row-main h3{margin:5px 0;font-size:16px;line-height:1.3}
.tw-portfolio-row-main h3 a{color:inherit}
.tw-portfolio-row-main h3 a:hover{color:var(--accent-primary)}
.tw-portfolio-row-main p{margin:0;color:var(--text-secondary);font-size:11px;line-height:1.5}
.tw-portfolio-row-feedback{display:block;margin-top:6px;color:var(--warning);font-size:10px}
.tw-portfolio-row-stat{display:grid;gap:3px}
.tw-portfolio-row-stat strong{font-family:var(--font-heading);font-size:18px;line-height:1.2}
.tw-portfolio-row-stat span{font-size:10px;color:var(--text-secondary)}
.tw-portfolio-row-tail{display:flex;align-items:center;justify-content:space-between;gap:8px}
.tw-portfolio-row-tail>span{font-size:11px;font-weight:700;line-height:1.3}
.tw-portfolio-row-tail a{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;border:1px solid var(--line-subtle);color:var(--accent-primary)}
.tw-portfolio-row-tail a:hover{border-color:var(--accent-primary);background:var(--accent-soft)}
.tw-portfolio-row-tail svg{width:16px;height:16px}
.tw-portfolio-empty{padding:clamp(45px,7vw,95px) 0;border-bottom:1px solid var(--line-subtle)}
.tw-portfolio-empty h2{font-size:clamp(1.9rem,3.5vw,3rem);margin:0 0 10px;max-width:620px}
.tw-portfolio-empty p{max-width:520px;font-size:13px;color:var(--text-secondary);line-height:1.7}
.tw-portfolio-empty .tw-button{margin-top:10px}
@media(max-width:1100px){.tw-portfolio-row{grid-template-columns:30px minmax(0,1.7fr) repeat(2,minmax(58px,.35fr)) minmax(110px,.65fr);gap:12px}.tw-portfolio-row-progress{display:none}}
@media(max-width:850px){.tw-portfolio-feature{grid-template-columns:minmax(0,1fr)}.tw-portfolio-feature-side{border-left:0;border-top:1px solid rgba(255,255,255,.18);padding:24px 30px}.tw-portfolio-feature-side ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:10px 0}.tw-portfolio-feature-side li{padding:10px 0;align-items:flex-start}.tw-portfolio-more{margin-top:8px}.tw-portfolio-row{grid-template-columns:30px repeat(3,minmax(0,1fr)) auto;gap:8px 14px}.tw-portfolio-index{grid-column:1;grid-row:1}.tw-portfolio-row-main{grid-column:2/-1;grid-row:1}.tw-portfolio-row-stat{grid-row:2}.tw-portfolio-row-stat:nth-child(3){grid-column:2}.tw-portfolio-row-stat:nth-child(4){grid-column:3}.tw-portfolio-row-progress{display:grid;grid-column:4}.tw-portfolio-row-tail{grid-column:5;grid-row:2}}
@media(max-width:639px){.tw-classes-page .tw-page-head{padding:2px 0 20px;margin-bottom:12px}.tw-classes-page .tw-page-head h1{font-size:2.15rem}.tw-classes-page .tw-page-head p{font-size:12px}.tw-class-tools .tw-filterbar{gap:10px;padding:4px 0 12px}.tw-class-tools .tw-filterbar label{min-width:calc(50% - 5px)}.tw-class-tools .tw-filterbar label:first-child{flex:1 0 100%}.tw-portfolio-tabs{gap:20px}.tw-portfolio-tabs button{min-height:46px;font-size:11px}.tw-portfolio-count{font-size:10px}.tw-portfolio-count span:last-child{display:none}.tw-portfolio-feature{border-radius:15px}.tw-portfolio-feature-copy{padding:25px 22px 22px}.tw-portfolio-overline{font-size:9px;letter-spacing:.08em}.tw-portfolio-subject{margin-top:24px;font-size:10px}.tw-portfolio-feature h2{font-size:2.05rem}.tw-portfolio-feature-copy>p{font-size:12px}.tw-portfolio-feature-facts{gap:14px 20px;margin-top:22px;padding-top:16px}.tw-portfolio-feature-facts strong{font-size:17px}.tw-portfolio-feature-action{margin-top:20px}.tw-portfolio-feature-side{padding:20px 22px}.tw-portfolio-feature-side ol{display:block}.tw-portfolio-feature-side li{padding:10px 0}.tw-portfolio-section{margin-top:36px}.tw-portfolio-section-head h2{font-size:1.4rem}.tw-portfolio-section-head>span{font-size:10px}.tw-portfolio-row{grid-template-columns:22px repeat(3,minmax(0,1fr)) 24px;gap:8px 9px;padding:19px 0}.tw-portfolio-index{font-size:16px}.tw-portfolio-row-main h3{font-size:14px}.tw-portfolio-row-main p{font-size:10px}.tw-portfolio-row-subject{font-size:9px;letter-spacing:.025em}.tw-portfolio-row-stat strong{font-size:15px}.tw-portfolio-row-stat span{font-size:9px}.tw-portfolio-row-tail{grid-column:2/-1;grid-row:3;border-top:1px solid var(--line-subtle);padding-top:8px}.tw-portfolio-row-tail>span{font-size:10px}.tw-portfolio-row-tail a{width:30px;height:30px}.tw-portfolio-row-tail svg{width:14px;height:14px}}

/* --- Teacher Redesign 2.0: Brand, Switcher, Metrics, Checklist, Charts, Attention --- */
.tw-brand-badge{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;background:var(--accent-soft);color:var(--accent-primary);padding:3px 9px;border-radius:99px;margin-top:6px}
.tw-switch-btn{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--surface-subtle);border:1px solid var(--line-subtle);border-radius:12px;color:var(--text-primary);font-size:12px;font-weight:700;margin:0 12px 18px;transition:all .18s ease}
.tw-switch-btn:hover{background:var(--accent-soft);border-color:var(--accent-primary);color:var(--accent-primary)}
.tw-switch-btn .tw-switch-arrow{margin-left:auto;font-size:11px;color:var(--text-muted)}
.tw-switch-btn:hover .tw-switch-arrow{color:var(--accent-primary)}
.tw-nav-badge{margin-left:auto;font-size:11px;font-weight:700;background:var(--accent-primary);color:#fff;padding:1px 7px;border-radius:99px;line-height:1.4}
.tw-status-pill{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;padding:4px 10px;border-radius:99px;background:var(--surface-muted);color:var(--text-secondary);margin-bottom:12px}
.tw-status-pill i{font-size:7px}
.tw-status-pill.active{background:color-mix(in srgb,var(--success) 12%,var(--surface-bg));color:var(--success)}
.tw-status-pill.pending{background:var(--accent-soft);color:var(--accent-primary)}
.tw-status-pill.suspended{background:color-mix(in srgb,var(--danger) 12%,var(--surface-bg));color:var(--danger)}
.tw-status-pill.admin{background:color-mix(in srgb,var(--accent-primary) 15%,var(--surface-bg));color:var(--accent-primary)}
.tw-header-switch{display:inline-flex;align-items:center;gap:7px;padding:7px 13px;font-size:12px;border-radius:9px}
@media(max-width:639px){.tw-header-switch span{display:none}.tw-header-switch{padding:8px 10px}}

/* Dashboard: one strong priority, open editorial sections, no wall of cards. */
.tw-dashboard .tw-page-head{border-bottom:0;padding-bottom:0;margin-bottom:24px}
.tw-dash-spotlight{position:relative;isolation:isolate;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 156px;align-items:end;gap:36px;padding:34px 38px;margin-bottom:28px;border-radius:24px;background:radial-gradient(circle at 83% -18%,rgba(125,185,255,.38),transparent 42%),linear-gradient(125deg,#11295c,#1d4ed8);color:#fff}
.tw-dash-spotlight::after{content:"";position:absolute;z-index:-1;width:270px;height:270px;right:-115px;bottom:-185px;border:1px solid rgba(255,255,255,.24);border-radius:50%;box-shadow:0 0 0 38px rgba(255,255,255,.045),0 0 0 82px rgba(255,255,255,.035)}
.tw-dash-spotlight-copy{min-width:0;max-width:650px}
.tw-dash-spotlight-eyebrow{display:inline-flex;align-items:center;gap:9px;font-size:10px;font-weight:800;letter-spacing:.12em;color:#c7deff}
.tw-dash-spotlight-eyebrow i{font-size:12px}
.tw-dash-spotlight h2{font-family:var(--font-heading);font-size:clamp(1.7rem,3.1vw,2.6rem);line-height:1.12;letter-spacing:-.045em;margin:14px 0 10px;color:#fff}
.tw-dash-spotlight p{max-width:490px;font-size:13px;line-height:1.65;color:#dbe9ff;margin:0 0 19px}
.tw-dash-spotlight-action{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:43px;padding:10px 17px;border-radius:11px;background:#fff;color:#173e91;font-size:12px;font-weight:800;text-decoration:none;transition:transform .18s ease,background .18s ease}
.tw-dash-spotlight-action:hover{transform:translateY(-2px);background:#edf4ff;color:#173e91}
.tw-dash-spotlight-action:focus-visible{outline:3px solid #fff;outline-offset:4px}
.tw-dash-spotlight-progress{position:relative;display:grid;gap:5px;padding-bottom:3px}
.tw-dash-spotlight-progress>span{font-size:9px;letter-spacing:.12em;font-weight:800;color:#c7deff}
.tw-dash-spotlight-progress strong{font-family:var(--font-heading);font-size:2.35rem;line-height:1;letter-spacing:-.05em;color:#fff}
.tw-dash-spotlight-progress strong small{font-size:1rem;font-weight:500;color:#c7deff}
.tw-dash-spotlight-progress>small{font-size:10px;color:#dbe9ff}
.tw-dash-spotlight-track{height:4px;margin:5px 0;background:rgba(255,255,255,.28);border-radius:99px;overflow:hidden}
.tw-dash-spotlight-track span{display:block;height:100%;border-radius:99px;background:#fff}
.tw-dashboard-flow{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);align-items:start;gap:clamp(28px,4.5vw,64px);margin:8px 0 44px}
.tw-dashboard-flow .tw-attention-card,.tw-dashboard-flow .tw-checklist-card{background:transparent;border:0;border-radius:0;box-shadow:none;padding:0;margin:0;min-width:0}
.tw-dashboard-flow .tw-attention-card.is-clear{align-items:flex-start}
.tw-dashboard-flow .tw-checklist-items{grid-template-columns:1fr;gap:0}
.tw-dashboard-flow .tw-checklist-header{align-items:center;margin-bottom:9px}
.tw-dashboard-flow .tw-checklist-info p{max-width:320px;line-height:1.5}
.tw-dashboard-flow .tw-checklist-circle{width:44px;height:44px;font-size:12px}
.tw-dashboard-flow .tw-checklist-bar-track{height:4px;margin-bottom:7px}
.tw-dashboard-flow .tw-attention-item{display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:11px;align-items:center;padding:15px 0}
.tw-dashboard-flow .tw-attention-item-icon{font-size:15px}
.tw-dashboard-flow .tw-attention-item-body strong{font-size:13px}
.tw-dashboard-flow .tw-attention-item-body p{font-size:11px;line-height:1.5}
.tw-dashboard-flow .tw-attention-item .tw-button{width:auto;min-height:32px;padding:5px 3px;border:0;background:transparent;box-shadow:none;color:var(--accent-primary);font-size:11px;white-space:nowrap}
.tw-dashboard .tw-charts-grid{margin:48px 0 0;padding-top:28px;border-top:1px solid var(--line-subtle)}
.tw-dashboard .tw-chart-card{background:transparent;border:0;box-shadow:none;border-radius:0;padding:0}
@media(max-width:900px){.tw-dashboard-flow{grid-template-columns:1fr;gap:28px}}
@media(max-width:639px){.tw-dashboard .tw-page-head{margin-bottom:19px}.tw-dashboard .tw-page-head .tw-actions{width:auto}.tw-dashboard .tw-page-head .tw-actions .tw-button{flex:none;min-height:40px}.tw-dash-spotlight{grid-template-columns:1fr;gap:24px;padding:25px 23px;margin-bottom:20px;border-radius:19px}.tw-dash-spotlight h2{font-size:1.85rem}.tw-dash-spotlight p{font-size:12px}.tw-dash-spotlight-progress{grid-template-columns:auto 1fr;column-gap:17px;align-items:center;border-top:1px solid rgba(255,255,255,.2);padding-top:15px}.tw-dash-spotlight-progress>span{grid-column:1/-1}.tw-dash-spotlight-progress strong{font-size:1.6rem;grid-column:1;grid-row:2/4}.tw-dash-spotlight-track{grid-column:2;grid-row:2;margin:0}.tw-dash-spotlight-progress>small{grid-column:2;grid-row:3}.tw-dashboard-flow{margin:4px 0 34px;gap:30px}.tw-dashboard-flow .tw-attention-item{grid-template-columns:20px minmax(0,1fr) auto;gap:9px;align-items:start}.tw-dashboard-flow .tw-attention-item .tw-button{align-self:center;font-size:10px}.tw-dashboard-flow .tw-attention-item-body p{font-size:10px}.tw-dashboard .tw-charts-grid{margin-top:34px;padding-top:22px}}

/* The dashboard is a short decision surface, not a second analytics page. */
.tw-dashboard-simple .tw-page-head,.tw-dashboard-simple .tw-dash-spotlight,.tw-dashboard-simple .tw-dash-today,.tw-dashboard-simple .tw-dash-portfolio{max-width:930px}
.tw-dashboard-simple .tw-page-head{margin-bottom:19px}
.tw-dashboard-simple .tw-page-head h1{font-size:clamp(2rem,3.4vw,2.75rem)}
.tw-dashboard-simple .tw-dash-spotlight{grid-template-columns:1fr;padding:28px 32px;margin-bottom:36px}
.tw-dashboard-simple .tw-dash-spotlight h2{font-size:clamp(1.55rem,2.6vw,2.15rem);margin-top:11px}
.tw-dashboard-simple .tw-dash-spotlight p{margin-bottom:16px}
.tw-dash-today{margin-bottom:37px}
.tw-dash-today-list{border-top:1px solid var(--line-subtle)}
.tw-dash-today-item{display:grid;grid-template-columns:22px minmax(0,1fr) 16px;align-items:center;gap:12px;padding:15px 2px;border-bottom:1px solid var(--line-subtle);color:var(--text-primary)}
.tw-dash-today-item>i:first-child{font-size:15px;color:var(--accent-primary)}
.tw-dash-today-item>i:last-child{font-size:12px;color:var(--text-muted)}
.tw-dash-today-item>span{min-width:0;display:grid;gap:3px}
.tw-dash-today-item strong{font-size:13px;line-height:1.35}
.tw-dash-today-item small{font-size:11px;line-height:1.5;color:var(--text-secondary)}
.tw-dash-today-item:hover strong,.tw-dash-today-item:hover>i:last-child{color:var(--accent-primary)}
.tw-dash-pulse{margin:0 0 9px;font-size:11px;color:var(--text-secondary)}
.tw-dash-pulse strong{color:var(--text-primary)}
.tw-dash-pulse span{margin:0 7px;color:var(--text-muted)}
.tw-dashboard-simple .tw-dash-portfolio>.tw-dash-muted{padding:18px 0;border-top:1px solid var(--line-subtle)}
@media(max-width:639px){.tw-dashboard-simple .tw-page-head{margin-bottom:16px}.tw-dashboard-simple .tw-page-head h1{font-size:1.95rem}.tw-dashboard-simple .tw-dash-spotlight{padding:23px 22px;margin-bottom:29px}.tw-dashboard-simple .tw-dash-spotlight h2{font-size:1.7rem}.tw-dash-today{margin-bottom:30px}.tw-dash-today-item{gap:9px;padding:14px 0}.tw-dash-today-item strong{font-size:12px}.tw-dash-today-item small{font-size:10px}.tw-dash-pulse{font-size:10px}}

/* Teacher Checklist - De-boxed & Airy */
.tw-checklist-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:24px;margin-bottom:24px;box-shadow:var(--shadow-xs)}
.tw-checklist-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:16px}
.tw-checklist-info h3{margin:0 0 6px;font-size:1.18rem}
.tw-checklist-info p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-checklist-score{text-align:center;flex-shrink:0}
.tw-checklist-circle{width:48px;height:48px;border-radius:50%;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-family:var(--font-heading);font-weight:700;font-size:13px;margin:0 auto 4px;border:2px solid var(--accent-primary)}
.tw-checklist-score small{font-size:10px;color:var(--text-muted)}
.tw-checklist-bar-track{height:6px;background:var(--surface-muted);border-radius:99px;overflow:hidden;margin-bottom:18px}
.tw-checklist-bar-fill{height:100%;background:var(--accent-primary);border-radius:99px;transition:width .3s ease}
.tw-checklist-items{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 24px}
.tw-checklist-item{display:flex;align-items:center;gap:12px;padding:12px 2px;border:0;border-bottom:1px solid var(--line-subtle);background:transparent;transition:all .16s ease}
.tw-checklist-item:hover{background:transparent}
.tw-checklist-item:hover .tw-checklist-text strong{color:var(--accent-primary)}
.tw-checklist-item.is-complete{opacity:.85}
.tw-checklist-check{font-size:16px;color:var(--text-muted);flex-shrink:0}
.tw-checklist-item.is-complete .tw-checklist-check{color:var(--success)}
.tw-checklist-text{min-width:0;flex:1;display:grid;gap:2px}
.tw-checklist-text strong{font-size:12px;line-height:1.3;transition:color .15s ease}
.tw-checklist-text small{font-size:11px;color:var(--text-secondary)}
.tw-checklist-status{font-size:11px;font-weight:700;color:var(--accent-primary);flex-shrink:0}
.tw-checklist-item.is-complete .tw-checklist-status{color:var(--success)}
@media(max-width:768px){.tw-checklist-items{grid-template-columns:1fr}}

/* Attention Required - De-boxed */
.tw-attention-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;margin-bottom:24px;box-shadow:var(--shadow-xs)}
.tw-attention-card.is-clear{display:flex;align-items:center;gap:14px;background:color-mix(in srgb,var(--success) 6%,var(--surface-bg));border-color:color-mix(in srgb,var(--success) 24%,var(--line-subtle))}
.tw-attention-icon-wrap.is-success{font-size:24px;color:var(--success);flex-shrink:0}
.tw-attention-content h3{margin:0 0 3px;font-size:1.1rem}
.tw-attention-content p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-attention-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.tw-attention-head h3{margin:0;font-size:1.15rem}
.tw-attention-count{font-size:11px;font-weight:700;padding:3px 9px;border-radius:99px;background:var(--accent-soft);color:var(--accent-primary)}
.tw-attention-list{display:grid}
.tw-attention-item{display:flex;align-items:center;gap:14px;padding:13px 2px;border:0;border-bottom:1px solid var(--line-subtle);background:transparent}
.tw-attention-item:last-child{border-bottom:0}
.tw-attention-item-icon{font-size:18px;flex-shrink:0;color:var(--accent-primary)}
.tw-attention-item.is-danger .tw-attention-item-icon{color:var(--danger)}
.tw-attention-item.is-warning .tw-attention-item-icon{color:var(--warning)}
.tw-attention-item-body{flex:1;min-width:0}
.tw-attention-item-body strong{font-size:12px;display:block}
.tw-attention-item-body p{margin:2px 0 0;font-size:11px;color:var(--text-secondary)}
@media(max-width:639px){.tw-attention-item{flex-direction:column;align-items:flex-start;gap:8px}.tw-attention-item .tw-button{width:100%}}

/* Metrics Grid */
.tw-stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:24px 0 28px}
.tw-metric-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:20px;box-shadow:var(--shadow-xs);transition:transform .18s ease,box-shadow .18s ease}
.tw-metric-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm)}
.tw-metric-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.tw-metric-icon{width:38px;height:38px;border-radius:10px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-size:16px}
.tw-metric-badge{font-size:10px;font-weight:700;padding:2px 8px;border-radius:99px;background:var(--surface-subtle);color:var(--text-muted);border:1px solid var(--line-subtle)}
.tw-metric-value{font-family:var(--font-heading);font-size:clamp(1.6rem,2.8vw,2.2rem);font-weight:700;letter-spacing:-.03em;color:var(--text-primary);line-height:1.1;margin-bottom:6px}
.tw-metric-label{font-size:12px;font-weight:600;color:var(--text-secondary);margin-bottom:2px}
.tw-metric-hint{font-size:11px;color:var(--text-muted)}
@media(max-width:1023px){.tw-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.tw-stats-grid{grid-template-columns:1fr}}

/* Charts Section */
.tw-charts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:28px}
.tw-chart-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);display:flex;flex-direction:column}
.tw-chart-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:18px}
.tw-chart-card-header h3{margin:3px 0 4px;font-size:1.15rem}
.tw-chart-card-header p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-chart-canvas-wrap{position:relative;height:230px;width:100%;flex:1}
@media(max-width:1023px){.tw-charts-grid{grid-template-columns:1fr}}

/* Student Questions - De-boxed rows */
.tw-dash-questions{display:grid}
.tw-question-item{padding:13px 2px;border:0;border-bottom:1px solid var(--line-subtle);background:transparent;display:grid;gap:6px}
.tw-question-item:last-child{border-bottom:0}
.tw-question-top{display:flex;align-items:center;gap:8px;font-size:11px;flex-wrap:wrap}
.tw-question-author{font-weight:700;color:var(--text-primary)}
.tw-question-class{color:var(--text-muted);margin-right:auto}
.tw-question-body{margin:0;font-size:12px;color:var(--text-secondary);line-height:1.4}
.tw-question-meta{display:flex;justify-content:space-between;align-items:center;font-size:10px;color:var(--text-muted);padding-top:4px}
.tw-question-reply-link{font-weight:700;color:var(--accent-primary);font-size:11px}

/* --- Phase 2: Classes Portfolio Grid (Clean & Breathable) --- */
.tw-classes-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:20px;margin-top:20px}
.tw-course-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);display:flex;flex-direction:column;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.tw-course-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm);border-color:color-mix(in srgb,var(--accent-primary) 35%,var(--line-subtle))}
.tw-course-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.tw-subject-tag{display:inline-flex;align-items:center;gap:6px;font-size:11px;font-weight:600;color:var(--text-secondary);background:var(--surface-subtle);border:1px solid var(--line-subtle);padding:3px 10px;border-radius:99px}
.tw-subject-tag i{color:var(--text-muted);font-size:10px}
.tw-course-title{font-size:1.22rem;margin:0 0 8px;line-height:1.35}
.tw-course-title a{color:var(--text-primary);transition:color .15s ease}
.tw-course-title a:hover{color:var(--accent-primary)}
.tw-course-desc{font-size:13px;color:var(--text-secondary);line-height:1.6;margin:0 0 16px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tw-course-stats-bar{display:flex;flex-wrap:wrap;gap:14px;padding:12px 0;border-top:1px solid var(--line-subtle);border-bottom:1px solid var(--line-subtle);font-size:12px;color:var(--text-secondary);margin-bottom:16px}
.tw-course-stat-item{display:inline-flex;align-items:center;gap:6px}
.tw-course-stat-item i{color:var(--accent-primary);font-size:12px}
.tw-course-feedback{padding:9px 12px;border-radius:8px;background:color-mix(in srgb,var(--warning) 10%,var(--surface-bg));border:1px solid color-mix(in srgb,var(--warning) 25%,transparent);color:var(--warning);font-size:11px;line-height:1.5;margin-bottom:14px}
.tw-course-foot{display:flex;justify-content:space-between;align-items:center;margin-top:auto;gap:12px}
.tw-course-price{font-size:12px;font-weight:700;color:var(--text-primary)}
.tw-course-price small{display:block;font-size:10px;color:var(--text-muted);font-weight:500}

/* --- Phase 2: Class Studio (Clean Canvas & Lesson Cards) --- */
.tw-studio-canvas{border:0;padding:0;margin:0;background:transparent}
.tw-studio-subtitle{color:var(--text-secondary);font-size:13px;margin:0 0 22px}
.tw-studio-section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px}
.tw-studio-section-head h2{margin:0 0 4px}
.tw-lesson-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:14px;padding:20px;margin-bottom:16px;box-shadow:var(--shadow-xs);transition:border-color .15s ease}
.tw-lesson-card:hover{border-color:color-mix(in srgb,var(--accent-primary) 30%,var(--line-subtle))}
.tw-lesson-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}
.tw-lesson-badge{font-family:var(--font-heading);font-size:13px;font-weight:700;color:var(--accent-primary)}
.tw-price-pill{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:12px;background:var(--accent-soft);color:var(--text-primary);font-size:13px;margin-top:14px}
.tw-price-pill i{color:var(--accent-primary);font-size:16px}
.tw-studio-status-row{display:flex;align-items:center;gap:10px;margin-bottom:16px}
.tw-studio-canvas-step{padding:4px 0}
.tw-lessons-list{display:grid}
.tw-studio-preview-wrap{margin-top:16px}
.tw-upload-guide{margin:0 0 28px;border:1px solid var(--line-subtle);border-radius:10px;background:var(--surface-bg)}
.tw-upload-guide summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;cursor:pointer;font-size:14px;font-weight:600;list-style:none}
.tw-upload-guide summary::-webkit-details-marker{display:none}
.tw-upload-guide summary small{display:block;margin-top:5px;font-size:12px;font-weight:400;color:var(--text-secondary)}
.tw-upload-guide summary i{font-size:11px;color:var(--text-secondary);transition:transform .15s}
.tw-upload-guide[open] summary i{transform:rotate(180deg)}
.tw-upload-guide summary:focus-visible{outline:2px solid var(--accent-primary);outline-offset:3px;border-radius:10px}
.tw-upload-guide-body{padding:0 20px 20px;border-top:1px solid var(--line-subtle)}
.tw-upload-guide ol{padding-left:22px;margin:22px 0}
.tw-upload-guide li{padding-left:8px;margin:0 0 20px;font-size:13px;line-height:1.7}
.tw-upload-guide li::marker{color:var(--text-secondary);font-weight:600}
.tw-upload-guide p{margin:4px 0 0;color:var(--text-secondary);font-size:13px;line-height:1.7}
.tw-upload-guide a{color:var(--accent-primary);text-underline-offset:3px}
.tw-upload-guide-check{border-top:1px solid var(--line-subtle);padding-top:18px;font-size:13px;line-height:1.7}
.tw-upload-guide-check>a{display:inline-block;margin-top:8px;font-size:12px}
.tw-preview-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;overflow:hidden;box-shadow:var(--shadow-xs)}
.tw-preview-banner{display:flex;align-items:center;gap:9px;padding:12px 20px;background:var(--accent-soft);color:var(--accent-primary);font-size:12px;font-weight:700;border-bottom:1px solid color-mix(in srgb,var(--accent-primary) 15%,transparent)}
.tw-preview-body{padding:26px}
.tw-preview-title{font-size:clamp(1.3rem,2.2vw,1.75rem);margin:12px 0 10px;letter-spacing:-.03em}
.tw-preview-desc{font-size:13px;color:var(--text-secondary);line-height:1.65;white-space:pre-wrap;margin:0}
.tw-preview-curriculum{margin-top:22px}
.tw-preview-lesson-row{display:flex;align-items:center;gap:14px;padding:13px 2px;border-bottom:1px solid var(--line-subtle)}
.tw-preview-lesson-row:last-child{border-bottom:0}
.tw-preview-lesson-num{width:28px;height:28px;border-radius:50%;background:var(--surface-muted);color:var(--text-secondary);display:grid;place-items:center;font-weight:700;font-size:11px;flex-shrink:0}
.tw-preview-lesson-info{flex:1;min-width:0;display:grid;gap:2px}
.tw-preview-lesson-info strong{font-size:13px;line-height:1.3}
.tw-preview-lesson-info small{font-size:11px;color:var(--text-secondary)}
.tw-preview-video-link{font-size:12px;color:var(--accent-primary);font-weight:600;display:inline-flex;align-items:center;gap:6px;flex-shrink:0}
.tw-preview-video-link:hover{text-decoration:underline}

/* --- Phase 3: Students Page (De-boxed Roster & Student Cards) --- */
.tw-students-page{max-width:1320px;margin:0 auto}
.tw-students-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(330px,1fr));gap:20px;margin-top:20px}
.tw-student-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);display:flex;flex-direction:column;gap:16px;transition:transform .18s ease,box-shadow .18s ease}
.tw-student-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-sm)}
.tw-student-card-top{display:flex;align-items:center;gap:14px}
.tw-student-avatar{width:46px;height:46px;border-radius:14px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-family:var(--font-heading);font-weight:700;font-size:18px;flex-shrink:0}
.tw-student-info{min-width:0;flex:1}
.tw-student-info h3{margin:0 0 3px;font-size:1.15rem;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tw-student-info p{margin:0;font-size:11px;color:var(--text-secondary);display:flex;align-items:center;gap:6px}
.tw-student-class{padding:10px 14px;border-radius:12px;background:var(--surface-subtle);border:1px solid var(--line-subtle);font-size:12px}
.tw-student-class strong{display:block;margin-bottom:2px;color:var(--text-primary)}
.tw-student-class small{color:var(--text-muted);font-size:11px}
.tw-student-progress-box{display:grid;gap:6px}
.tw-student-progress-labels{display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:600}
.tw-student-progress-labels span:last-child{color:var(--accent-primary)}
.tw-student-card-foot{display:flex;justify-content:space-between;align-items:center;margin-top:auto;padding-top:12px;border-top:1px solid var(--line-subtle)}
.tw-student-joined{font-size:11px;color:var(--text-muted);display:inline-flex;align-items:center;gap:5px}

/* Student Progress Dialog */
.tw-student-dialog-hero{display:flex;align-items:center;gap:14px;padding:8px 0 18px;border-bottom:1px solid var(--line-subtle);margin-bottom:18px}
.tw-student-dialog-avatar{width:48px;height:48px;border-radius:14px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-family:var(--font-heading);font-weight:700;font-size:20px}
.tw-student-dialog-meta h3{font-size:1.3rem;margin:0 0 3px}
.tw-student-dialog-meta p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-student-cohort-block{background:var(--surface-subtle);border:1px solid var(--line-subtle);border-radius:14px;padding:18px;margin-bottom:18px}
.tw-student-cohort-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.tw-student-cohort-head h4{margin:0;font-size:1.08rem}
.tw-student-lesson-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--line-subtle)}
.tw-student-lesson-row:last-child{border-bottom:0}
.tw-student-lesson-row span{font-size:12px}

/* --- Phase 3: Analytics Page (De-boxed Metrics & Interactive Charts) --- */
.tw-analytics-page{max-width:1320px;margin:0 auto}
.tw-analytics-charts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:24px 0}
.tw-analytics-chart-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);display:flex;flex-direction:column}
.tw-analytics-chart-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.tw-analytics-chart-head h3{margin:0 0 3px;font-size:1.15rem}
.tw-analytics-chart-head p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-analytics-canvas-wrap{position:relative;height:240px;width:100%;flex:1}
@media(max-width:1023px){.tw-analytics-charts-grid{grid-template-columns:1fr}}

.tw-analytics-table-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);margin-top:24px}
.tw-analytics-table-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.tw-analytics-table-head h3{margin:0;font-size:1.15rem}




/* --- Phase 4: Discussions Stream (De-boxed & Conversational) --- */
.tw-discussions-page{max-width:1320px;margin:0 auto}
.tw-discussions-stream{display:grid;gap:18px;margin-top:20px}
.tw-thread-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);transition:border-color .15s ease,box-shadow .15s ease}
.tw-thread-card:hover{border-color:color-mix(in srgb,var(--accent-primary) 30%,var(--line-subtle));box-shadow:var(--shadow-sm)}
.tw-thread-header{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:14px}
.tw-thread-author-wrap{display:flex;align-items:center;gap:12px;min-width:0}
.tw-thread-avatar{width:42px;height:42px;border-radius:12px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-family:var(--font-heading);font-weight:700;font-size:16px;flex-shrink:0}
.tw-thread-author-meta{min-width:0}
.tw-thread-author-meta h4{margin:0 0 4px;font-size:1.1rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tw-thread-tags{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.tw-thread-lesson-badge{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--text-secondary);background:var(--surface-subtle);padding:2px 8px;border-radius:6px;border:1px solid var(--line-subtle)}
.tw-thread-body{font-size:13.5px;line-height:1.65;color:var(--text-primary);margin:0 0 16px;white-space:pre-wrap;overflow-wrap:anywhere}
.tw-thread-body p{margin:0}
.tw-thread-replies{display:grid;gap:10px;margin:14px 0 16px;padding-left:14px;border-left:2px solid color-mix(in srgb,var(--accent-primary) 40%,var(--line-subtle))}
.tw-reply-card{padding:12px 14px;border-radius:12px;background:var(--surface-subtle);border:1px solid var(--line-subtle)}
.tw-reply-card.is-educator{background:color-mix(in srgb,var(--accent-primary) 6%,var(--surface-bg));border-color:color-mix(in srgb,var(--accent-primary) 22%,var(--line-subtle))}
.tw-reply-head{display:flex;align-items:center;gap:8px;margin-bottom:6px;font-size:12px;flex-wrap:wrap}
.tw-reply-avatar{width:22px;height:22px;border-radius:6px;background:var(--accent-soft);color:var(--accent-primary);display:grid;place-items:center;font-size:10px;font-weight:700;flex-shrink:0}
.tw-badge-educator{display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:700;text-transform:uppercase;background:var(--accent-primary);color:#fff;padding:1px 6px;border-radius:4px}
.tw-reply-body{font-size:12.5px;line-height:1.55;color:var(--text-primary)}
.tw-reply-body p{margin:0}
.tw-thread-reply-form{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid var(--line-subtle)}
.tw-reply-input-wrap{display:flex;gap:10px;align-items:center}
.tw-reply-input-wrap .tw-input{flex:1;min-width:0}
.tw-thread-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px}
@media(max-width:639px){
  .tw-thread-header{flex-direction:column;align-items:flex-start}
  .tw-reply-input-wrap{flex-direction:column}
  .tw-reply-input-wrap .tw-button{width:100%}
  .tw-thread-actions .tw-button{width:100%}
}

/* --- Phase 4: Payouts & Earnings (De-boxed Ledger & Bank Card) --- */
.tw-payouts-page{max-width:1320px;margin:0 auto}
.tw-payouts-layout{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(320px,1.05fr);gap:24px;margin-top:20px}
.tw-earnings-card,.tw-payouts-history-card,.tw-payout-bank-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);margin-bottom:24px}
.tw-card-section-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;margin-bottom:18px}
.tw-card-section-head h3{margin:0 0 3px;font-size:1.15rem}
.tw-card-section-head p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-earnings-ledger{display:grid}
.tw-earning-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 2px;border-bottom:1px solid var(--line-subtle)}
.tw-earning-row:last-child{border-bottom:0}
.tw-earning-main strong{font-size:13px;display:block;margin-bottom:3px;color:var(--text-primary)}
.tw-earning-main small{font-size:11px;color:var(--text-muted)}
.tw-earning-side{text-align:right;flex-shrink:0}
.tw-earning-side strong{font-family:var(--font-heading);font-size:15px;color:var(--success);display:block}
.tw-earning-side small{font-size:11px;color:var(--text-muted)}

.tw-payouts-ledger{display:grid}
.tw-payout-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 2px;border-bottom:1px solid var(--line-subtle)}
.tw-payout-row:last-child{border-bottom:0}
.tw-payout-main strong{font-family:var(--font-heading);font-size:16px;display:block;margin-bottom:3px}
.tw-payout-main small{font-size:11px;color:var(--text-muted)}
.tw-reversal-note{margin-top:4px;font-size:11px;color:var(--danger);display:flex;align-items:center;gap:5px}

.tw-bank-account-preview{background:linear-gradient(135deg,#091e42,#172b4d 60%,#0c2340);color:#fff;border-radius:16px;padding:22px;margin-bottom:20px;box-shadow:0 8px 20px rgba(9,30,66,.18);position:relative;overflow:hidden}
.tw-bank-account-preview:before{content:"";position:absolute;width:180px;height:180px;right:-40px;top:-40px;border-radius:50%;background:rgba(255,255,255,.05);pointer-events:none}
.tw-bank-preview-label{font-size:11px;font-weight:600;color:rgba(255,255,255,.75);margin-bottom:12px}
.tw-bank-preview-bank{font-size:13px;color:#dbeafe;margin-bottom:4px;font-weight:600}
.tw-bank-preview-number{font-family:var(--font-heading);font-size:20px;letter-spacing:2px;font-weight:700;color:#fff;margin-bottom:10px}
.tw-bank-preview-name{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:#bfdbfe}
.tw-bank-status-banner{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:99px;font-size:10px;font-weight:700;margin-top:14px}
.tw-bank-status-banner.is-verified{background:rgba(16,185,129,.2);color:#34d399;border:1px solid rgba(16,185,129,.4)}
.tw-bank-status-banner.is-pending{background:rgba(245,158,11,.2);color:#fbbf24;border:1px solid rgba(245,158,11,.4)}
.tw-bank-form{display:grid;gap:4px}
@media(max-width:1023px){.tw-payouts-layout{grid-template-columns:1fr}}

/* --- Phase 5: Administration (De-boxed Cards & Operation Queues) --- */
.tw-admin-page{max-width:1320px;margin:0 auto}
.tw-admin-card{background:var(--surface-bg);border:1px solid var(--line-subtle);border-radius:18px;padding:22px;box-shadow:var(--shadow-xs);margin-top:20px}
.tw-admin-section-head{margin-bottom:18px}
.tw-admin-section-head h2{margin:0 0 4px;font-size:1.25rem}
.tw-admin-section-head p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-admin-list{display:grid}
.tw-admin-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 2px;border-bottom:1px solid var(--line-subtle)}
.tw-admin-row:last-child{border-bottom:0}
.tw-admin-row-main{flex:1;min-width:0}
.tw-admin-row-main h3{margin:0 0 3px;font-size:14px;line-height:1.3}
.tw-admin-row-main p{margin:0;font-size:12px;color:var(--text-secondary)}
.tw-price-row{display:flex;justify-content:space-between;align-items:center;gap:16px}
@media(max-width:639px){
  .tw-admin-row{flex-direction:column;align-items:flex-start}
  .tw-admin-row .tw-actions{width:100%}
  .tw-price-row{flex-direction:column;align-items:stretch}
}

/* --- Phase 5: Profile & Onboarding (Student-Matched Social Educator Profile) --- */
.tw-social-profile.profile-container{max-width:1100px;margin:0 auto;padding:0 0 48px}
.tw-social-profile .tw-check{background:var(--surface-bg);cursor:pointer;transition:border-color .15s ease,background .15s ease}
.tw-social-profile .tw-check:has(input:checked){border-color:var(--accent-primary);background:var(--accent-soft);color:var(--accent-primary);font-weight:700}

/* On phones, More opens a bottom sheet instead of duplicating the top menu. */
@media(max-width:639px){
  .tr-navbar__hamburger.tw-mobile-menu,
  .tr-navbar.tw-header .tr-navbar__theme-btn{display:none!important}
  .tw-sidebar{inset:auto 0 0;width:100%;height:min(78dvh,680px);padding:27px 18px calc(20px + env(safe-area-inset-bottom));border:1px solid var(--line-subtle);border-bottom:0;border-radius:24px 24px 0 0;transform:translateY(105%);box-shadow:0 -16px 42px rgba(15,23,42,.18)}
  .tw-sidebar.open{transform:translateY(0)}
  .tw-sidebar::before{content:'';position:absolute;top:10px;left:calc(50% - 20px);width:40px;height:4px;border-radius:99px;background:var(--line-subtle)}
  .tw-brand-block{padding-bottom:17px}
  .tw-drawer-close{top:18px;right:17px}
  .tw-sidebar-foot{margin-top:16px;padding-top:14px;border-top:1px solid var(--line-subtle)}
  .tw-bottom-nav .tw-i{font-size:19px;line-height:1.1}
  .tw-bottom-nav button[aria-expanded=true]{color:var(--accent-primary);background:var(--accent-soft)}
}

/* Shared small-screen refinements across the teacher workspace. */
@media(max-width:639px){
  .tw-main{padding:20px 14px calc(96px + env(safe-area-inset-bottom));overflow-x:clip}
  .tw-page-head h1{font-size:clamp(1.6rem,6.5vw,1.95rem)}
  .tw-page-head .tw-actions{display:flex;width:100%;gap:8px}
  .tw-page-head .tw-actions .tw-button{min-width:0;white-space:normal}
  .tw-bottom-nav{padding:5px 5px max(6px,env(safe-area-inset-bottom));z-index:1000}
  .tw-bottom-nav a,.tw-bottom-nav button{min-width:0;min-height:56px;gap:3px;font-size:10px}
  .tw-bottom-nav .tw-i{font-size:18px}
  .tw-bottom-nav span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tw-filterbar,.tw-class-tools .tw-filterbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .tw-filterbar label,.tw-class-tools .tw-filterbar label{width:100%;min-width:0;max-width:none;flex:none}
  .tw-filterbar label:first-child,.tw-class-tools .tw-filterbar label:first-child{grid-column:1/-1}
  .tw-classes-grid,.tw-students-grid{grid-template-columns:minmax(0,1fr);gap:14px}
  .tw-course-card,.tw-student-card{padding:18px;min-width:0}
  .tw-course-foot{flex-wrap:wrap;align-items:flex-start}
  .tw-course-foot .tw-button{min-height:42px}
  .tw-stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:18px 0 22px}
  .tw-metric-card{padding:14px;border-radius:14px;min-width:0}
  .tw-metric-header{margin-bottom:9px}
  .tw-metric-icon{width:33px;height:33px;font-size:14px}
  .tw-metric-badge{font-size:9px;padding:2px 6px}
  .tw-metric-value{font-size:clamp(1.25rem,6vw,1.75rem);overflow-wrap:anywhere}
  .tw-metric-label{font-size:11px}
  .tw-metric-hint{font-size:10px}
  .tw-analytics-chart-card,.tw-analytics-table-card,.tw-thread-card,.tw-earnings-card,.tw-payouts-history-card,.tw-payout-bank-card,.tw-admin-card,.tw-profile-card{padding:17px;border-radius:15px}
  .tw-analytics-canvas-wrap,.tw-chart-canvas-wrap{height:205px}
  .tw-analytics-table-card table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .tw-thread-replies{padding-left:10px}
  .tw-payout-row,.tw-earning-row{align-items:flex-start}
  .tw-payout-main,.tw-earning-main{min-width:0;overflow-wrap:anywhere}
  .tw-payout-row> :last-child,.tw-earning-side{flex-shrink:0;text-align:right}
  .tw-studio-section-head{align-items:flex-start;flex-wrap:wrap}
  .tw-lesson-card{padding:16px}
  .tw-editor-foot{bottom:calc(68px + env(safe-area-inset-bottom));padding:9px 10px}
  .tw-editor-foot small{display:none}
  .tw-editor-foot .tw-actions{width:100%;justify-content:stretch}
  .tw-editor-foot .tw-actions .tw-button{flex:1;min-width:0}
  .tw-preview-body{padding:19px}
  .tw-preview-lesson-row{flex-wrap:wrap}
  .tw-preview-video-link{margin-left:42px}
  #workspace-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 32px);padding:17px}
}
@media(max-width:360px){
  .tw-main{padding-left:12px;padding-right:12px}
  .tw-stats-grid{grid-template-columns:1fr 1fr}
  .tw-metric-badge{display:none}
  .tw-course-foot .tw-button{width:100%}
  .tw-portfolio-row-stat strong{overflow-wrap:anywhere}
}


/* Theme toggle icons show the mode you will switch TO: moon in light mode, sun in dark mode. */
.tr-navbar__theme-btn .tr-navbar__icon-sun,
.tr-navbar__mobile-theme-btn .tr-navbar__icon-sun,
.tw-drawer-theme-btn .tr-navbar__icon-sun,
.tr-student-more-sheet__theme .tr-navbar__icon-sun { opacity: 0 !important; transform: translate(-50%, -50%) rotate(110deg) scale(0.15) !important; }
.tr-navbar__theme-btn .tr-navbar__icon-moon,
.tr-navbar__mobile-theme-btn .tr-navbar__icon-moon,
.tw-drawer-theme-btn .tr-navbar__icon-moon,
.tr-student-more-sheet__theme .tr-navbar__icon-moon { opacity: 1 !important; transform: translate(-50%, -50%) rotate(0deg) scale(1) !important; color: #475569 !important; filter: none !important; }
body.tr-dark .tr-navbar__theme-btn .tr-navbar__icon-sun, html[data-theme='dark'] .tr-navbar__theme-btn .tr-navbar__icon-sun,
body.tr-dark .tr-navbar__mobile-theme-btn .tr-navbar__icon-sun, html[data-theme='dark'] .tr-navbar__mobile-theme-btn .tr-navbar__icon-sun,
body.tr-dark .tw-drawer-theme-btn .tr-navbar__icon-sun, html[data-theme='dark'] .tw-drawer-theme-btn .tr-navbar__icon-sun,
body.tr-dark .tr-student-more-sheet__theme .tr-navbar__icon-sun, html[data-theme='dark'] .tr-student-more-sheet__theme .tr-navbar__icon-sun { opacity: 1 !important; transform: translate(-50%, -50%) rotate(0deg) scale(1) !important; color: #f59e0b !important; filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5)) !important; }
body.tr-dark .tr-navbar__theme-btn .tr-navbar__icon-moon, html[data-theme='dark'] .tr-navbar__theme-btn .tr-navbar__icon-moon,
body.tr-dark .tr-navbar__mobile-theme-btn .tr-navbar__icon-moon, html[data-theme='dark'] .tr-navbar__mobile-theme-btn .tr-navbar__icon-moon,
body.tr-dark .tw-drawer-theme-btn .tr-navbar__icon-moon, html[data-theme='dark'] .tw-drawer-theme-btn .tr-navbar__icon-moon,
body.tr-dark .tr-student-more-sheet__theme .tr-navbar__icon-moon, html[data-theme='dark'] .tr-student-more-sheet__theme .tr-navbar__icon-moon { opacity: 0 !important; transform: translate(-50%, -50%) rotate(-110deg) scale(0.15) !important; }
.tw-drawer-theme-top{display:none;position:absolute;top:20px;right:68px;overflow:hidden}
.tw-drawer-theme-top .tr-navbar__icon-sun,.tw-drawer-theme-top .tr-navbar__icon-moon{font-size:17px!important}
.tw-foot-tools{grid-template-columns:1fr}
@media(max-width:1023px){.tw-drawer-theme-top{display:inline-grid}}
@media(max-width:639px){.tw-drawer-theme-top{top:18px;right:67px}}
/* Teacher application is visible on arrival, before a full profile exists. */
.tw-application { max-width: 850px; }
.tw-application form { display: grid; gap: 22px; }
.tw-application form > h2 { margin: 0; font-size: 20px; }
.tw-application-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tw-application-subjects { border: 0; padding: 0; margin: 0; min-width: 0; }
.tw-application-subjects legend { font-weight: 600; font-size: 14px; }
.tw-application .tw-hint { margin: 0; }
.tw-application button[type=submit] { justify-self: start; }
@media(max-width:600px) { .tw-application-grid { grid-template-columns: 1fr; } }
.tw-application-review dd { margin: 5px 0 18px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.tw-application-review dt { font-size: 13px; }
.tw-application .tw-check { align-items: start; }

/* Teacher More: match the student's compact, readable mobile sheet. */
.tw-more-heading, .tw-more-chevron { display: none; }
@media (max-width: 639px) {
  .teacher-workspace .tw-scrim.open { background: rgba(9,20,40,.54); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
  .teacher-workspace .tw-sidebar {
    left: 50%; right: auto; bottom: 0; top: auto;
    width: min(100%, 520px); height: auto; max-height: calc(90dvh - env(safe-area-inset-top, 0px));
    padding: 40px 22px calc(25px + env(safe-area-inset-bottom, 0px));
    border: 0; border-radius: 24px 24px 0 0;
    background: #fff; color: #172746;
    box-shadow: 0 -14px 45px rgba(11,28,59,.2);
    transform: translate(-50%, 105%); visibility: hidden;
    transition: transform .3s cubic-bezier(.22,1,.36,1), visibility .3s;
  }
  .teacher-workspace .tw-sidebar.open { transform: translate(-50%, 0); visibility: visible; }
  .teacher-workspace .tw-sidebar::before { content: ''; position: absolute; top: 12px; width: 38px; height: 4px; left: calc(50% - 19px); border-radius: 99px; background: #c8d2e4; }
  .tw-sidebar .tw-brand-block { display: none; }
  .tw-more-heading { display: block; padding-right: 100px; margin-bottom: 12px; min-height: 48px; }
  .tw-more-heading > span { display: none; }
  .tw-more-heading h2 { margin: 3px 0 0; font: 600 27px/1.2 'Space Grotesk', sans-serif; letter-spacing: -.04em; color: inherit; }
  .tw-sidebar .tw-drawer-close, .tw-sidebar .tw-drawer-theme-top {
    top: 40px; width: 42px; height: 42px; border: 0; border-radius: 13px;
    background: #eef3fb; color: #253c67;
  }
  .tw-sidebar .tw-drawer-close { right: 22px; }
  .tw-sidebar .tw-drawer-theme-top { right: 72px; }
  .tw-sidebar .tw-nav { gap: 0; }
  .tw-sidebar .tw-nav a {
    min-height: 62px; padding: 10px 0; gap: 15px; border-radius: 0;
    border-bottom: 1px solid #e7ecf5; color: inherit;
    background: transparent; font-size: 14px; font-weight: 800;
  }
  .tw-sidebar .tw-nav a[data-nav-key=dashboard],
  .tw-sidebar .tw-nav a[data-nav-key=classes],
  .tw-sidebar .tw-nav a[data-nav-key=earnings] { display: none; }
  .tw-sidebar .tw-nav a::before { display: none; }
  .tw-sidebar .tw-nav-icon { width: 40px; height: 40px; border-radius: 12px; background: #edf3ff; color: #2457d6; box-shadow: none; }
  .tw-sidebar .tw-nav-icon .tw-i { font-size: 16px; }
  .tw-sidebar .tw-nav a[aria-current=page] { color: var(--accent-primary); }
  .tw-sidebar .tw-nav a[aria-current=page] .tw-nav-icon { background: var(--accent-soft); color: var(--accent-primary); box-shadow: none; }
  .tw-sidebar .tw-nav a:hover { color: var(--accent-primary); }
  .tw-more-chevron { display: block; margin-left: auto; font-size: 10px; color: var(--text-muted); }
  .tw-sidebar .tw-nav-badge { margin-left: auto; }
  .tw-sidebar .tw-nav-badge + .tw-more-chevron { margin-left: 0; }
  .tw-sidebar .tw-sidebar-foot { margin-top: 0; padding-top: 0; border-top: 0; gap: 16px; }
  .tw-sidebar .tw-foot-tools .tw-foot-btn { justify-content: flex-start; gap: 15px; min-height: 64px; height: auto; padding: 10px 0; border: 0; border-radius: 0; font-size: 14px; color: var(--text-primary); }
  .tw-sidebar .tw-foot-tools .tw-i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-primary); font-size: 16px; }
  .tw-sidebar .tw-user { display: none; }
  .tw-sidebar .tw-user .tw-avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 13px; }
  .tw-sidebar .tw-user strong { font-size: 12px; }
  .tw-sidebar .tw-logout-btn { width: 40px; height: 40px; }
  .tw-sidebar :is(a,button):focus-visible { outline: 3px solid var(--accent-primary); outline-offset: -3px; }
  .tw-sidebar .tw-foot-tools .tw-i { background: #edf3ff; color: #2457d6; }
  .tw-sidebar .tw-foot-tools .tw-foot-btn { color: inherit; font-weight: 800; }
  body.tr-dark .tw-sidebar, html[data-theme=dark] .tw-sidebar { background: #15223b; color: #edf3ff; }
  body.tr-dark .tw-sidebar :is(.tw-drawer-close,.tw-drawer-theme-top), html[data-theme=dark] .tw-sidebar :is(.tw-drawer-close,.tw-drawer-theme-top) { background: #263958; color: #e1eaff; }
  body.tr-dark .tw-sidebar .tw-nav a, html[data-theme=dark] .tw-sidebar .tw-nav a { border-bottom-color: #30415d; }
  body.tr-dark .tw-sidebar :is(.tw-nav-icon,.tw-foot-tools .tw-i), html[data-theme=dark] .tw-sidebar :is(.tw-nav-icon,.tw-foot-tools .tw-i) { background: #263f68; color: #abc6ff; }
  @media(prefers-reduced-motion:reduce) { .teacher-workspace .tw-sidebar { transition: none; } }
}

.tw-header .tr-profile-header-logout{margin-left:auto;flex-shrink:0;min-height:44px}
.tw-sidebar .tw-nav a[data-nav-key="profile"] .tw-nav-label { color: #000; }
body.tr-dark .tw-sidebar .tw-nav a[data-nav-key="profile"] .tw-nav-label,
html[data-theme="dark"] .tw-sidebar .tw-nav a[data-nav-key="profile"] .tw-nav-label { color: #fff; }
@media(max-width:1023px){.tw-header .tr-profile-header-logout{display:inline-flex!important;padding:0 10px}.tr-navbar__theme-btn{display:none!important}}

