/* ==========================================================================
   homework-hub.css — lesson folders (materials + homework) and homework panels
   js/tools/HomeworkHub.js. Folder parts live inside the library drawer and use
   its --lib-* tokens; the panels (.hwh-*) carry their own tokens.
   ========================================================================== */

/* ── Lesson folder card (row = folder named after the lesson) ────────────── */

html body #onenote-nav.lib-drawer .lf-card {
    --row-accent: var(--lib-accent);
    flex-shrink: 0;
    border: 1px solid var(--lib-border);
    border-radius: 14px;
    background: var(--lib-surface);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
    animation: libRowIn 0.28s var(--lib-ease) backwards;
}

html body #onenote-nav.lib-drawer .lf-card:hover { border-color: color-mix(in srgb, var(--row-accent) 35%, var(--lib-border)); }

html body #onenote-nav.lib-drawer .lf-card.is-open {
    border-color: color-mix(in srgb, var(--row-accent) 45%, var(--lib-border));
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

html body #onenote-nav.lib-drawer .lf-card > .lib-row.lf-head {
    min-height: 56px;
    padding: 7px 6px 7px 10px;
    border-radius: 0;
    animation: none;
}

html body #onenote-nav.lib-drawer .lf-card > .lib-row.lf-head.active::before { display: none; }
html body #onenote-nav.lib-drawer .lf-card.is-open > .lib-row.lf-head { background: color-mix(in srgb, var(--row-accent) 7%, transparent); }

html body #onenote-nav.lib-drawer .lf-folder-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #fff;
    background: linear-gradient(140deg, var(--row-accent), color-mix(in srgb, var(--row-accent) 65%, #000));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--row-accent) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

html body #onenote-nav.lib-drawer .lib-row.is-hidden .lf-folder-icon { background: var(--lib-raised); color: var(--lib-muted); box-shadow: none; }

html body #onenote-nav.lib-drawer .lf-stat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

html body #onenote-nav.lib-drawer .lf-stat i { font-size: 0.72rem; color: var(--row-accent); margin: 0; }

html body #onenote-nav.lib-drawer .lf-chev {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--lib-raised);
    color: var(--lib-muted);
    font-size: 0.75rem;
    transition: transform 0.3s var(--lib-ease), background 0.2s, color 0.2s;
}

html body #onenote-nav.lib-drawer .lf-head.lf-open .lf-chev {
    transform: rotate(180deg);
    background: var(--row-accent);
    color: #fff;
}

html body #onenote-nav.lib-drawer .lf-dot {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--lib-surface);
    animation: lfPulse 2s ease-in-out infinite;
}

@keyframes lfPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ── Inside the folder ───────────────────────────────────────────────────── */

html body #onenote-nav.lib-drawer .lf-body {
    padding: 4px 12px 14px;
    border-top: 1px solid var(--lib-border);
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: lfOpen 0.28s var(--lib-ease) backwards;
}

@keyframes lfOpen {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

html body #onenote-nav.lib-drawer .lf-group { display: flex; flex-direction: column; gap: 6px; }

html body #onenote-nav.lib-drawer .lf-group-title,
html body #onenote-nav.lib-drawer .lf-add-title {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 2px 2px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--lib-muted);
}

html body #onenote-nav.lib-drawer .lf-group-title i,
html body #onenote-nav.lib-drawer .lf-add-title i { font-size: 0.68rem; }

html body #onenote-nav.lib-drawer .lf-group-title b {
    margin-inline-start: auto;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--lib-raised);
    letter-spacing: 0;
    font-size: 0.7rem;
}

html body #onenote-nav.lib-drawer .lf-group-list { display: flex; flex-direction: column; gap: 6px; }

html body #onenote-nav.lib-drawer .lf-item {
    --item-accent: var(--lib-accent);
    position: relative;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px 8px 10px;
    border-radius: 14px;
    background: var(--lib-bg);
    border: 1px solid var(--lib-border);
    cursor: pointer;
    transition: transform 0.12s, border-color 0.15s, background 0.15s;
}

html body #onenote-nav.lib-drawer .lf-item:hover {
    border-color: color-mix(in srgb, var(--item-accent) 50%, transparent);
    background: color-mix(in srgb, var(--item-accent) 5%, var(--lib-bg));
}

html body #onenote-nav.lib-drawer .lf-item:active { transform: scale(0.985); }
html body #onenote-nav.lib-drawer .lf-item.is-hidden { opacity: 0.6; }

html body #onenote-nav.lib-drawer .lf-item.is-active {
    border-color: var(--item-accent);
    background: color-mix(in srgb, var(--item-accent) 10%, var(--lib-bg));
}

html body #onenote-nav.lib-drawer .lf-item-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--item-accent) 15%, transparent);
    color: var(--item-accent);
    font-size: 0.95rem;
}

/* Link cards show the website's own icon on a white chip */
html body #onenote-nav.lib-drawer .lf-link .lf-item-icon:has(.lf-favicon) {
    background: #fff;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--item-accent) 25%, transparent);
}
html body #onenote-nav.lib-drawer .lf-favicon { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; display: block; }

html body #onenote-nav.lib-drawer .lf-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

html body #onenote-nav.lib-drawer .lf-item-title {
    font-size: 0.9rem;
    font-weight: 650;
    color: var(--lib-text);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body #onenote-nav.lib-drawer .lf-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: 0.74rem;
    color: var(--lib-muted);
}

/* One right-hand action shape for every item → straight right edge */
html body #onenote-nav.lib-drawer .lf-open-btn,
html body #onenote-nav.lib-drawer .lf-start {
    flex-shrink: 0;
    width: 74px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
}

html body #onenote-nav.lib-drawer .lf-open-btn {
    background: var(--lib-raised);
    color: var(--lib-muted);
    transition: background 0.15s, color 0.15s;
}

html body #onenote-nav.lib-drawer .lf-open-btn i { font-size: 0.62rem; }

html body #onenote-nav.lib-drawer .lf-item:hover .lf-open-btn {
    background: var(--item-accent);
    color: #fff;
}

html body #onenote-nav.lib-drawer .lf-start { background: var(--item-accent); color: #fff; }
html body #onenote-nav.lib-drawer .lf-start i { font-size: 0.58rem; }

html body #onenote-nav.lib-drawer .lf-item-more {
    width: 30px;
    height: 36px;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--lib-muted);
    cursor: pointer;
    opacity: 0.6;
}

html body #onenote-nav.lib-drawer .lf-item-more:hover { opacity: 1; background: var(--lib-hover); }

/* items without a menu keep the same right edge */
html body #onenote-nav.lib-drawer .lf-item:not(:has(.lf-item-more)) { padding-inline-end: 48px; }

html body #onenote-nav.lib-drawer .lf-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.7rem;
    background: var(--lib-raised);
    color: var(--lib-muted);
}

html body #onenote-nav.lib-drawer .lf-pill--accent { background: color-mix(in srgb, var(--row-accent) 16%, transparent); color: var(--row-accent); }
html body #onenote-nav.lib-drawer .lf-pill--amber { background: color-mix(in srgb, var(--lib-amber) 16%, transparent); color: var(--lib-amber); }
html body #onenote-nav.lib-drawer .lf-pill--danger { background: color-mix(in srgb, var(--lib-danger) 16%, transparent); color: var(--lib-danger); }
html body #onenote-nav.lib-drawer .lf-pill--ok { background: color-mix(in srgb, var(--lib-success) 16%, transparent); color: var(--lib-success); }

