/* ============================================================
   The activity template (templates/includes/activity_*.html): the opening and the close of
   every Exercise, Lab and Assignment, on course pages and session pages alike, plus the
   assignment rubric. --hb-* tokens only, so light and dark follow the Hub.
   ============================================================ */

.act{max-width:760px; margin:24px 0; font-family:var(--hb-font); font-size:15px; line-height:1.6; color:var(--hb-ink)}
.act h2{font:600 17px/24px var(--hb-display); letter-spacing:-.01em}
.act ul{margin:6px 0 0; padding-left:20px}
.act li + li{margin-top:2px}

/* the opening: one card, three bands */
.act-top{overflow:hidden; background:var(--hb-surface); border:1px solid var(--hb-line); border-radius:12px; box-shadow:var(--hb-shadow)}
.act-top > div{padding:16px 22px}
.act-top > div + div{border-top:1px solid var(--hb-line)}
.act-learn{background:var(--hb-tint)}
.act-after{margin-top:4px; color:var(--hb-ink-2)}
.act-learn li{font-weight:600}
.act-why p{margin-top:4px}
/* task-first pages: "What you will learn" folded, one line until opened */
.act-fold{background:var(--hb-tint); box-shadow:none}
.act-fold summary{padding:12px 22px; cursor:pointer; font:600 15px/22px var(--hb-display)}
.act-fold > .act-learn{padding-top:0}
.act-before dl{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px 20px; margin:8px 0 0}
.act-before dt{color:var(--hb-ink-2); font-size:13px; font-weight:600; line-height:18px}
.act-before dd{margin:2px 0 0}
.act-before dd ul{margin:0; padding-left:18px}
.act-before dl > div:has(ul){grid-column:span 2}

/* the close: result, success criteria, reflect, stuck */
.act-bottom{display:flex; flex-direction:column; gap:14px}
.act-bottom > div, .act-stuck{padding:16px 22px; background:var(--hb-surface); border:1px solid var(--hb-line); border-radius:12px}
.act-result{box-shadow:inset 4px 0 0 var(--hb-cyan)}
.act-sub{margin-top:2px; color:var(--hb-ink-2); font-size:14px}
.act-checks{display:flex; flex-direction:column; gap:6px; margin:10px 0 0; padding:0 !important; list-style:none}
.act-checks label{display:flex; align-items:flex-start; gap:10px; cursor:pointer}
.act-checks input{flex:none; width:18px; height:18px; margin-top:3px; accent-color:var(--hb-ok)}
.act-checks label:has(input:checked) span{color:var(--hb-ink-2); text-decoration:line-through; text-decoration-color:var(--hb-ok)}
.act-stuck summary{cursor:pointer; font:600 17px/24px var(--hb-display)}
.act-stuck[open] summary{margin-bottom:4px}

/* the rubric */
.act-rubric h2{margin-bottom:10px}
.act-table{overflow-x:auto; border:1px solid var(--hb-line); border-radius:12px; background:var(--hb-surface)}
.act-table table{width:100%; border-collapse:collapse; font-size:14px; line-height:1.5}
.act-table th, .act-table td{padding:10px 14px; text-align:left; vertical-align:top; border-bottom:1px solid var(--hb-line)}
.act-table tr:last-child th, .act-table tr:last-child td{border-bottom:0}
.act-table thead th{background:var(--hb-paper); font-size:13px}
.act-table tbody th{font-weight:600}
.act-table td{color:var(--hb-ink-2)}

@media (max-width:640px){
  .act-top > div, .act-bottom > div, .act-stuck{padding:14px 16px}
  .act-fold summary{padding:12px 16px}
  .act-before dl{grid-template-columns:minmax(0,1fr)}
  .act-before dl > div:has(ul){grid-column:auto}
}

/* "Mark as done" at the end of a session assignment or lab (templates/live/_done.html) */
.ex-done{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; max-width:760px; margin:28px 0 8px; padding:14px 18px; border:1px solid var(--hb-line); border-radius:12px; background:var(--hb-surface); font-size:15px}
.ex-done p{display:flex; align-items:center; gap:8px}
.ex-done.on{border-color:color-mix(in srgb, var(--hb-ok) 40%, var(--hb-line)); background:color-mix(in srgb, var(--hb-ok) 8%, var(--hb-surface))}
.ex-done.on p{color:var(--hb-ok); font-weight:600}
.ex-done svg{width:18px; height:18px}

