/* Lesson kit: interactive activity blocks (type "act"), category looks, and the characters that live on the lesson.
   Only applies to lessons whose data has a "kit" entry (article gets .sll-kit). Script: lesson-kit.js. */
.sll-kit { --k-bg: #F6F5F0; --k-warn: #A23B2E; --k-sun: #F2B63C; --k-sun-soft: #FDF3D9; }
.sll-kit .slk__fallback { margin: 0 0 14px; }

/* ---- category looks ---- */
.slk { --c: var(--sll-accent); --c-soft: var(--sll-soft); position: relative; display: flex; flex-direction: column; gap: 11px; margin: 0 0 18px; padding: 14px; border-radius: 14px; background: #fff; border: 2px solid var(--c); min-width: 0; }
.slk__label { display: flex; align-items: center; gap: 7px; margin: 0; font-weight: 700; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.slk__label::before { content: attr(data-i); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: .8rem; letter-spacing: 0; }
.slk__title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.slk__note, .slk__text { margin: 0; }
.slk__note { color: var(--sll-muted); font-size: .93rem; }
.slk__box { background: var(--c-soft); border-radius: 12px; padding: 12px; }
.slk__es { font-weight: 700; font-size: 1.1rem; margin: 0; }
.slk__en { color: var(--sll-muted); font-size: .93rem; margin: 0; min-height: 1.4em; }
.slk__msg { margin: 0; font-weight: 700; min-height: 1.4em; color: var(--sll-accent); }
.slk__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.slk--concept { background: var(--sll-soft); border: 0; border-radius: 24px; padding: 16px; }
.slk--concept .slk__box { background: #fff; }
.slk--pattern { --c: #8A6100; --c-soft: var(--k-sun-soft); border-color: var(--k-sun); }
.slk--rule { --c: #0B6E8A; --c-soft: #DFF0F5; }
.slk--change { --c: #4B3FA8; --c-soft: #E9E6F8; border-style: double; border-width: 5px; }
.slk--exception { --c: #B4530A; --c-soft: #FBE9D7; border-style: dotted; border-width: 3px; }
.slk--usage { --c: #5A6372; --c-soft: #E9ECE8; border-width: 1px; border-color: var(--sll-line); background: var(--k-bg); border-radius: 20px 20px 20px 4px; }
.slk--usage .slk__box { background: #fff; }
.slk--mistake { --c: #A23B2E; --c-soft: #F8E6E2; }
.slk--extension { --c: #1A2130; --c-soft: #E9ECEA; border-style: dashed; }
.slk--concept.in { animation: slk-grow .5s; } .slk--pattern.in { animation: slk-slide .5s; } .slk--rule.in { animation: slk-rise .5s; }
.slk--change.in { animation: slk-flipin .6s; } .slk--exception.in { animation: slk-wob .6s; } .slk--usage.in { animation: slk-fade .6s; } .slk--extension.in { animation: slk-drop .5s; }
@keyframes slk-grow { from { transform: scale(.93); opacity: .3; } } @keyframes slk-slide { from { transform: translateX(-20px); opacity: .3; } }
@keyframes slk-rise { from { transform: translateY(16px); opacity: .3; } } @keyframes slk-flipin { from { transform: perspective(800px) rotateX(-40deg); opacity: .3; } }
@keyframes slk-wob { 0% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } } @keyframes slk-fade { from { opacity: .2; } } @keyframes slk-drop { from { transform: translateY(-14px); opacity: .3; } }
@keyframes slk-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes slk-pop { 0% { transform: scale(.9); } 60% { transform: scale(1.08); } }
.slk-shake { animation: slk-shake .3s 2; } .slk-pop { animation: slk-pop .35s; }

/* shared buttons */
.slk-btn { font: inherit; cursor: pointer; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--sll-accent); background: #fff; color: var(--sll-accent); font-weight: 700; font-size: .92rem; }
.slk-btn--solid { background: var(--sll-accent); color: #fff; }
.slk-btn[aria-pressed="true"] { background: var(--sll-ink); border-color: var(--sll-ink); color: #fff; }
.slk-opt { font: inherit; cursor: pointer; padding: 7px 13px; border-radius: 11px; border: 1px solid var(--sll-line); background: #fff; color: var(--sll-ink); font-weight: 700; }
@media (hover: hover) { .slk-opt:hover:not(:disabled) { border-color: var(--c, var(--sll-accent)); } } /* phones keep :hover after a tap */
.slk-opt.is-on { background: var(--c); border-color: var(--c); color: #fff; }
.slk-opt.is-good { background: var(--sll-accent); border-color: var(--sll-accent); color: #fff; }
.slk-opt:disabled { cursor: default; }
.slk-dots { display: flex; gap: 5px; } .slk-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--sll-line); } .slk-dots i.on { background: var(--sll-accent); } .slk-dots i.miss { background: var(--k-warn); }
.slk :focus-visible, .slk-btn:focus-visible, .slk-who:focus-visible { outline: 3px solid var(--sll-ink); outline-offset: 2px; }

/* slider */
.slk-bars { display: flex; justify-content: center; align-items: flex-end; gap: 44px; height: 150px; }
.slk-bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; font-weight: 700; }
.slk-bar i { width: 54px; border-radius: 12px 12px 4px 4px; background: var(--sll-accent); transition: height .35s; }
.slk-bar--b i { background: #378ADD; }
/* slider: big round handle, filled green track, a dot for each stop (dots are clickable too) */
.slk-rangewrap { position: relative; padding: 6px 11px 14px; }
.sll-kit input.slk-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 34px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; position: relative; z-index: 2; --v: 50%; }
.sll-kit input.slk-range:focus { outline: none; }
.sll-kit input.slk-range::-webkit-slider-runnable-track { height: 10px; border-radius: 99px; border: 0; background: linear-gradient(90deg, var(--sll-accent) var(--v), #fff var(--v)); box-shadow: inset 0 0 0 1px var(--sll-line); }
.sll-kit input.slk-range::-moz-range-track { height: 10px; border-radius: 99px; border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--sll-line); }
.sll-kit input.slk-range::-moz-range-progress { height: 10px; border-radius: 99px; background: var(--sll-accent); }
.sll-kit input.slk-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 32px; height: 32px; margin-top: -11px; border-radius: 50%; background: var(--sll-accent); border: 5px solid #fff; box-shadow: 0 0 0 2px var(--sll-accent), 0 3px 8px rgba(31, 92, 153, .35); transition: transform .15s; }
.sll-kit input.slk-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--sll-accent); border: 5px solid #fff; box-shadow: 0 0 0 2px var(--sll-accent), 0 3px 8px rgba(31, 92, 153, .35); transition: transform .15s; }
.sll-kit input.slk-range:hover::-webkit-slider-thumb, .sll-kit input.slk-range:active::-webkit-slider-thumb { transform: scale(1.12); }
.sll-kit input.slk-range:hover::-moz-range-thumb, .sll-kit input.slk-range:active::-moz-range-thumb { transform: scale(1.12); }
.sll-kit input.slk-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--sll-accent), 0 0 0 5px var(--sll-ink); }
.sll-kit input.slk-range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--sll-accent), 0 0 0 5px var(--sll-ink); }
.slk-ticks { position: absolute; left: 27px; right: 27px; bottom: -8px; display: flex; justify-content: space-between; pointer-events: none; }
.slk-ticks button { width: 8px; height: 8px; margin: 0; min-width: 0; padding: 0; border: 0; border-radius: 50%; background: #AEB8B3; pointer-events: auto; cursor: pointer; }

/* chips */
.slk-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--sll-line); font: inherit; font-weight: 700; color: var(--sll-ink); }
button.slk-chip { cursor: pointer; border: 2px solid var(--c); background: var(--c-soft); }
button.slk-chip::after { content: "⇄"; font-size: .8rem; color: var(--c); }
/* build */
.slk-line { display: flex; flex-wrap: wrap; gap: 6px; min-height: 44px; padding: 8px; border-radius: 12px; background: var(--c-soft); align-items: center; }
/* tabs */
.slk-parts { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: flex-start; font-weight: 700; font-size: 1.1rem; }
.slk-part { display: inline-flex; flex-direction: column; align-items: center; padding: 4px 6px; }
.slk-part.is-key { background: var(--k-sun); border-radius: 8px; padding: 4px 10px; }
.slk-part small { font-weight: 400; font-size: .7rem; color: #5a4300; }
/* sort, pairs */
.slk-word { font-weight: 700; font-size: 1.2rem; margin: 0; }
.slk-word mark { background: var(--k-sun); border-radius: 6px; padding: 0 6px; }
.slk-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slk-cols > div { display: grid; gap: 6px; align-content: start; }
/* notes */
.slk-notes { display: grid; gap: 10px; }
@media (min-width: 680px) { .slk-notes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.slk-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 9px; border-radius: 99px; background: var(--c); color: #fff; margin-bottom: 6px; }
/* boost */
.slk-boost { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.slk-boost button { display: grid; gap: 1px; text-align: left; }
.slk-boost small { font-weight: 400; font-size: .76rem; color: var(--sll-muted); min-height: 1.2em; }
.slk-boost .is-on small { color: #fff; }

/* ---- existing key rule card takes the Rule change look ---- */
/* big faint key behind the Key rule question */
.sll-kit .sll-flip__front { background: #4B3FA8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cg transform='rotate(-35 60 60)' fill='none' stroke='%23fff' stroke-opacity='.16' stroke-width='9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='30' cy='60' r='19'/%3E%3Ccircle cx='30' cy='60' r='6'/%3E%3Cpath d='M49 60h62M96 60v15M83 60v11M108 60v9'/%3E%3C/g%3E%3C/svg%3E") no-repeat right -14px bottom -22px / 190px 190px; }
.sll-kit .sll-flip__back { border: 5px double #4B3FA8; }
.sll-kit .sll-flip__back .sll-rule__label, .sll-kit .sll-flip__back strong { color: #4B3FA8; }

/* ---- characters ---- */
.slk-ch { position: relative; flex: none; width: 46px; height: 72px; z-index: 2; }
.slk-ch svg { width: 100%; height: 100%; overflow: visible; display: block; transition: transform .15s; }
.slk-ch.talk svg { animation: slk-bob .32s infinite alternate; }
.slk-ch.talk .mouth { animation: slk-yap .2s infinite alternate; transform-box: fill-box; transform-origin: center; }
.slk-ch.hang svg { transform-origin: 50% 14%; animation: slk-swing 1.5s ease-in-out infinite alternate; }
.slk-ch.hop svg { animation: slk-hop .36s 4; }
.slk-ch.shake svg { animation: slk-shake .3s 2; }
.slk-ch.spin svg { transform-origin: 50% 14%; animation: slk-spin .8s cubic-bezier(.45, 0, .3, 1) 1; }
@keyframes slk-bob { to { transform: translateY(-3px); } } @keyframes slk-yap { to { transform: scaleY(.25); } }
@keyframes slk-hop { 50% { transform: translateY(-10px); } } @keyframes slk-swing { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes slk-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.slk-bub { position: absolute; z-index: 6; background: #fff; border: 1px solid #B4B2A9; border-radius: 11px; padding: 3px 10px; font-weight: 700; font-size: .88rem; line-height: 1.25; font-style: normal; color: var(--sll-ink); width: max-content; max-width: min(230px, 58vw); text-align: center; animation: slk-bubin .25s; pointer-events: none; }
.slk-bub small { display: block; font-weight: 400; font-size: .72rem; color: var(--sll-muted); }
.slk-bub.above { bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); }
.slk-bub.below { top: calc(100% + 2px); left: 50%; transform: translateX(-50%); }
.slk-bub.left { right: calc(100% + 4px); bottom: 40%; }
.slk-bub.right { left: calc(100% + 4px); bottom: 40%; }
@keyframes slk-bubin { from { opacity: 0; scale: .7; } }
.slk-conf { position: absolute; top: 0; width: 7px; height: 4px; z-index: 7; pointer-events: none; animation: slk-fall 1.7s linear forwards; }
@keyframes slk-fall { to { transform: translateY(170px) rotate(540deg); opacity: 0; } }
.slk-perch { display: flex; justify-content: flex-end; align-items: flex-end; gap: 34px; padding-right: 16px; min-height: 56px; position: relative; z-index: 2; }

/* ---- examples: someone sits on each card ---- */
.sll-kit .sll-ex-list { row-gap: 0; }
.sll-kit .sll-ex-list li { position: relative; display: block; margin-top: 50px; padding: 22px 58px 12px 14px; }
.sll-kit .sll-ex-list li > .sll-es, .sll-kit .sll-ex-list li > .sll-en { display: block; }
.sll-kit .sll-ex-list li > .sla-btn { position: absolute; top: 17px; right: 28px; width: 22px; height: 22px; min-width: 0; margin: 0; padding: 0; border: 0; background: none; color: #9AA29E; box-shadow: none; }
.sll-kit .sll-ex-list li > .sla-btn svg { width: 15px; height: 15px; }
.slk-who { position: absolute; right: 16px; bottom: 100%; border: 0; background: none; padding: 0; cursor: pointer; border-radius: 10px; z-index: 2; }
.slk-who:hover .slk-ch svg { transform: translateY(-6px); }
.sll-kit .sll-ex-list li.is-on { border-color: var(--sll-accent); background: var(--sll-soft); }
.sll-kit .sll-ex-list.slk-hide .sll-en { filter: blur(5px); cursor: pointer; user-select: none; }
.sll-kit .sll-ex-list.slk-hide .sll-en.peek { filter: none; }
.slk-under { margin: -8px 0 18px; }
.sll-kit .sll-summary .sll-ex-list + .slk-under { margin-top: 10px; }

/* ---- tables: quiz mode ---- */
.sll-kit td.slk-hid { font-weight: 700; color: var(--sll-accent); }
.sll-kit .slk-quiz td.slk-hid { position: relative; cursor: pointer; }
.sll-kit .slk-quiz td.slk-hid:not(.is-open) { color: transparent; }
.sll-kit .slk-quiz td.slk-hid:not(.is-open)::after { content: "tap"; position: absolute; inset: 5px 8px; display: grid; place-items: center; border: 1px dashed var(--sll-muted); border-radius: 8px; background: var(--k-bg); color: var(--sll-muted); font-weight: 700; }
.sll-kit .slk-quiz td.slk-blank { color: transparent; user-select: none; }
.sll-kit .slk-quiz td.slk-blank * { visibility: hidden; }

/* ---- mistakes: pick the right one ---- */
.sll-kit .sll-mistake { border: 2px solid #A23B2E; border-radius: 14px; }
.sll-kit .sll-mistake.is-quiz .sll-mistake__pair { display: flex; flex-direction: column; gap: 6px; }
.sll-kit .sll-mistake.is-quiz .sll-mark, .sll-kit .sll-mistake.is-quiz .sll-mistake__why, .sll-kit .sll-mistake.is-quiz .sla-btn { display: none; }
.sll-kit .sll-mistake.is-quiz .sll-wrong, .sll-kit .sll-mistake.is-quiz .sll-right { display: block; padding: 8px 12px; border: 1px solid var(--sll-line); border-radius: 10px; background: #fff; color: var(--sll-ink); text-decoration: none; font-weight: 700; cursor: pointer; }
@media (hover: hover) { .sll-kit .sll-mistake.is-quiz .sll-wrong:hover, .sll-kit .sll-mistake.is-quiz .sll-right:hover { border-color: #A23B2E; } }
.slk-mres { margin: 0 0 4px; font-weight: 700; font-size: .85rem; }
.slk-mres.ok { color: var(--sll-accent); } .slk-mres.no { color: #A23B2E; }

/* ---- practice: one question at a time ---- */
.slk-leanh { display: flex; align-items: flex-end; }
.slk-leanh .slk-ch { margin: 0 0 -3px 6px; }
.slk-run .sll-qs { list-style: none; margin: 0; padding: 0; }
.slk-run .sll-q { display: none; border: 0; padding: 0; margin: 0; background: none; }
.slk-run .sll-q.is-cur { display: block; padding-bottom: 54px; }
.slk-run .sll-q::before { display: none; }
.slk-run .sll-q__row { display: flex; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 10px; }
.slk-run .sll-q__row .sll-q__prompt { flex: 0 1 auto; }
.slk-run .sll-q[data-type="choice"].is-cur { padding-bottom: 12px; }
.slk-run .sll-q[data-type="choice"] .sll-q__prompt { margin-bottom: 52px !important; }
.slk-run[data-t="choice"] .slk-next { margin-top: 0; }
.slk-run .sll-score { display: none; }
.slk-run .sll-q__prompt { position: relative; display: inline-block; padding-right: 54px; font-size: 1.15rem; font-weight: 700; }
.slk-run .sll-q__prompt .slk-ch, .slk-end__n .slk-ch { position: absolute; right: 0; top: calc(100% - 13px); }
.slk-run .sll-q__in { color: var(--sll-ink); background: #fff; border: 2px solid var(--sll-accent); border-radius: 8px; }
.slk-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.slk-streak { font-weight: 700; font-size: .85rem; color: #7A5300; background: var(--k-sun-soft); padding: 3px 10px; border-radius: 99px; }
.slk-next { margin-top: -44px; position: relative; }
.slk-end { display: grid; gap: 10px; justify-items: start; }
.slk-end__n { position: relative; display: inline-block; padding-right: 54px; margin: 0 0 50px; font-size: 1.2rem; font-weight: 700; }

/* ---- use it: live checklist ---- */
.slk-checks { list-style: none; margin: 10px 0 14px; padding: 0; display: grid; gap: 6px; }
@media (min-width: 680px) { .slk-checks { grid-template-columns: 1fr 1fr; } }
.slk-checks li { display: flex; gap: 8px; align-items: center; color: var(--sll-muted); margin: 0; }
.slk-checks li::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--sll-line); }
.slk-checks li.ok { color: var(--sll-ink); font-weight: 700; }
.slk-checks li.ok::before { content: "✓"; display: grid; place-items: center; background: var(--sll-accent); border-color: var(--sll-accent); color: #fff; font-size: .8rem; }

/* ---- finish ---- */
.slk-finish { position: relative; }
.slk-finish .slk-perch { min-height: 96px; gap: clamp(120px, 24vw, 190px); }
.slk-wide { width: 100%; padding-block: 11px; font-size: 1rem; }
.slk-recapbox { border: 2px solid var(--sll-accent); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: #fff; }
.slk-recap { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.slk-recap li { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--sll-soft); font-weight: 700; animation: slk-rise .4s backwards; }

@media (prefers-reduced-motion: reduce) { .sll-kit *, .sll-kit *::before, .sll-kit *::after { animation: none !important; transition: none !important; } }
@media print { .slk-ch, .slk-who, .slk-perch, .slk-finish, .slk-under { display: none !important; } }
.sll-kit [hidden] { display: none !important; }
.sll-kit .slk-who, .sll-kit .slk-who:focus, .sll-kit .slk-who:focus-visible { outline: none !important; box-shadow: none !important; -webkit-tap-highlight-color: transparent; }

/* ---- learn-more arrows (one per gap, shaped to fit; links from kit.links) ---- */
.sll-kit .sll-ex-list li.slk-fill { display: flex; flex-direction: row; align-items: stretch; padding: 0; border: 0; background: none; box-shadow: none; }
@media (min-width: 820px) {
  .sll-kit.slk-has-links .sll-side { align-items: stretch; }
  .sll-kit.slk-has-links .sll-side__main, .sll-kit.slk-has-links .sll-side__card { display: flex; flex-direction: column; }
}
.slk-fill--col { flex: 1; display: flex; margin-top: 14px; }
.slk-arrow { --p: 34px; --n: 20px; --t: 9px; --c1: #E4ECF5; --c2: #C7E3D7; --c3: #6DB89A; --edge: #1F5C99; position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 88px; padding: 12px calc(var(--p) + 26px) 12px calc(var(--n) + 18px); background: var(--c1); color: var(--sll-ink); text-decoration: none; clip-path: polygon(0 0, calc(100% - var(--p)) 0, 100% 50%, calc(100% - var(--p)) 100%, 0 100%, var(--n) 50%); transition: transform .2s, filter .2s; }
/* thick dark edge along the arrow head, thinner one in the tail notch */
.slk-arrow::before, .slk-arrow::after { content: ""; position: absolute; inset: 0; background: var(--edge); pointer-events: none; }
.slk-arrow::after { clip-path: polygon(calc(100% - var(--p) - var(--t)) 0, calc(100% - var(--p)) 0, 100% 50%, calc(100% - var(--p)) 100%, calc(100% - var(--p) - var(--t)) 100%, calc(100% - var(--t)) 50%); }
.slk-arrow::before { clip-path: polygon(0 0, 5px 0, calc(var(--n) + 5px) 50%, 5px 100%, 0 100%, var(--n) 50%); opacity: .55; }
.slk-fill--col .slk-arrow { --p: 44px; --n: 26px; --t: 11px; }
.slk-arrow:hover { transform: translateX(6px); filter: saturate(1.25) brightness(.97); }
.slk-arrow:focus-visible { outline: none; --c1: #1A2130; color: #fff; }
.slk-arrow:focus-visible .slk-arrow__lab, .slk-arrow:focus-visible .slk-arrow__s { color: #fff; }
.slk-arrow__lab { display: inline-flex; align-items: center; gap: 6px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--edge); }
.slk-arrow__lab::after { content: "→"; font-size: .9rem; letter-spacing: 0; transition: transform .2s; }
.slk-arrow:hover .slk-arrow__lab::after { transform: translateX(4px); }
.slk-arrow__t { font-weight: 700; font-size: 1.12rem; line-height: 1.2; }
.slk-arrow__s { font-size: .86rem; color: #3E4A45; line-height: 1.3; }
.slk-arrow--deep { --c1: #EFEAFB; --c2: #DCD0F6; --c3: #9C84E0; --edge: #5B3DB8; }
.slk-arrow--deep .slk-arrow__t { font-size: 1.3rem; color: #5B3DB8; }
@media print { .slk-fill { display: none !important; } }

/* ---- audio on activity sentences ---- */
.slk-sayrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.slk-sayrow > :first-child { flex: 1; min-width: 0; }
.slk-say { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: none; color: #7F8A85; cursor: pointer; vertical-align: middle; }
.slk-say svg { width: 17px; height: 17px; }
.slk-say:hover, .slk-say.is-playing { color: var(--sll-accent); background: rgba(31, 92, 153, .1); }
.slk-say[hidden] { display: none; }

/* ---- quick check (end of each section) ---- */
.slk--check { --c: #1D6FB8; --c-soft: #fff; background: #E6EFFA; border: 0; border-radius: 18px; }
.slk-check { position: relative; padding: 14px 76px 14px 14px; min-height: 130px; display: flex; flex-direction: column; gap: 10px; }
.slk-check__q { font-size: 1.15rem; }
.slk-gap { display: inline-block; min-width: 2.4em; padding: 0 6px; border-radius: 6px; background: var(--k-sun); text-align: center; }
.slk-gap.is-filled { background: var(--sll-accent); color: #fff; }
.slk-check__why:empty { display: none; }
.slk-check .slk-opt { font-size: 1.02rem; }
.slk-check .slk-opt:disabled:not(.is-good) { opacity: .45; }
.slk-check__ch { position: absolute; right: 12px; bottom: 0; width: 52px; height: 80px; }

/* ---- cheat sheet (summary and finish) ---- */
.slk-cheat { display: grid; gap: 10px; margin: 14px 0 18px; }
@media (min-width: 640px) { .slk-cheat { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .slk-cheat { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.slk-cheat__card { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 14px 12px; background: #fff; border: 1px solid var(--sll-line); border-top: 5px solid var(--sll-accent); border-radius: 14px; }
.slk-cheat__card:nth-child(2) { border-top-color: #1D6FB8; } .slk-cheat__card:nth-child(3) { border-top-color: #B4530A; } .slk-cheat__card:nth-child(4) { border-top-color: #4B3FA8; }
.slk-cheat__n { position: absolute; top: 10px; right: 12px; font-weight: 700; font-size: .8rem; color: var(--sll-muted); }
.slk-cheat__p { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.25; padding-right: 18px; }
.slk-cheat__p b { color: var(--sll-accent); }
.slk-cheat__card:nth-child(2) .slk-cheat__p b { color: #1D6FB8; } .slk-cheat__card:nth-child(3) .slk-cheat__p b { color: #B4530A; }
.slk-cheat__en { margin: 0 0 6px; color: var(--sll-muted); font-size: .9rem; }
.slk-cheat__ex { margin: auto 0 0; padding-top: 8px; border-top: 1px dashed var(--sll-line); font-weight: 700; font-size: .95rem; }
.slk-cheat__exen { margin: 0; color: var(--sll-muted); font-size: .85rem; }
.slk-recapbox .slk-cheat { margin: 0; }

/* ---- section banners ---- */
.slk-banner { display: flex; align-items: center; gap: 14px; margin: 30px 0 16px; padding: 12px 16px; background: var(--sll-soft); border-radius: 16px; }
.slk-banner__n { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sll-accent); color: #fff; font-weight: 700; font-size: 1.3rem; }
.slk-banner__txt { min-width: 0; }
.slk-banner .sll-h3 { margin: 0; }
.slk-banner__say { margin: 2px 0 0; font-size: .95rem; }
.slk-banner__lab { color: var(--sll-muted); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-right: 4px; }
.slk-banner__say [lang="en"] { font-weight: 700; }

/* Spanish mode: the English line under a character's speech bubble is not needed */
.slim-on .slk-bub small { display: none; }

/* Phones. A three-column table squeezes the example into one word per line, so each row becomes a small card:
   the first two cells side by side, the example underneath. A table with 4+ columns becomes one card per row:
   the row heading on top, then each value with its column heading (.slk-lab, added by lesson-kit.js).
   Two-column tables stay normal tables. */
.slk-lab { display: none; }
@media (max-width: 560px) {
  .sll-kit .slk-cols-3 table, .sll-kit .slk-cols-3 tbody, .sll-kit .slk-cols-3 thead { display: block; width: 100%; }
  .sll-kit .slk-cols-3 tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sll-kit .slk-cols-3 th, .sll-kit .slk-cols-3 td { min-width: 0; white-space: normal; overflow-wrap: break-word; }
  .sll-kit .slk-cols-3 tr > :nth-child(n+3) { grid-column: 1 / -1; padding-top: 0; }
  .sll-kit .slk-cols-3 tr > th:nth-child(n+3) { display: none; }
  .sll-kit .slk-cols-3 tbody tr > :nth-child(-n+2) { border-bottom: 0; }
  .sll-kit .slk-cols-3.slk-quiz td.slk-blank { display: none; }
  .sll-kit .slk-cols-3.slk-quiz tbody tr > :nth-child(-n+2) { border-bottom: 1px solid var(--sll-line); }

  .sll-kit .slk-cols-4 table, .sll-kit .slk-cols-4 tbody { display: block; width: 100%; }
  .sll-kit .slk-cols-4 thead { display: none; }
  .sll-kit .slk-cols-4 tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 12px; padding: 10px 14px 12px; border-bottom: 1px solid var(--sll-line); }
  .sll-kit .slk-cols-4 tr:last-child { border-bottom: 0; }
  .sll-kit .slk-cols-4 th, .sll-kit .slk-cols-4 td { min-width: 0; padding: 4px 0; border: 0; white-space: normal; overflow-wrap: break-word; }
  .sll-kit .slk-cols-4 tbody th { grid-column: 1 / -1; padding-bottom: 2px; color: var(--sll-ink, #1A2130); font-size: 1rem; }
  .sll-kit .slk-cols-4 td:empty { display: none; }
  .sll-kit .slk-cols-4 td { font-weight: 700; color: var(--sll-accent); }
  .sll-kit .slk-cols-4 .slk-lab { display: block; font-size: .74rem; font-weight: 600; color: var(--sll-muted); letter-spacing: .02em; line-height: 1.3; }
  .sll-kit .slk-cols-4.slk-quiz td.slk-hid:not(.is-open)::after { inset: 18px 0 2px; }
  .sll-kit .slk-cols-4.slk-quiz td.slk-blank .slk-lab { visibility: visible; }
  /* row label + 2-4 answers: one header row, the person as a tinted band, the answers in aligned columns */
  .sll-kit .slk-grid thead { display: block; }
  .sll-kit .slk-grid thead tr, .sll-kit .slk-grid tbody tr { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 0 10px; }
  .sll-kit .slk-grid thead tr { display: grid; padding: 8px 14px; background: var(--sll-soft); border-bottom: 1px solid var(--sll-line); }
  .sll-kit .slk-grid thead th { padding: 0; border: 0; background: none; font-size: .92rem; font-weight: 800; line-height: 1.3; color: var(--sll-ink, #1A2130); }
  .sll-kit .slk-grid thead th:first-child { display: none; }
  .sll-kit .slk-grid tbody tr { padding: 0 14px 10px; }
  .sll-kit .slk-grid tbody th { margin: 0 -14px 6px; padding: 6px 14px; background: #F3F7F5; border-bottom: 1px solid var(--sll-line); font-size: .95rem; }
  .sll-kit .slk-grid .slk-lab { display: none; }
  .sll-kit .slk-grid td { font-size: 1.02rem; }
  .sll-kit .slk-grid.slk-quiz td.slk-hid:not(.is-open)::after { inset: 4px 0 2px; }
  /* parallel lists (-ar | -er | -ir verbs): the same columns, no band, every heading shown */
  .sll-kit .slk-grid.slk-even thead th:first-child { display: block; }
  .sll-kit .slk-grid.slk-even tbody tr { padding: 8px 14px; }
  .sll-kit .slk-grid.slk-even td { font-size: .92rem; font-weight: 600; }
}

/* ---- conjugation drill ---- */
.slk-drill { position: relative; padding: 14px 76px 14px 14px; min-height: 170px; display: flex; flex-direction: column; gap: 12px; }
.slk-drill__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.2rem; }
.slk-drill__verb, .slk-drill__who { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 14px; border-radius: 12px; background: var(--c-soft, #fff); border: 2px solid var(--c, var(--sll-accent)); }
.slk-drill__verb small { font-size: .78rem; color: var(--sll-muted); font-weight: 400; }
.slk-drill__who { min-width: 7.5em; justify-content: center; font-weight: 700; background: var(--k-sun-soft); border-color: var(--k-sun); }
.slk-drill__who.is-spin { color: #8A6100; }
.slk-drill__plus { color: var(--sll-muted); font-weight: 700; }
.slk-drill .slk-opt { font-size: 1.1rem; min-width: 6em; }
.slk-drill .slk__msg { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ---- tap-to-hear cells in tables ---- */
.sll-kit .sll-table td .sla-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; min-width: 0; margin: 0 0 0 4px; padding: 0; border: 0; border-radius: 50%; background: none; color: #7F8A85; box-shadow: none; vertical-align: middle; }
.sll-kit .sll-table td .sla-btn svg { width: 15px; height: 15px; }
.sll-kit .sll-table td .sla-btn:hover, .sll-kit .sll-table td .sla-btn.is-playing { color: var(--sll-accent); background: rgba(31, 92, 153, .1); }
.sll-kit .slk-quiz td.slk-hid:not(.is-open) .sla-btn { visibility: hidden; }

/* Phones: a table paired with a flip card must not push the page wider than the screen */
@media (max-width: 819px) { .sll-kit .sll-side { grid-template-columns: minmax(0, 1fr); } .sll-kit .sll-side__card { order: -1; } }
/* (stacked on phones, the Key rule card goes first so the table or activity beside it never tests the rule before it is shown) */

/* Wide Key rule cards flip upward (top to bottom) instead of sideways; narrow ones keep the sideways turn. */
.sll-flip.is-ready { container-type: inline-size; }
@container (min-width: 560px) {
  .sll-flip.sll-flip.is-ready .sll-flip__back { transform: rotateX(180deg); }
  .sll-flip.sll-flip.is-ready.is-flipped .sll-flip__inner { transform: rotateX(180deg); }
}

/* ---- the cast's animations (lesson-kit.js person().act): whole-figure moves run on the svg, part moves on .hat/.prop/.tail/.wing ---- */
.sll-lesson.sll-kit { overflow-x: clip; }
.slk-ch[class*=" a-"] svg { transform-origin: 50% 96%; }
.slk-ch.a-hop svg { animation: slk-a-hop .4s 3; } @keyframes slk-a-hop { 50% { transform: translateY(-14px); } }
.slk-ch.a-shake svg { animation: slk-a-shake .25s 4; } @keyframes slk-a-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.slk-ch.a-tremble svg { animation: slk-a-shake .09s 14; }
.slk-ch.a-flip svg { transform-origin: 50% 55%; animation: slk-a-flip .9s cubic-bezier(.4, 0, .4, 1); } @keyframes slk-a-flip { 50% { transform: translateY(-30px) rotate(-200deg); } 100% { transform: rotate(-360deg); } }
.slk-ch.a-twirl svg { animation: slk-a-twirl 1.2s ease-in-out; } @keyframes slk-a-twirl { 25%, 75% { transform: scaleX(-1); } }
.slk-ch.a-fall svg { animation: slk-a-fall 1.5s ease-in; } @keyframes slk-a-fall { 30%, 75% { transform: rotate(88deg) translateY(-6px); } }
.slk-ch.a-puff svg { animation: slk-a-puff .5s 2; } @keyframes slk-a-puff { 50% { transform: scale(1.2); } }
.slk-ch.a-droop svg { animation: slk-a-droop 1.4s; } @keyframes slk-a-droop { 20%, 80% { transform: scale(1.06, .86); } }
.slk-ch.a-sway svg { animation: slk-a-sway 1.6s ease-in-out; } @keyframes slk-a-sway { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.slk-ch.a-no svg { animation: slk-a-sway .5s 3; }
.slk-ch.a-nod svg { animation: slk-a-nod .35s 4; } @keyframes slk-a-nod { 50% { transform: rotate(7deg); } }
.slk-ch.a-bow svg { animation: slk-a-bow 1.4s ease-in-out; } @keyframes slk-a-bow { 30%, 65% { transform: rotate(-30deg); } }
.slk-ch.a-jig svg { animation: slk-a-jig .3s 6; } @keyframes slk-a-jig { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) translateY(-7px); } }
.slk-ch.a-moon svg { animation: slk-a-moon 1.8s linear; } @keyframes slk-a-moon { 45% { transform: translateX(-36px); } 50% { transform: translateX(-36px) scaleX(-1); } 95% { transform: scaleX(-1); } }
.slk-ch.a-side svg { animation: slk-a-side .45s 4 ease-in-out; } @keyframes slk-a-side { 25% { transform: translateX(-10px) rotate(-5deg); } 75% { transform: translateX(10px) rotate(5deg); } }
.slk-ch.a-loop svg { animation: slk-a-loop 1.5s ease-in-out; } @keyframes slk-a-loop { 25% { transform: translate(-30px, -36px) rotate(60deg); } 50% { transform: translate(0, -62px) rotate(180deg); } 75% { transform: translate(24px, -36px) rotate(300deg); } 100% { transform: rotate(360deg); } }
.slk-ch.a-hang svg { animation: slk-a-hang 1.8s ease-in-out; } @keyframes slk-a-hang { 18%, 34% { transform: rotate(200deg); } 26% { transform: rotate(165deg); } 42%, 78% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } }
.slk-ch.a-tilt svg { animation: slk-a-tilt 1.4s ease-in-out; } @keyframes slk-a-tilt { 30%, 70% { transform: rotate(-16deg); } }
.slk-ch.a-chase svg { transform-origin: 50% 78%; animation: slk-spin .45s 4 linear; }
.slk-ch.a-tap svg { animation: slk-a-tap .28s 6; } @keyframes slk-a-tap { 50% { transform: rotate(-3deg); } }
.slk-ch .hat, .slk-ch .prop, .slk-ch .tail, .slk-ch .wing { transform-box: fill-box; transform-origin: center; }
.slk-ch.a-hat .hat { animation: slk-a-hat 1.1s ease-in-out; } @keyframes slk-a-hat { 50% { transform: translateY(-40px) rotate(360deg); } 100% { transform: rotate(720deg); } }
.slk-ch.a-tip .hat { animation: slk-a-tip 1s ease-in-out; } @keyframes slk-a-tip { 40%, 60% { transform: translate(-7px, -6px) rotate(-22deg); } }
.slk-ch.a-pspin .prop { animation: slk-a-pspin 1.1s ease-in-out; } @keyframes slk-a-pspin { to { transform: rotate(720deg); } }
.slk-ch.a-ptoss .prop { animation: slk-a-ptoss 1.1s ease-in-out; } @keyframes slk-a-ptoss { 50% { transform: translateY(-44px) rotate(360deg); } 100% { transform: rotate(720deg); } }
.slk-ch.a-pdrop .prop { animation: slk-a-pdrop .35s ease-in forwards; } @keyframes slk-a-pdrop { to { transform: translate(4px, 18px) rotate(25deg); } }
.slk-ch.a-wag .tail, .slk-ch.wag .tail { transform-origin: 100% 100%; animation: slk-a-wag .13s infinite alternate; } @keyframes slk-a-wag { from { transform: rotate(-18deg); } to { transform: rotate(22deg); } }
.slk-ch.flap .wing { transform-origin: 60% 10%; animation: slk-a-flap .12s infinite alternate; } @keyframes slk-a-flap { to { transform: rotate(-55deg); } }
.slk-fx { position: absolute; left: 50%; top: 30%; z-index: 5; font-weight: 700; font-size: 16px; line-height: 1; pointer-events: none; animation: slk-rise 1.3s ease-out forwards; }
@keyframes slk-rise { from { opacity: 1; transform: translate(var(--x), 0); } to { opacity: 0; transform: translate(calc(var(--x) * 1.8), -60px) rotate(var(--r)); } }
.slk-boom { position: absolute; left: 60%; top: 18%; width: 11px; height: 20px; z-index: 7; pointer-events: none; animation: slk-boom 1.15s linear forwards; }
.slk-boom svg { width: 100%; height: 100%; overflow: visible; display: block; }
@keyframes slk-boom { 25% { transform: translate(-44px, -34px) rotate(-360deg); } 50% { transform: translate(0, -64px) rotate(-720deg); } 75% { transform: translate(40px, -34px) rotate(-1080deg); } 100% { transform: translate(0, 0) rotate(-1440deg); } }

/* Tappable characters: each plays a random one of its three tap animations (lesson-kit.js, d.tap) */
.slk-ch.slk-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.slk-who .slk-ch.slk-tap { cursor: inherit; }

/* Practice: the hanging kid after a perfect run. A tap spins him faster and faster until he flies off the top of the
   screen (slk-launch), then he drops back onto his bar (slk-drop). Wind-up on the drawing, flight on the box. */
.slk-ch.slk-launch { z-index: 30; animation: slk-launch-fly 2.3s cubic-bezier(.55, 0, .9, .4) forwards; }
.slk-ch.slk-launch svg { transform-origin: 50% 50%; animation: slk-launch-spin 2.3s cubic-bezier(.6, 0, 1, .8) forwards; }
@keyframes slk-launch-spin { from { transform: rotate(0); } to { transform: rotate(5400deg); } }
@keyframes slk-launch-fly { 0%, 50% { transform: none; } 60% { transform: translateY(6px); } 100% { transform: translate(30px, -140vh); } }
.slk-ch.slk-drop { animation: slk-drop .9s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes slk-drop { from { transform: translateY(-60vh); } to { transform: none; } }

/* A character on a perch can walk to another spot along it (lesson-kit.js, d.walk): it bobs while it moves and faces
   the way it walks. The move uses the translate property so the drawing's own animations keep working. */
.slk-ch.walking svg { transform-origin: 50% 96%; animation: slk-walk .3s ease-in-out infinite alternate; }
@keyframes slk-walk { from { transform: rotate(-6deg); } to { transform: rotate(6deg) translateY(-4px); } }

/* While a character is saying something (not a waiting hint), lift its perch above sticky bars like the accents
   bar (z-index 5), so the bubble is never hidden under them. */
.slk-perch:has(.slk-bub:not(.keep)), .slk-ch:has(> .slk-bub:not(.keep)) { z-index: 7; }

/* ---- In one sentence: the lesson in a nutshell, so it stands out ---- */
.sll-kit .sll-summary__text { position: relative; padding: 22px 24px 22px 28px; background: linear-gradient(135deg, #E3F2EC 0%, #F4FAF7 100%); border: 1px solid #CFE6DC; border-left: 7px solid var(--sll-accent); border-radius: 16px; box-shadow: 0 6px 18px rgba(14, 107, 82, .12); color: var(--sll-ink, #1A2130); font-size: 1.22rem; font-weight: 500; line-height: 1.6; }
/* em = the Spanish forms (accent green), strong = the key idea in plain words (dark, highlighted) */
.sll-kit .sll-summary__text em { font-style: normal; font-weight: 800; color: var(--sll-accent); }
.sll-kit .sll-summary__text strong { font-weight: 800; color: var(--sll-ink, #1A2130); background: linear-gradient(transparent 58%, rgba(255, 200, 60, .5) 58%); padding: 0 2px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
@media (max-width: 560px) { .sll-kit .sll-summary__text { padding: 18px 18px 18px 20px; font-size: 1.12rem; } }

/* ---- a voice on every speaker card (lesson-kit.js voiceOn): the card leaves room on top for the character ---- */
.sll-kit .slk-voiced { position: relative; margin-top: 50px; }
.sll-kit .slk-notes > .slk-voiced:first-child, .sll-kit .slk > .slk-voiced:first-child { margin-top: 50px; }
.sll-kit .slk-voiced.is-on { box-shadow: 0 0 0 2px var(--sll-accent); }
.sll-kit .slk-notes { row-gap: 0; column-gap: 10px; }
.sll-kit .slk-flip-voice, .sll-kit .sll-flip.slk-voiced > .slk-who { z-index: 3; }

/* notes as rows (situation phrases): character | speech bubble with the Spanish | use, English, note */
.slk-notes--rows { display: flex; flex-direction: column; gap: 8px; }
.sll-kit .slk-notes--rows > .slk__box, .sll-kit .slk-notes--rows > .slk-voiced:first-child { margin-top: 0; }
.slk-notes--rows > .slk__box { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; align-items: center; padding: 10px 14px 10px 10px; }
.slk-notes--rows > .slk__box > .slk-who { position: relative; right: auto; bottom: auto; grid-column: 1; grid-row: 1 / span 2; align-self: end; margin: 0 !important; justify-self: center; }
.slk-notes--rows .slk__es { grid-column: 2; justify-self: start; position: relative; background: var(--sll-soft, #E4ECF5); padding: 5px 12px; border-radius: 14px; font-size: 1.05rem; }
.slk-notes--rows .slk__es::before { content: ""; position: absolute; left: -7px; bottom: 8px; border: 7px solid transparent; border-right-color: var(--sll-soft, #E4ECF5); border-left: 0; }
.slk-notes--rows .slk-row__meta { grid-column: 2; line-height: 1.45; }
.slk-notes--rows .slk-tag { margin: 0 6px 0 0; vertical-align: 1px; font-size: .62rem; }
.slk-notes--rows .slk__en { display: inline; min-height: 0; }
.slk-notes--rows .slk__text { font-size: .9rem; color: var(--sll-muted); margin-top: 2px; }
.slk-prop { position: absolute; left: 44px; bottom: 34px; font-size: 1.15rem; line-height: 1; z-index: 3; pointer-events: none; }
.slk-notes--rows .slk-voiced.is-on .slk-prop { animation: slk-hop .36s 3; }
@media print { .slk-prop { display: none; } }