html body #onenote-nav.lib-drawer .lf-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--lib-raised);
    overflow: hidden;
    margin-top: 2px;
}

html body #onenote-nav.lib-drawer .lf-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.5s var(--lib-ease);
}

html body #onenote-nav.lib-drawer .lf-counts { display: flex; gap: 12px; font-size: 0.74rem; }
html body #onenote-nav.lib-drawer .lf-counts b { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
html body #onenote-nav.lib-drawer .lf-counts .ok { color: var(--lib-success); }
html body #onenote-nav.lib-drawer .lf-counts .wait { color: var(--lib-amber); }

html body #onenote-nav.lib-drawer .lf-new {
    display: inline-block;
    margin-inline-start: 6px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    vertical-align: 2px;
}

/* Student: done homework is unmistakable */
html body #onenote-nav.lib-drawer .lf-hw.is-done,
html body #onenote-nav.lib-drawer .lf-hw.is-pending {
    --item-accent: var(--lib-success);
    background: color-mix(in srgb, var(--lib-success) 8%, var(--lib-bg));
    border-color: color-mix(in srgb, var(--lib-success) 35%, transparent);
}

html body #onenote-nav.lib-drawer .lf-hw.is-done .lf-item-icon,
html body #onenote-nav.lib-drawer .lf-hw.is-pending .lf-item-icon { background: var(--lib-success); color: #fff; }
html body #onenote-nav.lib-drawer .lf-hw.is-missed { opacity: 0.7; }

html body #onenote-nav.lib-drawer .lib-row.lf-row-done .lib-row-icon {
    background: color-mix(in srgb, var(--lib-success) 18%, transparent);
    color: var(--lib-success);
}

/* ── Add tiles ──────────────────────────────────────────────────────────── */

html body #onenote-nav.lib-drawer .lf-add-grid {
    display: grid;
    grid-template-columns: repeat(var(--lf-cols, 5), minmax(0, 1fr));
    gap: 8px;
}

html body #onenote-nav.lib-drawer .lf-tile {
    --tile: var(--lib-accent);
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 4px;
    border: 1px dashed color-mix(in srgb, var(--tile) 40%, var(--lib-border));
    border-radius: 14px;
    background: color-mix(in srgb, var(--tile) 4%, transparent);
    color: var(--lib-text);
    cursor: pointer;
    transition: transform 0.15s var(--lib-ease), background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

html body #onenote-nav.lib-drawer .lf-tile:hover {
    transform: translateY(-2px);
    border-style: solid;
    border-color: var(--tile);
    background: color-mix(in srgb, var(--tile) 10%, transparent);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--tile) 20%, transparent);
}

html body #onenote-nav.lib-drawer .lf-tile:active { transform: scale(0.96); }

html body #onenote-nav.lib-drawer .lf-tile-ic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tile);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--tile) 35%, transparent);
}

html body #onenote-nav.lib-drawer .lf-tile-label { font-size: 0.78rem; font-weight: 750; }

@media (max-width: 420px) {
    html body #onenote-nav.lib-drawer .lf-add-grid { grid-template-columns: repeat(2, 1fr); }
    html body #onenote-nav.lib-drawer .lf-tile { aspect-ratio: auto; min-height: 64px; flex-direction: row; }
}

/* ── Panels (create / teacher detail / student list) ─────────────────────── */

.hwh-overlay,
.hwh-pop,
.hwh-fab,
.hwh-toasts {
    --h-bg: #0f1522;
    --h-surface: #161e2e;
    --h-raised: #1e283b;
    --h-border: rgba(255, 255, 255, 0.09);
    --h-text: #eaf0f8;
    --h-muted: #8d99ae;
    --h-accent: #6d6afe;
    --h-ok: #10b981;
    --h-amber: #f59e0b;
    --h-danger: #ef4444;
    --h-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html[data-theme="light"] .hwh-overlay,
html[data-theme="light"] .hwh-pop,
html[data-theme="light"] .hwh-fab,
html[data-theme="light"] .hwh-toasts {
    --h-bg: #f6f7fb;
    --h-surface: #ffffff;
    --h-raised: #eef1f7;
    --h-border: rgba(15, 23, 42, 0.1);
    --h-text: #152033;
    --h-muted: #5f6b82;
    --h-accent: #5b57f0;
    --h-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

.hwh-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1000001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 12, 22, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
}

.hwh-overlay.show { opacity: 1; }
.hwh-overlay *, .hwh-overlay *::before, .hwh-overlay *::after { box-sizing: border-box; }

.hwh-sheet {
    width: 100%;
    max-width: 640px;
    max-height: min(88vh, calc(var(--app-vh, 100vh) - 32px));
    display: flex;
    flex-direction: column;
    background: var(--h-bg);
    color: var(--h-text);
    border: 1px solid var(--h-border);
    border-radius: 22px;
    box-shadow: var(--h-shadow);
    overflow: hidden;
    transform: translateY(14px) scale(0.98);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.hwh-overlay.show .hwh-sheet { transform: none; }
.hwh-sheet--detail { max-width: 760px; --t: var(--h-accent); }
.hwh-sheet--student { max-width: 560px; }

.hwh-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 14px 20px;
    border-bottom: 1px solid var(--h-border);
}

.hwh-head-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--t, var(--h-accent)), color-mix(in srgb, var(--t, var(--h-accent)) 60%, #000));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--t, var(--h-accent)) 35%, transparent);
}

.hwh-head-text { flex: 1; min-width: 0; }
.hwh-title { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.25; overflow-wrap: anywhere; }
.hwh-sub { margin-top: 2px; font-size: 0.82rem; color: var(--h-muted); }
.hwh-sub b { color: var(--h-text); letter-spacing: 0.08em; }

.hwh-x {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border: 1px solid var(--h-border);
    border-radius: 11px;
    background: var(--h-surface);
    color: var(--h-muted);
    cursor: pointer;
    font-size: 0.95rem;
}

.hwh-x:hover { color: var(--h-danger); }

.hwh-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hwh-foot {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--h-border);
    background: var(--h-surface);
}

.hwh-foot-note { flex: 1 1 200px; font-size: 0.78rem; color: var(--h-muted); }
.hwh-grow { flex: 1; }

.hwh-btn {
    min-height: 40px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--h-border);
    border-radius: 11px;
    background: var(--h-raised);
    color: var(--h-text);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s, transform 0.12s, opacity 0.15s;
}

.hwh-btn:hover { filter: brightness(1.12); }
.hwh-btn:active { transform: scale(0.97); }
.hwh-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.hwh-btn--primary { border-color: transparent; background: var(--h-accent); color: #fff; }
.hwh-sheet--detail .hwh-btn--primary { background: var(--t); }

.hwh-label { display: block; margin-bottom: 7px; font-size: 0.74rem; font-weight: 800; color: var(--h-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.hwh-input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--h-border);
    border-radius: 11px;
    background: var(--h-surface);
    color: var(--h-text);
    font: inherit;
    font-size: 0.9rem;
    outline: none;
    color-scheme: dark;
}

html[data-theme="light"] .hwh-input { color-scheme: light; }
.hwh-input:focus { border-color: var(--h-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--h-accent) 22%, transparent); }