/* The cards on a participant's session page (templates/live/session.html): a small tag says
   New (red, like an unread email), Opened or Done, and a legend above counts them. */
.lv-tag{display:inline-flex; align-self:flex-start; align-items:center; gap:6px; margin-bottom:2px; padding:2px 10px; border-radius:999px; font-size:12.5px; font-weight:600; line-height:20px}
.lv-tag svg, .lv-key svg{width:14px; height:14px}
.lv-dot{flex:none; width:7px; height:7px; border-radius:50%; background:currentColor}
.lv-tag.is-new{background:color-mix(in srgb, var(--hb-error) 9%, transparent); color:var(--hb-error)}
.lv-tag.is-opened{background:var(--hb-tint); color:var(--hb-link)}
.lv-tag.is-done{background:color-mix(in srgb, var(--hb-ok) 11%, transparent); color:var(--hb-ok)}
.lv-legend{display:inline-flex; flex-wrap:wrap; gap:4px 14px}
.lv-key{display:inline-flex; align-items:center; gap:6px}
.lv-key b{font-weight:700; color:var(--hb-ink)}
.lv-key.is-new .lv-dot{background:var(--hb-error)}
.lv-key.is-opened .lv-dot{background:var(--hb-link)}
.lv-key.is-done svg{color:var(--hb-ok)}

/* The top of an assignment or lab: the way back, and Mark as done for participants */
.ex-topbar{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-bottom:20px}
.ex-back, .ex-topbtn{min-height:36px; padding:0 16px 0 12px}
.ex-done-top{display:flex; align-items:center; gap:12px}
.ex-done-flag{display:inline-flex; align-items:center; gap:6px; color:var(--hb-ok); font-size:14px; font-weight:600}
.ex-done-flag svg{width:16px; height:16px}

/* .hb-ghost is drawn for links; as a button it needs the browser's box taken away */
button.hb-ghost{border:0; background:none; font:inherit; font-weight:600; cursor:pointer}


/* A card without slides opens with a cover in the style of the deck's title slides: the page's
   eyebrow, then its title in big letters, the highlighted words in the type's colour. */
.lv-cover{
  --a:var(--hb-cover-sky);
  display:flex; flex-direction:column; justify-content:center; gap:10px;
  height:112px; margin:-14px -18px 12px; padding:14px 20px; overflow:hidden;
  border-radius:11px 11px 0 0; color:var(--hb-cover-ink);
  background:
    radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1.5px) 0 0/18px 18px,
    radial-gradient(120% 90% at 100% 0%, var(--hb-cover-2), transparent 60%),
    var(--hb-cover);
}
.lv-cover.k-assignment{--a:var(--hb-cover-pink)}
.lv-cover.k-lab{--a:var(--hb-cover-butter)}
.lv-cover.k-resource{--a:var(--hb-cover-mint)}
.lv-cover p{margin:0; color:var(--a); font:700 10.5px/1.3 var(--hb-font); letter-spacing:.12em; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lv-cover strong{
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden;
  font:700 20px/1.15 var(--hb-display); letter-spacing:-.02em;
}
.lv-cover .t{color:var(--a)}
/* session cards stay compact: a low cover (a slide is cropped to the same height), less padding,
   and title and summary held to two lines each */
.lv-card{padding:14px 18px 16px}
.lv-card .hb-cthumb{width:calc(100% + 36px); height:112px; aspect-ratio:auto; margin:-14px -18px 12px}
.lv-card h3{margin-top:2px; font-size:16px; line-height:22px}
.lv-card h3, .lv-card .hb-desc{display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden}
.lv-card .hb-desc{margin-top:4px; font-size:14px; line-height:20px}
.lv-card .hb-acts{padding-top:12px}
.lv-card .hb-acts .hb-btn{min-height:36px; padding-block:0}
