/* Online lessons and the library's lesson list */
.ls { --ls-text: 1.05rem; font-size: var(--ls-text); }
.ls[data-size="2"] { --ls-text: 1.22rem; }
.ls[data-size="3"] { --ls-text: 1.42rem; }
.ls-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; font-size: .95rem; }
.ls-unitnav { display: flex; gap: 1.2rem; }
.ls-headline { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.ls-unit-label { margin: 0; color: var(--pink-ink); font-weight: 700; font-size: .9rem; letter-spacing: .02em; }
.ls-unit-title { margin: .1rem 0 0; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.15; color: var(--maroon); }
.ls-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--soft); }
.ls-lang { font: inherit; font-size: .9rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; max-width: 13rem; }
.ls-size { display: inline-flex; gap: .3rem; }
.ls-progress { height: 6px; margin: .9rem 0; background: var(--line); border-radius: 999px; overflow: hidden; }
.ls-progress span { display: block; height: 100%; width: 0; background: var(--pink-ink); transition: width .25s; }
.ls-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.ls-main:has(.ls-outline:not([hidden])) { grid-template-columns: 15rem minmax(0, 1fr); }
.ls-outline { position: sticky; top: 1rem; max-height: 80vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: .4rem; }
.ls-outline ol { list-style: none; margin: 0; padding: 0; }
.ls-outline button { display: grid; grid-template-columns: 2rem 1fr auto; gap: .3rem; width: 100%; padding: .4rem .5rem; border: 0; border-radius: 10px; background: none; font: inherit; font-size: .85rem; text-align: left; cursor: pointer; color: var(--ink); }
.ls-outline button:hover { background: var(--pink-wash); }
.ls-outline button[aria-current] { background: var(--pink-wash); font-weight: 700; }
.ls-o-n { color: var(--muted); }
.ls-o-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ls-o-i { color: #1b7f3b; }
.ls-stage { min-width: 0; }
.ls-slide { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 2rem); }
.ls-slide header { margin-bottom: 1rem; }
.ls-kicker { margin: 0 0 .2rem; color: var(--pink-ink); font-size: .82em; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.ls-title { margin: 0; font-size: 1.45em; line-height: 1.2; color: var(--maroon); }
.ls-lay-title { text-align: center; padding: clamp(2rem, 6vw, 4rem) 1.2rem; background: linear-gradient(160deg, var(--pink-wash), #fff 60%); }
.ls-hero-title { margin: .4rem 0 1rem; font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.1; color: var(--maroon); }
.ls-spec p, .ls-hero-meta { margin: .2rem 0; color: var(--muted); }
.ls-lay-title .btn { margin-top: 1.4rem; }
.ls-lay-dark { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.ls-lay-dark .ls-title, .ls-lay-dark .ls-kicker { color: #fff; }
.ls-lay-dark .ls-badge { background: var(--pink); color: #fff; }
.ls-body > * + * { margin-top: 1rem; }
.ls-body p { margin: .35rem 0; line-height: 1.55; }
.ls-q { font-weight: 700; font-size: 1.08em; }
.ls-ins { color: var(--muted); font-style: italic; }
.ls-today, .ls-eq, .ls-r-aim, .ls-r-key-ideas, .ls-r-enquiry-text { padding: .8rem 1rem; border-radius: 12px; background: var(--pink-wash); border-left: 4px solid var(--pink-ink); }
.ls-eq { font-weight: 700; text-align: center; font-size: 1.12em; }
.ls-safety { padding: .7rem 1rem; border-radius: 12px; background: #fff6e5; border-left: 4px solid #c77700; }
.ls-cap { font-size: .8em; color: var(--muted); }
.ls-why { padding: .7rem 1rem; border-radius: 12px; background: #eef4ff; border-left: 4px solid var(--focus); }
.ls-label { font-weight: 700; color: var(--maroon); }
.ls-img { margin: 0; }
.ls-img-box { position: relative; display: inline-block; max-width: 100%; }
.ls-img img { display: block; max-width: 100%; height: auto; max-height: 26rem; width: auto; border-radius: 12px; border: 1px solid var(--line); }
.ls-pin { position: absolute; transform: translate(-50%, -50%); width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--pink-ink); color: #fff; font-size: .8rem; font-weight: 700; box-shadow: 0 0 0 2px #fff; }
.ls-table-wrap { overflow-x: auto; }
.ls-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.ls-table th, .ls-table td { padding: .55rem .65rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.ls-table th { background: var(--soft); color: var(--maroon); }
.ls-table textarea { width: 100%; }
.ls-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ls-chip { padding: .35rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); font: inherit; font-size: .92em; color: var(--maroon); }
button.ls-chip { cursor: pointer; }
button.ls-chip:hover { border-color: var(--pink-ink); }
.ls-badge { display: inline-grid; place-items: center; flex: none; min-width: 1.7em; height: 1.7em; padding: 0 .3em; border-radius: 999px; background: var(--pink-wash); color: var(--pink-ink); font-weight: 700; font-size: .85em; }
.ls-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .6rem; }
.ls-opt { display: flex; align-items: center; gap: .6rem; padding: .8rem .9rem; border: 2px solid var(--line); border-radius: 14px; background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.ls-opt:hover:not(:disabled) { border-color: var(--pink-ink); }
.ls-opt.is-chosen { border-color: var(--pink-ink); background: var(--pink-wash); }
.ls-opt.is-right { border-color: #1b7f3b; background: #e3f4e8; }
.ls-opt.is-wrong { border-color: var(--error); background: #fdecea; }
.ls-opt:disabled { cursor: default; }
.ls-feedback { font-weight: 700; }
.ls-feedback.is-ok, .ls-ok { color: #1b7f3b; }
.ls-feedback.is-no, .ls-no { color: var(--error); }
.ls-mark { font-weight: 700; margin-left: .35rem; }
.ls-correct { margin-left: .4rem; padding: .1rem .5rem; border-radius: 999px; background: #e3f4e8; color: #1b7f3b; font-weight: 700; font-size: .9em; }
.ls-match { display: grid; gap: .5rem; }
.ls-match-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.ls-term { font-weight: 700; min-width: 10rem; }
.ls-match select, .ls-body input, .ls-body textarea { font: inherit; font-size: .95em; padding: .45rem .6rem; border: 1px solid #d9c3cb; border-radius: 10px; background: #fff; color: var(--ink); }
.ls-body textarea { width: 100%; resize: vertical; }
.ls-body input:focus, .ls-body textarea:focus, .ls-match select:focus { outline: 3px solid rgba(47, 111, 223, .35); border-color: var(--focus); }
.ls-body input[readonly], .ls-body textarea[readonly] { background: var(--soft); }
.ls-means { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.ls-means li, .ls-list li { display: flex; gap: .5rem; align-items: flex-start; }
.ls-list { list-style: none; padding: 0; display: grid; gap: .4rem; }
.ls-tf-cell { white-space: nowrap; }
.ls-tf { margin-right: .3rem; padding: .3rem .7rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .9em; cursor: pointer; }
.ls-tf[aria-pressed="true"] { border-color: var(--pink-ink); background: var(--pink-wash); font-weight: 700; }
.ls-conf-cell { text-align: center; }
.ls-conf { border: 0; background: none; font-size: 1.3em; color: var(--pink-ink); cursor: pointer; }
.ls-gaps p { line-height: 2.3; }
.ls-gap-wrap { white-space: nowrap; }
.ls-gap-n { font-size: .7em; vertical-align: super; color: var(--muted); margin-right: .1rem; }
.ls-body .ls-gap { width: 9.5rem; padding: .2rem .45rem; }
.ls-body .is-right { border-color: #1b7f3b; background: #e3f4e8; }
.ls-body .is-wrong { border-color: var(--error); background: #fdecea; }
.ls-labels { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .5rem; }
.ls-label-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ls-label-row input { flex: 1; min-width: 8rem; }
.ls-rows { margin: 0; padding: 0; list-style: none; display: grid; gap: .65rem; }
.ls-rows > li { display: flex; gap: .65rem; align-items: flex-start; }
.ls-rows > li > div { flex: 1; min-width: 0; }
.ls-rows-task input { width: 100%; max-width: 26rem; }
.ls-src { font-size: .8em; color: var(--muted); margin: 0; }
.ls-model { margin-top: .4rem; padding: .5rem .75rem; border-radius: 10px; background: #e3f4e8; color: #134e27; }
.ls-model p { margin: .15rem 0; }
.ls-order { display: grid; gap: .45rem; }
.ls-step { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; color: var(--ink); }
.ls-step:hover:not(:disabled) { border-color: var(--pink-ink); }
.ls-step.is-picked { background: var(--soft); color: var(--muted); }
.ls-step-n { margin-left: auto; font-weight: 700; color: var(--pink-ink); }
.ls-vars { display: grid; gap: .55rem; }
.ls-var { display: grid; grid-template-columns: 11rem 1fr; gap: .5rem; align-items: center; }
.ls-var span:first-child { font-weight: 700; color: var(--maroon); }
.ls-var .ls-model { grid-column: 2; margin: 0; }
.ls-self { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .35rem; }
.ls-self button { padding: .3rem .75rem; border: 2px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: .88em; cursor: pointer; }
.ls-self button[aria-pressed="true"] { border-color: var(--pink-ink); background: var(--pink-wash); font-weight: 700; }
.ls-write { display: grid; gap: .35rem; }
.ls-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.2rem; }
.ls-score { font-weight: 700; color: var(--maroon); }
.ls-answer { margin-top: 1.3rem; padding-top: 1rem; border-top: 2px dashed var(--line); }
.ls-answer h3 { margin: 0 0 .6rem; color: #1b7f3b; font-size: 1em; }
.ls-answer > * + * { margin-top: .8rem; }
.ls-def { margin-top: 1rem; padding: .7rem 1rem; border-radius: 12px; background: #fffbea; border: 1px solid #f0d98a; }
.ls-def p { margin: 0 0 .3rem; }
.ls-kw { border-bottom: 2px dotted var(--pink-ink); cursor: help; }
.ls-kw:focus { outline: 2px solid var(--focus); }
.ls-ideas { display: grid; gap: .55rem; }
.ls-idea { padding: .7rem .9rem; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.ls-figure { margin: 0; }
.ls-figure figcaption { font-weight: 700; color: var(--maroon); margin-bottom: .3rem; }
.ls-chart { width: 100%; max-width: 640px; height: auto; font-family: var(--font); font-size: 12px; fill: var(--muted); }
.ls-grid { stroke: #f1e1e6; }
.ls-axis { stroke: #9b8a90; }
.ls-axis-title { fill: var(--maroon); font-weight: 700; }
.ls-legend { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .85em; }
.ls-legend i { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
.ls-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.ls-count { color: var(--muted); font-size: .9rem; }
.ls-saved { min-height: 1.2em; font-size: .85rem; text-align: right; }
.ls-stats { display: flex; flex-wrap: wrap; gap: .8rem; padding: 0; list-style: none; }
.ls-stats li { padding: .6rem .9rem; border-radius: 12px; background: var(--pink-wash); }
.ls-stats b { color: var(--maroon); font-size: 1.2em; }
@media (max-width: 860px) {
  .ls-main:has(.ls-outline:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .ls-outline { position: static; max-height: 18rem; }
  .ls-var { grid-template-columns: 1fr; }
  .ls-var .ls-model { grid-column: 1; }
}
/* Library lesson list */
.lib-continue { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; margin-bottom: 1.4rem; border-radius: var(--radius); background: var(--pink-wash); border: 1px solid var(--line); }
.lib-continue h3 { margin: .1rem 0 .2rem; color: var(--maroon); }
.lib-continue .muted { margin: 0; }
.lib-preview-title { margin: 1.6rem 0 .3rem; color: var(--maroon); }
.lib-topic { margin: 1.4rem 0 .5rem; font-size: 1.05rem; color: var(--maroon); }
.lib-units { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.lib-unit a, .lib-unit > div { display: grid; grid-template-columns: 8.5rem 1fr auto auto; gap: .4rem .9rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; }
.lib-unit a:hover { border-color: var(--pink-ink); box-shadow: var(--shadow); }
.lib-type { font-size: .82rem; font-weight: 700; color: var(--pink-ink); }
.lib-type-practical { color: #1b6f8f; }
.lib-type-test { color: #7a4ab8; }
.lib-title { font-weight: 600; }
.lib-meta { font-size: .82rem; color: var(--muted); }
.lib-status { font-size: .82rem; font-weight: 700; color: var(--maroon); }
.lib-status.is-done { color: #1b7f3b; }
@media (max-width: 640px) {
  .lib-unit a, .lib-unit > div { grid-template-columns: 1fr auto; }
  .lib-type { grid-column: 1 / -1; }
}
.ls-art { margin-left: auto; height: 120px; width: auto; max-width: 220px; object-fit: contain; flex: none; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
@media (max-width: 560px) { .ls-art { height: 72px; max-width: 120px; } }