/* Create: type cards */
.hwh-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.hwh-type {
    --t: var(--h-accent);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px;
    border: 2px solid var(--h-border);
    border-radius: 16px;
    background: var(--h-surface);
    color: var(--h-text);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.12s, background 0.15s;
}

.hwh-type:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--t) 50%, transparent); }
.hwh-type.is-picked { border-color: var(--t); background: color-mix(in srgb, var(--t) 10%, var(--h-surface)); }

.hwh-type-ic {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--t) 18%, transparent);
    color: var(--t);
}

.hwh-type-name { font-weight: 800; font-size: 0.95rem; }
.hwh-type-desc { font-size: 0.74rem; color: var(--h-muted); line-height: 1.3; }

.hwh-step2 { display: flex; flex-direction: column; gap: 10px; }
.hwh-step2[hidden] { display: none; }

.hwh-acts {
    max-height: 210px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 2px;
}

.hwh-act {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--h-border);
    border-radius: 11px;
    background: var(--h-surface);
    color: var(--h-text);
    font: inherit;
    font-size: 0.9rem;
    text-align: start;
    cursor: pointer;
}

.hwh-act span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hwh-act small { color: var(--h-muted); font-size: 0.74rem; }
.hwh-act i { color: var(--h-muted); }
.hwh-act:hover { background: var(--h-raised); }
.hwh-act.is-picked { border-color: var(--h-accent); background: color-mix(in srgb, var(--h-accent) 12%, var(--h-surface)); }
.hwh-act.is-picked i { color: var(--h-accent); }

.hwh-grid2 { display: grid; grid-template-columns: 1.4fr 1.2fr 0.9fr; gap: 10px; }

.hwh-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 12px;
    text-align: center;
    color: var(--h-muted);
    font-size: 0.84rem;
}

.hwh-empty i { font-size: 1.3rem; opacity: 0.8; }
.hwh-empty b { color: var(--h-text); }
.hwh-empty--ok i { color: var(--h-ok); }
.hwh-empty--big { padding: 40px 16px; }
.hwh-empty--big i { font-size: 2.2rem; }

/* Teacher detail: share & settings */
.hwh-share {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 270px);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
}

.hwh-qr {
    width: 128px;
    height: 128px;
    padding: 8px;
    border: none;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.4rem;
    cursor: zoom-in;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.hwh-qr img, .hwh-qr canvas { display: block; width: 112px !important; height: 112px !important; }
.hwh-share-main { min-width: 0; display: flex; flex-direction: column; gap: 10px; }

.hwh-code {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, var(--t) 35%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--t) 10%, transparent);
    color: var(--h-text);
    font: inherit;
    cursor: zoom-in;
    text-align: start;
}

.hwh-code span { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--h-muted); }
.hwh-code b { font-size: 1.7rem; font-weight: 900; letter-spacing: 0.22em; color: var(--t); line-height: 1.1; }

.hwh-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 12px;
    border: 1px solid var(--h-border);
    border-radius: 12px;
    background: var(--h-bg);
}

.hwh-link input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--h-muted);
    font: inherit;
    font-size: 0.78rem;
    outline: none;
    text-overflow: ellipsis;
}

.hwh-btn--sm { min-height: 32px; padding: 0 12px; font-size: 0.78rem; border-radius: 9px; }

.hwh-settings { display: flex; flex-direction: column; gap: 8px; }

.hwh-set {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin: 0;
}

.hwh-set > span { font-size: 0.76rem; font-weight: 700; color: var(--h-muted); white-space: nowrap; }
.hwh-set > span i { width: 14px; margin-inline-end: 4px; color: var(--t); }
.hwh-set .hwh-input { width: 100%; min-width: 0; min-height: 36px; font-size: 0.8rem; padding: 0 8px; }

