/* artlab: app-like dashboard and buttons */
.al-continue { display: grid; gap: 2px; padding: 18px 20px; margin: 8px 0 18px; border-radius: 16px;
  background: var(--md-primary-fg-color); color: var(--md-primary-bg-color) !important; text-decoration: none; position: relative; }
.al-continue small { opacity: .85; font-size: .75rem; }
.al-continue strong { font-size: 1.15rem; }
.al-continue .al-go { position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  background: var(--md-primary-bg-color); color: var(--md-primary-fg-color); padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .8rem; }
.al-overall { display: grid; gap: 6px; margin-bottom: 18px; font-size: .8rem; color: var(--md-default-fg-color--light); }
.al-bar { height: 8px; border-radius: 999px; background: var(--md-default-fg-color--lightest); overflow: hidden; }
.al-bar span { display: block; height: 100%; background: var(--md-primary-fg-color); border-radius: 999px; transition: width .4s; }
/* modules and lesson tiles */
.al-module { --al-c: #3f51b5; margin: 22px 0 8px; }
.al-mB { --al-c: #0f8a6c; } .al-mC { --al-c: #d85a30; } .al-mD { --al-c: #ba7517; } .al-mE { --al-c: #7f5fd0; }
.al-module-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.md-typeset .al-module-head h3 { margin: 0; font-size: 1.05rem; color: var(--al-c); }
.al-meta { font-size: .7rem; color: var(--md-default-fg-color--light); white-space: nowrap; }
.al-module .al-bar span { background: var(--al-c); }
.al-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.md-typeset .al-tile { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 128px; padding: 14px;
  border-radius: 18px; background: var(--md-default-bg-color); color: var(--md-default-fg-color); text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.08); border-top: 5px solid var(--al-c);
  transition: transform .15s ease, box-shadow .15s ease; box-sizing: border-box; }
.md-typeset a.al-tile:hover, .md-typeset a.al-tile:active { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 10px 24px rgba(0,0,0,.14); color: var(--md-default-fg-color); }
.al-tile-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem;
  background: var(--al-c); color: #fff; }
.al-tile-title { font-weight: 600; font-size: .82rem; line-height: 1.3; }
.al-chip { margin-top: auto; align-self: flex-start; font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 9px; border-radius: 999px; background: var(--md-default-fg-color--lightest); color: var(--md-default-fg-color--light); }
.al-chip-go { background: var(--al-c); color: #fff; }
.al-chip-done { background: transparent; color: var(--al-c); border: 1.5px solid var(--al-c); }
.al-tile.is-soon { opacity: .55; box-shadow: none; border: 1px dashed var(--md-default-fg-color--lighter); border-top: 5px solid var(--al-c); }
[data-md-color-scheme="slate"] .md-typeset .al-tile:not(.is-soon) { background: var(--md-code-bg-color, #1e2029); box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.al-done { margin: 1.5em 0; }
/* bigger previous / next lesson buttons */
.md-footer__link { padding-top: 1.2rem; padding-bottom: 1.4rem; }
.md-footer__title { font-size: 1rem; }
/* tidy: no underlines */
.md-typeset a.al-continue, .md-typeset a.al-continue:hover, .md-typeset a.al-continue * { text-decoration: none; color: inherit; }
.md-typeset a.al-continue { color: var(--md-primary-bg-color); }
.md-typeset a.al-continue .al-go { color: var(--md-primary-fg-color); }
/* practice log */
.md-typeset a.al-practice-link { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 4px 0 8px; border-radius: 16px;
  text-decoration: none; color: var(--md-default-fg-color); background: var(--md-default-bg-color);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.08); }
.al-pl-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem;
  background: var(--md-primary-fg-color); color: var(--md-primary-bg-color); flex: none; }
.al-practice-link strong { display: block; font-size: .85rem; }
.al-practice-link small { display: block; font-size: .7rem; color: var(--md-default-fg-color--light); }
.al-pl-arrow { margin-left: auto; font-size: 1.4rem; color: var(--md-default-fg-color--light); }
[data-md-color-scheme="slate"] .md-typeset a.al-practice-link { background: var(--md-code-bg-color, #1e2029); }
.al-photo-btn { display: block; text-align: center; padding: 14px; margin-bottom: 10px; border-radius: 14px; cursor: pointer; font-weight: 600;
  background: var(--md-default-fg-color--lightest); color: var(--md-default-fg-color); }
.al-photo-msg { text-align: center; font-size: .8rem; margin: -2px 0 10px; }
.al-empty { padding: 24px; border-radius: 16px; text-align: center; border: 1px dashed var(--md-default-fg-color--lighter); color: var(--md-default-fg-color--light); }
.al-plesson { margin: 22px 0; }
.md-typeset .al-plesson h3 { margin: 0 0 10px; font-size: 1rem; }
.al-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.al-compare figure, .al-thumb { margin: 0; }
.al-compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 14px; display: block; }
.md-typeset .al-compare figcaption, .md-typeset .al-thumb figcaption { font-style: normal; font-size: .68rem; color: var(--md-default-fg-color--light); margin-top: 4px; text-align: left; }
.al-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.al-open { padding: 0; border: 0; background: none; cursor: zoom-in; width: 100%; display: block; }
.al-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; }
.al-thumb figcaption { display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.al-del { border: 0; background: none; color: var(--md-default-fg-color--light); font-size: .65rem; cursor: pointer; padding: 4px 0; text-decoration: underline; }
.al-viewer { position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 16px; }
.al-viewer[hidden] { display: none; }
.al-viewer img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.al-close { position: absolute; top: 12px; right: 16px; font-size: 2rem; color: #fff; background: none; border: 0; cursor: pointer; }
/* lesson page sections as cards */
.md-typeset .al-sec { --al-s: var(--md-primary-fg-color); position: relative; margin: 18px 0; padding: 4px 20px 16px;
  border-radius: 18px; background: var(--md-default-bg-color); border-left: 5px solid var(--al-s);
  box-shadow: 0 1px 2px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.07); }
[data-md-color-scheme="slate"] .md-typeset .al-sec { background: var(--md-code-bg-color, #1e2029); box-shadow: 0 4px 16px rgba(0,0,0,.45); }
.md-typeset .al-sec > h2 { margin: 16px 0 8px; font-size: 1.05rem; color: var(--al-s); }
.md-typeset .al-sec-intro { border-left: 0; background: var(--md-primary-fg-color); color: var(--md-primary-bg-color); padding-top: 14px; }
.md-typeset .al-sec-intro strong { color: inherit; }
.md-typeset .al-sec-intro p { margin: 0 0 10px; }
.md-typeset .al-sec-walk  { --al-s: #3f51b5; }
.md-typeset .al-sec-need  { --al-s: #ba7517; }
.md-typeset .al-sec-diag  { --al-s: #378add; }
.md-typeset .al-sec-steps { --al-s: #3f51b5; }
.md-typeset .al-sec-drill { --al-s: #0f8a6c; }
.md-typeset .al-sec-mist  { --al-s: #d85a30; }
.md-typeset .al-sec-check { --al-s: #3b8a2e; }
.md-typeset .al-sec-kids  { --al-s: #7f5fd0; }
.md-typeset .al-sec-video { --al-s: #888780; }
.md-typeset .al-sec iframe { display: block; margin: 8px auto 4px; border: 0 !important; box-shadow: inset 0 0 0 1px var(--md-default-fg-color--lightest); }
.md-typeset .al-sec img { border-radius: 12px; }
@media (max-width: 600px) { .md-typeset .al-sec { padding: 2px 14px 12px; margin: 14px -4px; } }
[data-md-color-scheme="slate"] .md-typeset .al-sec-intro { background: var(--md-primary-fg-color); color: #fff; }
/* hide the theme's menu-order prev/next on lesson pages */
.al-lesson-page .md-footer__inner { display: none; }
/* one section at a time, one Next button (all screen sizes) */
.al-deckbar, .al-dock, .al-dk-swipe { display: none; }
.al-swipe .al-deckbar { display: block; position: sticky; top: 3rem; z-index: 3; margin: 14px -4px 0; padding: 8px 0;
  background: var(--md-default-bg-color); }
.al-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 4px; }
.al-chips::-webkit-scrollbar { display: none; }
.al-chips button { flex: none; font: inherit; font-size: .72rem; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--md-default-fg-color--lightest); background: var(--md-default-bg-color); color: var(--md-default-fg-color--light); }
.al-chips button.is-active { background: var(--md-default-fg-color); border-color: var(--md-default-fg-color); color: var(--md-default-bg-color); }
.al-chips .al-chip-all { border-style: dashed; font-weight: 500; }
.al-swipe .al-deck > .al-sec:not(.is-active) { display: none; }
.al-swipe .al-deck > .al-sec { min-height: 50vh; }
.al-swipe .al-dock { display: flex; align-items: center; gap: 12px; position: sticky; bottom: 0; z-index: 3;
  margin: 12px -4px 0; padding: 10px 4px calc(10px + env(safe-area-inset-bottom)); background: var(--md-default-bg-color);
  border-top: 1px solid var(--md-default-fg-color--lightest); }
.al-dock-back { flex: none; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer;
  border: 1px solid var(--md-default-fg-color--lighter); background: var(--md-default-bg-color); color: var(--md-default-fg-color); }
.al-dock-back:disabled { opacity: .3; cursor: default; }
.al-dock-pos { flex: none; font-size: .72rem; color: var(--md-default-fg-color--light); min-width: 2.6em; text-align: center; }
.al-dock-next { flex: 1; min-height: 48px; padding: 12px 18px; border-radius: 14px; border: 0; cursor: pointer; font: inherit;
  font-size: .85rem; font-weight: 700; background: var(--md-primary-fg-color); color: #fff; }
.al-finish { display: none; margin: 24px 0 8px; }
.al-lesson-page article:not(.al-swipe) .al-finish { display: block; }
.al-finish .al-dock-next { width: 100%; }
.md-typeset .al-dk-swipe { width: 100%; margin: 14px 0 0; padding: 12px; border-radius: 14px; cursor: pointer; font: inherit; font-size: .8rem;
  font-weight: 600; border: 1.5px dashed var(--md-primary-fg-color); background: none; color: var(--md-primary-fg-color); }
.al-lesson-page article:not(.al-swipe) .al-dk-swipe { display: block; }
.al-deckmode .md-top, .al-deckmode .md-sidebar-button__wrapper { display: none !important; }
.al-photo-btn { font-size: .8rem; }
@keyframes al-in-r { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes al-in-l { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
.al-from-right { animation: al-in-r .28s ease; }
.al-from-left { animation: al-in-l .28s ease; }
@media (prefers-reduced-motion: reduce) { .al-from-right, .al-from-left { animation: none; } }