.hwh-switch {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px 0 4px;
    border: 1px solid var(--h-border);
    border-radius: 999px;
    background: var(--h-surface);
    color: var(--h-muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.hwh-switch i {
    position: relative;
    width: 40px;
    height: 26px;
    border-radius: 999px;
    background: var(--h-raised);
    transition: background 0.2s;
}

.hwh-switch i::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hwh-switch em { font-style: normal; }
.hwh-switch.is-on { color: var(--h-ok); border-color: color-mix(in srgb, var(--h-ok) 40%, transparent); }
.hwh-switch.is-on i { background: var(--h-ok); }
.hwh-switch.is-on i::after { transform: translateX(14px); }

.hwh-foot-note--sync { flex: 0 1 auto; display: inline-flex; align-items: center; gap: 6px; }
.hwh-foot-note--sync i { color: var(--h-ok); }

/* Big code + QR for the classroom screen */
.hwh-big {
    position: fixed;
    inset: 0;
    z-index: 1000006;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: rgba(5, 8, 16, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    cursor: zoom-out;
}

.hwh-big-qr { padding: 16px; border-radius: 22px; background: #fff; }
.hwh-big-qr img, .hwh-big-qr canvas { display: block; }
.hwh-big-code { font-size: clamp(3rem, 12vw, 9rem); font-weight: 900; letter-spacing: 0.18em; line-height: 1; }
.hwh-big-hint { font-size: 1rem; opacity: 0.6; text-align: center; padding: 0 16px; }

/* Teacher detail: stats */
.hwh-stats { display: grid; grid-template-columns: auto repeat(4, 1fr); gap: 10px; align-items: stretch; }

.hwh-ring { position: relative; width: 96px; height: 96px; }
.hwh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hwh-ring circle { fill: none; stroke-width: 3.4; }
.hwh-ring .bg { stroke: var(--h-raised); }
.hwh-ring .fg { stroke: var(--h-ok); stroke-linecap: round; transition: stroke-dasharray 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.hwh-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hwh-ring-txt b { font-size: 1.15rem; font-weight: 900; }
.hwh-ring-txt span { font-size: 0.68rem; color: var(--h-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.hwh-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
}

.hwh-stat b { font-size: 1.35rem; font-weight: 900; line-height: 1.1; }
.hwh-stat span { font-size: 0.72rem; color: var(--h-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.hwh-stat--ok b { color: var(--h-ok); }
.hwh-stat--wait b { color: var(--h-amber); }
.hwh-stat--due b { font-size: 1.05rem; }
.hwh-stat.is-over b { color: var(--h-danger); }

.hwh-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex-shrink: 0; }
.hwh-stats, .hwh-others, .hwh-types, .hwh-step2 { flex-shrink: 0; }

.hwh-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 16px;
    border: 1px solid var(--h-border);
    background: var(--h-surface);
    overflow: hidden;
}

.hwh-col-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    font-weight: 800;
    font-size: 0.86rem;
    border-bottom: 1px solid var(--h-border);
}

.hwh-col-head span { margin-inline-start: auto; padding: 1px 9px; border-radius: 999px; background: var(--h-raised); font-size: 0.76rem; }
.hwh-col--ok .hwh-col-head { color: var(--h-ok); background: color-mix(in srgb, var(--h-ok) 8%, transparent); }
.hwh-col--wait .hwh-col-head { color: var(--h-amber); background: color-mix(in srgb, var(--h-amber) 8%, transparent); }

.hwh-list { max-height: 340px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; }

.hwh-stu {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 4px 6px;
    border-radius: 10px;
}

.hwh-stu:hover { background: var(--h-raised); }

.hwh-av {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    background: var(--h-raised);
    color: var(--h-muted);
}

.hwh-col--ok .hwh-av { background: color-mix(in srgb, var(--h-ok) 18%, transparent); color: var(--h-ok); }

.hwh-stu-name { flex: 1; min-width: 0; font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hwh-stu-name small { margin-inline-start: 6px; color: var(--h-muted); font-weight: 500; font-size: 0.72rem; }

.hwh-score {
    --s: var(--h-ok);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--s);
    background: color-mix(in srgb, var(--s) 15%, transparent);
}

.hwh-score--pending { --s: var(--h-amber); }

.hwh-mini {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--h-muted);
    cursor: pointer;
    opacity: 0.5;
}

.hwh-stu:hover .hwh-mini { opacity: 1; }
.hwh-mini:hover { background: color-mix(in srgb, var(--h-amber) 16%, transparent); color: var(--h-amber); }

.hwh-others { font-size: 0.78rem; color: var(--h-muted); padding: 10px 12px; border-radius: 12px; background: var(--h-surface); border: 1px dashed var(--h-border); }
.hwh-others[hidden] { display: none; }

/* Popup menu */
.hwh-pop {
    position: fixed;
    z-index: 1000005;
    min-width: 190px;
    padding: 6px;
    border-radius: 14px;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
    box-shadow: var(--h-shadow);
    display: flex;
    flex-direction: column;
}

.hwh-pop button {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: var(--h-text);
    font: inherit;
    font-size: 0.88rem;
    text-align: start;
    cursor: pointer;
}

.hwh-pop button i { width: 16px; color: var(--h-muted); }
.hwh-pop button:hover { background: var(--h-raised); }
.hwh-pop button.danger, .hwh-pop button.danger i { color: var(--h-danger); }

/* ── Student: floating button, toasts, panel ─────────────────────────────── */

.hwh-fab {
    position: fixed;
    z-index: 1000000;
    left: max(16px, env(safe-area-inset-left));
    bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px); /* clear of the bottom toolbar */
    height: 52px;
    padding: 0 18px 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #6d6afe, #8b5cf6);
    color: #fff;
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(109, 106, 254, 0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}

.hwh-fab:hover { transform: translateY(-2px); }
.hwh-fab:active { transform: scale(0.96); }
.hwh-fab i { font-size: 1.1rem; }
.hwh-fab.all-done { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 12px 30px rgba(16, 185, 129, 0.4); }

.hwh-fab-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: #fff;
    color: #6d28d9;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hwh-fab.has-new { animation: hwhRing 1.6s ease-in-out infinite; }
.hwh-fab.has-new .hwh-fab-badge { background: #ef4444; color: #fff; }

@keyframes hwhRing {
    0%, 100% { box-shadow: 0 12px 30px rgba(109, 106, 254, 0.45), 0 0 0 0 rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 12px 30px rgba(109, 106, 254, 0.45), 0 0 0 10px rgba(239, 68, 68, 0); }
}

.hwh-toasts {
    position: fixed;
    z-index: 1000004;
    left: 50%;
    top: max(16px, env(safe-area-inset-top));
    transform: translateX(-50%);
    width: min(440px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.hwh-toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--h-surface);
    color: var(--h-text);
    border: 1px solid var(--h-border);
    box-shadow: var(--h-shadow);
    cursor: pointer;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.25s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.hwh-toast.show { opacity: 1; transform: none; }

.hwh-toast-ic {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--h-accent);
}

.hwh-toast--new .hwh-toast-ic i { animation: hwhBell 1s ease-in-out 2; }
.hwh-toast--done .hwh-toast-ic { background: var(--h-ok); }
.hwh-toast-txt { flex: 1; min-width: 0; font-weight: 700; font-size: 0.9rem; }
.hwh-toast-go { font-size: 0.8rem; font-weight: 800; color: var(--h-accent); }

@keyframes hwhBell {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(18deg); }
    40% { transform: rotate(-14deg); }
    60% { transform: rotate(8deg); }
}

.hwh-tabs {
    display: flex;
    gap: 6px;
    margin: 12px 20px 0;
    padding: 4px;
    border-radius: 14px;
    background: var(--h-surface);
    border: 1px solid var(--h-border);
}

.hwh-tabs button {
    flex: 1;
    min-height: 40px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--h-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
}

.hwh-tabs button b { margin-inline-start: 4px; padding: 1px 8px; border-radius: 999px; background: var(--h-raised); font-size: 0.76rem; }
.hwh-tabs button.is-on { background: var(--h-accent); color: #fff; }
.hwh-tabs button.is-on b { background: rgba(255, 255, 255, 0.22); }

.hwh-cards { gap: 10px; }

.hwh-card {
    --t: var(--h-accent);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border: 1px solid var(--h-border);
    border-radius: 18px;
    background: var(--h-surface);
    color: var(--h-text);
    font: inherit;
    text-align: start;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}

.hwh-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--t) 50%, transparent); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15); }

.hwh-card-ic {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: color-mix(in srgb, var(--t) 18%, transparent);
    color: var(--t);
}

.hwh-card-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hwh-card-title { font-size: 1rem; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.hwh-card-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.78rem; color: var(--h-muted); }
.hwh-card-meta .ok { color: var(--h-ok); font-weight: 700; }
.hwh-card-meta .tone-amber { color: var(--h-amber); font-weight: 700; }
.hwh-card-meta .tone-danger { color: var(--h-danger); font-weight: 700; }

.hwh-card-go {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--t);
    color: #fff;
    font-weight: 800;
    font-size: 0.86rem;
}

.hwh-card-go--off { background: var(--h-raised); color: var(--h-danger); }

.hwh-card-score {
    flex-shrink: 0;
    min-width: 54px;
    height: 54px;
    padding: 0 8px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.05rem;
    background: var(--h-ok);
    color: #fff;
}

.hwh-card-score--pending { background: color-mix(in srgb, var(--h-ok) 20%, transparent); color: var(--h-ok); }

.hwh-card.is-done,
.hwh-card.is-pending {
    --t: var(--h-ok);
    background: color-mix(in srgb, var(--h-ok) 7%, var(--h-surface));
    border-color: color-mix(in srgb, var(--h-ok) 30%, transparent);
}

.hwh-card.is-done .hwh-card-ic,
.hwh-card.is-pending .hwh-card-ic { background: var(--h-ok); color: #fff; }
.hwh-card.is-missed { opacity: 0.65; }

.hwh-card .lf-new {
    display: inline-block;
    margin-inline-start: 8px;
    padding: 1px 7px;
    border-radius: 6px;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    vertical-align: 3px;
}

/* ── Phones ──────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .hwh-overlay { padding: 0; align-items: flex-end; }
    .hwh-sheet { max-height: calc(var(--app-vh, 100vh) - 24px); border-radius: 22px 22px 0 0; }
    .hwh-types { grid-template-columns: 1fr; }
    .hwh-type { flex-direction: row; align-items: center; }
    .hwh-type-desc { display: none; }
    .hwh-grid2 { grid-template-columns: 1fr 1fr; }
    .hwh-grid2 label:first-child { grid-column: 1 / -1; }
    .hwh-share { grid-template-columns: auto 1fr; }
    .hwh-settings { grid-column: 1 / -1; }
    .hwh-qr { width: 96px; height: 96px; }
    .hwh-qr img, .hwh-qr canvas { width: 80px !important; height: 80px !important; }
    .hwh-code b { font-size: 1.35rem; }
    .hwh-foot-note--sync { display: none; }
    .hwh-stats { grid-template-columns: repeat(2, 1fr); }
    .hwh-ring { grid-column: 1 / -1; justify-self: center; }
    .hwh-cols { grid-template-columns: 1fr; }
    .hwh-list { max-height: none; }
    .hwh-foot .hwh-btn--primary { flex: 1 1 100%; }
    .hwh-fab span { display: none; }
    .hwh-fab { padding: 0 14px; }
}

/* Interactive HTML lessons (js/tools/HtmlLesson.js) */
.hlx-overlay { position: fixed; inset: 0; z-index: 19990; display: flex; flex-direction: column; background: #0f1f14; }
.hlx-bar { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .15); }
.hlx-ic { width: 38px; height: 38px; border-radius: 12px; background: #14b8a6; color: #fff; display: grid; place-items: center; font-size: 18px; flex: none; }
.hlx-title { flex: 1; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1e293b; }
.hlx-score { background: #ecfdf5; color: #047857; font-weight: 700; border-radius: 99px; padding: 6px 14px; white-space: nowrap; }
.hlx-btn { border: 0; background: #f1f5f9; color: #334155; border-radius: 12px; padding: 9px 14px; font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.hlx-btn:hover { background: #e2e8f0; }
.hlx-close { width: 42px; justify-content: center; font-size: 18px; }
.hlx-stage { flex: 1; min-height: 0; display: flex; }
.hlx-frame { flex: 1; width: 100%; height: 100%; border: 0; background: #dfeee2; }
.hlx-loading { margin: auto; color: #e2f5e7; font-size: 20px; display: flex; gap: 10px; align-items: center; }
.hlx-results { position: fixed; inset: 0; z-index: 19995; background: rgba(15, 23, 42, .5); display: grid; place-items: center; padding: 16px; }
.hlx-res-card { background: #fff; border-radius: 20px; padding: 18px 22px; width: min(560px, 100%); max-height: 80vh; overflow: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.hlx-res-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 18px; }
.hlx-res-card table { width: 100%; border-collapse: collapse; }
.hlx-res-card th, .hlx-res-card td { text-align: start; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
.hlx-res-card th { color: #64748b; font-weight: 600; font-size: 14px; }
.hlx-empty { color: #64748b; text-align: center; padding: 20px 0; }
/* Library: "Interactive" button beside New Lesson / Import PDF / Add with AI (NavigationManager) */
html body #onenote-nav.lib-drawer #btn-nav-html-lesson { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
/* ✨ AI in the interactive lesson player: the board's AI selection colours */
.hlx-btn.hlx-ai { background: linear-gradient(135deg, #8b7bff, #5b4dff); color: #fff; border-color: transparent; }
.hlx-btn.hlx-ai:hover { filter: brightness(1.08); }
/* The player sits above the app's own bars (≤ 19k) and below every window opened from it: AI menu 99999, Match Mind
   20000+, Sketch Solve 25000+, games / polls 99000, Graph Studio 100001+, lobbies 400000, simulations and messages higher. */

/* While an interactive lesson plays (body.hlx-on, HtmlLesson.js): the clock notch hangs just under the player bar,
   and the bottom bar keeps only the classroom tools — stickers, rewards, games, creators, timer, noise, groups, score, spinner. */
body.hlx-on #presence-notch.presence-notch { z-index: 19992 !important; top: 0 !important; }
/* The clock sits in the middle of the player bar: the bar is three columns — title | the clock's width (--hlx-notch-w,
   set by HtmlLesson.js) | buttons — so nothing runs under it. Buttons are compact, and icon-only (.hlx-compact) when the words don't fit. */
.hlx-left { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.hlx-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.hlx-gap { display: none; }
body.hlx-on .hlx-bar { display: grid; grid-template-columns: minmax(0, 1fr) var(--hlx-notch-w, 0px) minmax(0, 1fr); gap: 0; }
body.hlx-on .hlx-gap { display: block; }
body.hlx-on .hlx-left { padding-inline-end: 8px; }
body.hlx-on .hlx-right { justify-content: flex-end; padding-inline-start: 8px; overflow: hidden; }
body.hlx-on .hlx-title { font-size: 16px; }
body.hlx-on .hlx-btn { padding: 7px 11px; font-size: 13.5px; border-radius: 10px; gap: 5px; flex: none; white-space: nowrap; }
body.hlx-on .hlx-close { width: 36px; padding: 7px 0; font-size: 16px; }
.hlx-overlay.hlx-compact .hlx-btn > span { display: none; }
.hlx-overlay.hlx-compact .hlx-btn { padding: 8px 10px; }
body.hlx-on #pinnedBottomBar .pinned-tools-container > :not(#pinned-sticker-group, #pinned-tool-cr-star, #pinned-tool-cr-thumbs, #pinned-tool-cr-tryagain, #pinned-tool-cr-curtain, #pinned-tool-cr-traffic, #pinned-tool-cr-shh, #pinned-tool-cr-games, #pinned-docs-slides-group, #pinned-tool-cr-timer, #pinned-tool-cr-noise, #pinned-tool-cr-group, #pinned-tool-cr-score, #pinned-tool-cr-spin, #pinned-tool-math-casio, .divider:has(+ #pinned-tool-cr-timer), .divider:has(+ #pinned-tool-math-casio)),
body.hlx-on #pinnedBottomBar #pinned-slide-nav { display: none !important; }
/* Minimise (the bar's own button) + the tab that brings it back, both above the lesson */
body.hlx-on #pinnedBottomBar .pinned-actions { margin-left: 4px; padding-left: 8px; }
body.hlx-on #btn-expand-pinned-bar { z-index: 20001; }
/* Grip to move the bar (HtmlLesson.js BarDock); it snaps to the nearest edge and stands upright at the sides */
.hlx-grip { display: none; }
body.hlx-on #pinnedBottomBar .hlx-grip { display: flex; cursor: grab; touch-action: none; opacity: .6; margin-right: -4px; }
body.hlx-on #pinnedBottomBar .hlx-grip:hover { opacity: 1; }
body.hlx-on #pinnedBottomBar { touch-action: none; }
body.hlx-on #pinnedBottomBar.hlx-dragging { cursor: grabbing; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); will-change: transform; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; transition: none !important; animation: none !important; }
body.hlx-bar-dragging .hlx-frame { pointer-events: none; }
body.hlx-bar-dragging, body.hlx-bar-dragging * { user-select: none !important; -webkit-user-select: none !important; }
body.hlx-on #pinnedBottomBar.hlx-dragging .hlx-grip { cursor: grabbing; }
body.hlx-on #pinnedBottomBar.hlx-moved.collapsed { opacity: 0; pointer-events: none; }
body.hlx-on #pinnedBottomBar.hlx-vert { flex-direction: column; padding: 10px 6px; gap: 6px; }
body.hlx-on #pinnedBottomBar.hlx-vert { max-width: none !important; overflow: visible !important; }
body.hlx-on #pinnedBottomBar.hlx-vert .pinned-tools-container { flex-direction: column; gap: 4px; flex: none !important; overflow: visible !important; }
body.hlx-on #pinnedBottomBar.hlx-vert .hlx-grip { margin: 0 0 -2px; transform: rotate(90deg); }
body.hlx-on #pinnedBottomBar.hlx-vert .pinned-tools-container > .divider { width: 20px !important; height: 1px !important; margin: 4px 0 !important; }
body.hlx-on #pinnedBottomBar.hlx-vert .pinned-actions { flex-direction: column; margin: 2px 0 0; padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--border-glass); }
body.hlx-on #pinnedBottomBar.hlx-vert .pinned-collapse-btn i { transform: rotate(var(--hlx-collapse-rot, 90deg)); }
body.hlx-on #pinnedBottomBar.hlx-vert .group-caret { display: none; }
/* Upright bar: its pop-ups open sideways, into the screen */
body.hlx-on #pinnedBottomBar.hlx-vert #sticker-dropup.sticker-dropup { bottom: auto !important; top: 50% !important; left: calc(100% + 14px) !important; right: auto !important; transform: translateY(-50%) !important; }
body.hlx-on #pinnedBottomBar.hlx-vert.hlx-right-edge #sticker-dropup.sticker-dropup { left: auto !important; right: calc(100% + 14px) !important; }
/* Bar at the top edge: the sticker pop-up opens downwards */
body.hlx-on #pinnedBottomBar.hlx-top-edge #sticker-dropup.sticker-dropup { bottom: auto !important; top: calc(100% + 14px) !important; }
/* The scientific calculator (bar button) opens above the lesson */
body.hlx-on .cas-win { z-index: 19996 !important; }
/* Menus placed beside a moved bar (BarDock.placeMenus) lose the little pointer arrow */
body.hlx-on .pinned-tool-dropdown.hlx-side-menu::after { display: none; }

/* ═══════════ Nov 17 2026: homework after a class activity, tracking polish, class analysis ═══════════ */
.hwh-overlay--top, #hwh-detail { z-index: 2147482000; }
.hwh-span2 { grid-column: 1 / -1; }
.hwh-label i { margin-inline-end: 4px; opacity: 0.7; }

/* "Set this as homework?" card, floats over every activity's results screen */
.hwh-offer {
    position: fixed; left: 50%; bottom: 24px; z-index: 2147481000;
    transform: translate(-50%, 30px); opacity: 0;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s;
    display: flex; align-items: center; gap: 12px;
    width: min(560px, calc(100vw - 32px)); padding: 12px 12px 12px 14px;
    background: #111827; color: #f1f5f9; border: 1px solid color-mix(in srgb, var(--t, #f59e0b) 55%, transparent);
    border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
}
.hwh-offer.show { transform: translate(-50%, 0); opacity: 1; }
.hwh-offer-ic { width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--t, #f59e0b) 22%, transparent); color: var(--t, #f59e0b); font-size: 1.15rem; }
.hwh-offer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hwh-offer-main b { font-size: 0.98rem; font-weight: 800; }
.hwh-offer-main small { font-size: 0.78rem; color: #94a3b8; }
.hwh-offer-yes { border: 0; border-radius: 12px; padding: 10px 14px; background: var(--t, #f59e0b); color: #fff; font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; }
.hwh-offer-yes:hover { filter: brightness(1.08); }
.hwh-offer-no { border: 0; background: transparent; color: #94a3b8; width: 34px; height: 34px; border-radius: 10px; cursor: pointer; flex-shrink: 0; }
.hwh-offer-no:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
@media (max-width: 520px) {
    .hwh-offer { flex-wrap: wrap; bottom: 12px; }
    .hwh-offer-yes { flex: 1; }
}

/* Set-as-homework window */
.hwh-after-lead { margin: 0; font-size: 0.88rem; color: var(--h-muted); line-height: 1.45; }
.hwh-after-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex-shrink: 0; }
.hwh-after-col { background: var(--h-surface); border: 1px solid var(--h-border); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.hwh-after-col .hwh-col-head span { margin-inline-start: auto; }
.hwh-after-col--ok .hwh-col-head { color: var(--h-ok); }
.hwh-after-col--wait .hwh-col-head { color: var(--h-amber); }
.hwh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 120px; overflow-y: auto; }
.hwh-chip { font-size: 0.78rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--h-raised); border: 1px solid var(--h-border); }
.hwh-chip.is-ok { background: color-mix(in srgb, var(--h-ok) 14%, transparent); border-color: color-mix(in srgb, var(--h-ok) 35%, transparent); }
.hwh-chip em { font-style: normal; opacity: 0.75; font-weight: 800; }
.hwh-muted { font-size: 0.8rem; color: var(--h-muted); }
@media (max-width: 560px) { .hwh-after-cols { grid-template-columns: 1fr; } }

/* tracking view */
.hwh-copy-names { margin-inline-start: auto; width: auto !important; padding: 0 8px; gap: 5px; font-size: 0.72rem; font-weight: 800; display: inline-flex; align-items: center; }
.hwh-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.66rem; font-weight: 800; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.hwh-tag--class { background: color-mix(in srgb, #0ea5e9 16%, transparent); color: #0ea5e9; }
.hwh-tag--late { background: color-mix(in srgb, #ef4444 15%, transparent); color: #ef4444; }

/* library: homework that lives in a lesson folder, listed in Assignments & Homeworks */
.lib-row-folder { display: inline-flex; align-items: center; gap: 4px; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.85; }
.lib-hwa-banner { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 10px; padding: 12px 14px; border-radius: 14px; border: 1px dashed color-mix(in srgb, #f59e0b 55%, transparent); background: color-mix(in srgb, #f59e0b 9%, transparent); color: inherit; font: inherit; text-align: start; cursor: pointer; }
.lib-hwa-banner:hover { background: color-mix(in srgb, #f59e0b 15%, transparent); }
.lib-hwa-banner > i { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: #f59e0b; color: #fff; }
.lib-hwa-banner span { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lib-hwa-banner b { font-weight: 800; font-size: 0.92rem; }
.lib-hwa-banner small { opacity: 0.7; font-size: 0.76rem; }

/* class analysis */
.hwa-sheet { max-width: min(1280px, calc(100vw - 32px)); width: 100%; height: min(90vh, calc(var(--app-vh, 100vh) - 32px)); }
.hwa-body { gap: 12px; min-height: 0; }
.hwa-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; flex-shrink: 0; }
.hwa-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex-shrink: 0; }
.hwa-search { width: 200px; }
.hwa-sort { width: auto; }
.hwa-seg { display: inline-flex; border: 1px solid var(--h-border); border-radius: 12px; overflow: hidden; background: var(--h-surface); }
.hwa-seg button { border: 0; background: transparent; color: var(--h-muted); font: inherit; font-size: 0.8rem; font-weight: 800; padding: 8px 11px; cursor: pointer; }
.hwa-seg button.is-on { background: var(--h-accent); color: #fff; }
.hwa-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.74rem; color: var(--h-muted); font-weight: 700; flex-shrink: 0; }
.hwa-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hwa-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.hwa-dot--ok { background: #10b981; } .hwa-dot--class { background: #0ea5e9; } .hwa-dot--pending { background: #8b5cf6; }
.hwa-dot--todo { background: var(--h-raised); border: 1px solid var(--h-border); } .hwa-dot--missed { background: #ef4444; }
.hwa-scroll { flex: 1; min-height: 160px; overflow: auto; border: 1px solid var(--h-border); border-radius: 14px; background: var(--h-surface); }
.hwa-table { border-collapse: separate; border-spacing: 0; font-size: 0.82rem; min-width: 100%; }
.hwa-table th, .hwa-table td { border-bottom: 1px solid var(--h-border); padding: 7px 8px; text-align: center; white-space: nowrap; }
.hwa-table thead th { position: sticky; top: 0; z-index: 2; background: var(--h-raised); vertical-align: bottom; }
.hwa-table tfoot td, .hwa-table tfoot th { position: sticky; bottom: 0; background: var(--h-raised); z-index: 2; font-weight: 800; }
.hwa-table .hwa-name { position: sticky; left: 0; z-index: 1; background: var(--h-surface); text-align: start; min-width: 170px; max-width: 220px; }
.hwa-table thead .hwa-name, .hwa-table tfoot .hwa-name { z-index: 3; background: var(--h-raised); }
.hwa-table tbody .hwa-name span { display: block; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.hwa-table tbody .hwa-name small { display: block; font-size: 0.7rem; color: var(--h-muted); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.hwa-table tbody tr:hover td, .hwa-table tbody tr:hover th { background: color-mix(in srgb, var(--h-accent) 7%, var(--h-surface)); }
.hwa-sum { font-weight: 700; color: var(--h-muted); }
.hwa-sum b { color: var(--h-text); }
.hwa-sum.is-bad { color: #ef4444; font-weight: 900; }
.hwa-hw { cursor: pointer; min-width: 92px; max-width: 130px; }
.hwa-hw:hover { background: color-mix(in srgb, var(--t) 14%, var(--h-raised)) !important; }
.hwa-hw > span { display: block; }
.hwa-hw-ic { color: var(--t); font-size: 0.9rem; }
.hwa-hw-title { font-weight: 800; white-space: normal; line-height: 1.2; max-height: 2.4em; overflow: hidden; margin: 3px 0; }
.hwa-hw-due { font-size: 0.68rem; color: var(--h-muted); font-weight: 700; }
.hwa-hw-due.is-over { color: #ef4444; }
.hwa-c { font-weight: 800; }
.hwa-c sup { font-size: 0.58rem; color: #ef4444; margin-inline-start: 2px; text-transform: uppercase; }
.hwa-c--ok { background: color-mix(in srgb, #10b981 16%, transparent); color: #059669; }
.hwa-c--ok.is-mid { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
.hwa-c--ok.is-low { background: color-mix(in srgb, #ef4444 15%, transparent); color: #dc2626; }
.hwa-c--class { background: color-mix(in srgb, #0ea5e9 16%, transparent); color: #0284c7; }
.hwa-c--pending { background: color-mix(in srgb, #8b5cf6 15%, transparent); color: #7c3aed; }
.hwa-c--missed { background: color-mix(in srgb, #ef4444 20%, transparent); color: #dc2626; }
.hwa-c--todo { color: var(--h-muted); }
.hwa-foot small { display: block; font-size: 0.66rem; color: var(--h-muted); font-weight: 700; }
.hwa-none { padding: 30px !important; color: var(--h-muted); }
@media (max-width: 760px) {
    .hwa-sheet { max-width: 100%; height: calc(var(--app-vh, 100vh) - 16px); border-radius: 16px; }
    .hwa-stats { grid-template-columns: repeat(2, 1fr); }
    .hwa-search { width: 100%; }
    .hwa-table .hwa-name { min-width: 120px; max-width: 140px; }
    .hwh-types { grid-template-columns: 1fr 1fr; }
}

/* ═══════════ Nov 17 2026: Interactive activity (AI homework made from a lesson) — InteractiveActivity.js ═══════════ */
.hwh-type { position: relative; }
.hwh-type--ai { border-color: color-mix(in srgb, var(--t) 45%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--t) 12%, var(--h-surface)), var(--h-surface)); }
.hwh-type-new { position: absolute; top: 10px; inset-inline-end: 10px; font-size: 0.62rem; font-weight: 900; letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; background: var(--t); color: #fff; }
.hwh-gone { display: none !important; }
.hwh-share--play > .hwh-qr, .hwh-share--play > .hwh-share-main { display: none; }
.hwh-play { width: 112px; height: 112px; border: 0; border-radius: 18px; cursor: pointer; display: grid; place-items: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg, #14b8a6, #0ea5e9); box-shadow: 0 10px 24px rgba(20, 184, 166, 0.35); transition: transform 0.2s; }
.hwh-play:hover { transform: scale(1.04); }
.hwh-play-info { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.hwh-play-info b { font-size: 1rem; font-weight: 800; }
.hwh-play-info span { font-size: 0.8rem; color: var(--h-muted); line-height: 1.4; }

.iax-sheet { max-width: 820px; --t: #14b8a6; }
.iax-sheet.is-wide { max-width: min(1180px, calc(100vw - 32px)); }
.iax-ic { background: linear-gradient(135deg, #14b8a6, #6366f1) !important; color: #fff !important; }
.iax-steps { display: flex; gap: 5px; margin-inline-end: 6px; }
.iax-steps i { width: 22px; height: 5px; border-radius: 3px; background: var(--h-border); transition: background 0.25s; }
.iax-steps i.is-on { background: #14b8a6; }
.iax-body { gap: 14px; }
.iax-field { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.iax-block { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.iax-block-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.iax-again { width: auto !important; padding: 0 9px; gap: 5px; font-size: 0.72rem; font-weight: 800; display: inline-flex; align-items: center; }
.iax-again[hidden] { display: none; }
.iax-own { resize: vertical; min-height: 64px; font: inherit; line-height: 1.4; }
.iax-topics { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.iax-topic { display: flex; align-items: flex-start; gap: 10px; text-align: start; padding: 11px 12px; border-radius: 14px; border: 1.5px solid var(--h-border); background: var(--h-surface); color: inherit; font: inherit; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.15s; }
.iax-topic:hover { transform: translateY(-1px); border-color: color-mix(in srgb, #14b8a6 50%, transparent); }
.iax-topic.is-on { border-color: #14b8a6; background: color-mix(in srgb, #14b8a6 9%, var(--h-surface)); }
.iax-check { width: 22px; height: 22px; flex-shrink: 0; border-radius: 7px; border: 2px solid var(--h-border); display: grid; place-items: center; font-size: 0.7rem; color: transparent; margin-top: 1px; }
.iax-topic.is-on .iax-check { background: #14b8a6; border-color: #14b8a6; color: #fff; }
.iax-topic-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.iax-topic-main b { font-size: 0.92rem; font-weight: 800; }
.iax-topic-main small { font-size: 0.78rem; color: var(--h-muted); line-height: 1.35; }
.iax-topic-main ul { margin: 4px 0 0; padding-inline-start: 16px; font-size: 0.76rem; color: var(--h-muted); line-height: 1.4; }
.iax-topic-main li { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.iax-hint { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--h-border); font-size: 0.84rem; color: var(--h-muted); }
.iax-hint--warn { color: #d97706; border-color: color-mix(in srgb, #f59e0b 50%, transparent); }
.iax-hint .hwh-mini { width: auto; padding: 0 9px; gap: 5px; font-size: 0.72rem; font-weight: 800; display: inline-flex; align-items: center; }
.iax-skel { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.iax-skel i { height: 64px; border-radius: 14px; background: linear-gradient(90deg, var(--h-surface), var(--h-raised), var(--h-surface)); background-size: 200% 100%; animation: iaxShimmer 1.3s linear infinite; }
.iax-skel i:nth-child(3) { display: none; }
@keyframes iaxShimmer { to { background-position: -200% 0; } }
.iax-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 14px; flex-shrink: 0; }
.iax-opts > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.iax-seg { display: flex; border: 1px solid var(--h-border); border-radius: 12px; overflow: hidden; background: var(--h-surface); }
.iax-seg button { flex: 1; border: 0; background: transparent; color: var(--h-muted); font: inherit; font-size: 0.8rem; font-weight: 800; padding: 8px 6px; cursor: pointer; white-space: nowrap; }
.iax-seg button.is-on { background: #14b8a6; color: #fff; }
.iax-games { display: flex; flex-wrap: wrap; gap: 7px; }
.iax-game { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; border: 1.5px solid var(--h-border); background: var(--h-surface); color: var(--h-muted); font: inherit; font-size: 0.78rem; font-weight: 800; cursor: pointer; opacity: 0.65; }
.iax-game.is-on { opacity: 1; color: var(--h-text); border-color: color-mix(in srgb, #14b8a6 60%, transparent); background: color-mix(in srgb, #14b8a6 10%, var(--h-surface)); }
.iax-game.is-on i { color: #14b8a6; }
.iax-loader { flex: 1; min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.iax-loader b { font-size: 1.15rem; font-weight: 800; }
.iax-loader span { color: var(--h-muted); font-size: 0.9rem; min-height: 1.3em; }
.iax-loader small { color: var(--h-muted); opacity: 0.75; font-size: 0.76rem; }
.iax-orb { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-size: 1.9rem; color: #fff; background: linear-gradient(135deg, #14b8a6, #6366f1); animation: iaxPulse 1.6s ease-in-out infinite; margin-bottom: 8px; }
@keyframes iaxPulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.45); } 50% { transform: scale(1.06); box-shadow: 0 0 0 18px rgba(20, 184, 166, 0); } }
.iax-preview { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.iax-frame { aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; border: 1px solid var(--h-border); background: #0b1220; }
.iax-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.iax-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.iax-made { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: #0d9488; background: color-mix(in srgb, #14b8a6 12%, transparent); padding: 9px 12px; border-radius: 12px; font-size: 0.9rem; }
.iax-note { margin: 0; font-size: 0.78rem; color: var(--h-muted); line-height: 1.45; }
@media (max-width: 820px) {
    .iax-preview { grid-template-columns: 1fr; }
    .iax-topics, .iax-skel { grid-template-columns: 1fr; }
    .iax-steps { display: none; }
}
@media (prefers-reduced-motion: reduce) { .iax-orb, .iax-skel i { animation: none; } }

.iax-step { display: flex; align-items: stretch; border: 1px solid var(--h-border); border-radius: 12px; overflow: hidden; background: var(--h-surface); }
.iax-step button { width: 44px; border: 0; background: transparent; color: var(--h-text); font-size: 0.85rem; cursor: pointer; flex-shrink: 0; }
.iax-step button:hover { background: color-mix(in srgb, #14b8a6 14%, transparent); color: #0d9488; }
.iax-step input { flex: 1; min-width: 0; border: 0 !important; border-inline: 1px solid var(--h-border) !important; border-radius: 0 !important; text-align: center; font-weight: 800; font-size: 0.95rem; padding: 7px 4px; -moz-appearance: textfield; appearance: textfield; background: transparent; }
.iax-step input::-webkit-outer-spin-button, .iax-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Interactive activity: colour themes + styles */
.iax-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.iax-theme { display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1.5px solid var(--h-border); background: var(--h-surface); color: var(--h-muted); font: inherit; font-size: 0.74rem; font-weight: 800; cursor: pointer; text-align: start; min-width: 0; }
.iax-theme em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iax-theme.is-on { border-color: #14b8a6; color: var(--h-text); box-shadow: 0 0 0 3px color-mix(in srgb, #14b8a6 22%, transparent); }
.iax-sw { position: relative; width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; }
.iax-sw i { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--h-surface); }
.iax-themes--mini { display: flex; flex-wrap: wrap; gap: 6px; }
.iax-themes--mini .iax-theme { padding: 4px; border-radius: 11px; }
.iax-themes--mini .iax-sw { width: 26px; height: 26px; }
.iax-styles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.iax-style { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 14px; border: 1.5px solid var(--h-border); background: var(--h-surface); color: inherit; font: inherit; cursor: pointer; text-align: start; min-width: 0; }
.iax-style.is-on { border-color: #14b8a6; background: color-mix(in srgb, #14b8a6 9%, var(--h-surface)); }
.iax-style-ic { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; background: var(--h-raised); color: var(--h-muted); }
.iax-style.is-on .iax-style-ic { background: #14b8a6; color: #fff; }
.iax-style b { display: block; font-size: 0.84rem; font-weight: 800; }
.iax-style small { display: block; font-size: 0.72rem; color: var(--h-muted); line-height: 1.3; }

/* Interactive activity: correction mode + attempts */
.iax-help { display: block; font-size: 0.72rem; color: var(--h-muted); line-height: 1.35; min-height: 2.7em; }
.iax-game.is-off { opacity: 0.3; pointer-events: none; text-decoration: line-through; }
.iax-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.iax-facts span, .hwh-pill-check { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 800; padding: 5px 10px; border-radius: 999px; background: var(--h-raised); color: var(--h-text) !important; border: 1px solid var(--h-border); }
.hwh-tag--tries { background: color-mix(in srgb, #6366f1 14%, transparent); color: #6366f1; }

/* Interactive activity: calculator allowed or not (HtmlLesson adds body.hlx-nocalc for students) */
body.hlx-nocalc #pinnedBottomBar #pinned-tool-math-casio, body.hlx-nocalc #pinnedBottomBar .divider:has(+ #pinned-tool-math-casio), body.hlx-nocalc .cas-win { display: none !important; }
.hwh-pill-calc { cursor: pointer; font: inherit; font-size: 0.74rem; font-weight: 800; }
.hwh-pill-calc em { font-style: normal; }
.hwh-pill-calc.is-off { opacity: 0.7; text-decoration: line-through; }
.hwh-pill-calc:hover { border-color: #14b8a6; opacity: 1; }
