/* ================================================================
   Practice layout — styles for lq-practice-layout.js (the Practice /
   Your progress / Quizzes / What's next blocks). Generated from
   the noun-sample.html design study (retired 2026-09-13, kept in _backup).
   ================================================================ */
/* ---- base card, header and link styles (shared with the sample sheet) ---- */

.nsm-page { padding-bottom: 60px; line-height: 1.6; }   /* the lesson body rhythm */
.nsm-page b { font-weight: 600; }               /* typography.css caps bold at 600 */
.nsm-head h2, .nsm-cat b, .nsm-fam .top b, .nsm-type > b, .nsm-w .k, .nsm-mini h3, .nsm-pcard b, .nsm-nx b, .nsm-fold > summary, .nsm-video .cap b, .nsm-hero h1 { font-weight: 700; }

/* ---------- panels (cards) ---------- */
.nsm-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px;
            box-shadow: 0 6px 20px -14px rgba(124,58,237,.25); }
.nsm-panel + .nsm-panel, .nsm-row + .nsm-panel, .nsm-panel + .nsm-row, .nsm-row + .nsm-row { margin-top: 14px; }

.nsm-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.nsm-head .l { display: flex; align-items: center; gap: 11px; min-width: 0; }
.nsm-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 1.05rem; font-weight: 700; flex: none;
         color: var(--module); background: color-mix(in srgb, var(--module) 12%, transparent); }
.nsm-head h2 { font-size: 1.5rem; font-weight: 700; margin: 0; line-height: 1.33; }
.nsm-head p { margin: 2px 0 0; font-size: .9375rem; color: var(--text-muted); }
.nsm-head .step { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
                 color: var(--module); background: color-mix(in srgb, var(--module) 10%, transparent);
                 border-radius: 999px; padding: 2px 9px; margin-bottom: 4px; }
.nsm-link { font-size: .9375rem; font-weight: 600; color: var(--module); text-decoration: none; white-space: nowrap; flex: none; }
.nsm-link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.nsm-link:hover { text-decoration-color: currentColor; color: #6d28d9; }

/* ---------- every hover eases with the same curve ----------
   One rule for all interactive pieces, so no state change ever snaps. */
.nsm-page a, .nsm-page button, .nsm-page summary, .nsm-tab, .nsm-nx, .nsm-back, .nsm-flow a, .nsm-crumb a,
.nsm-fam summary, .nsm-fold > summary, .nsm-type, .nsm-cat, .nsm-ex, .nsm-rule, .nsm-w, .nsm-stat, .nsm-chip,
.nsm-mimi, .nsm-bub, .nsm-video, .nsm-video img, .nsm-video .play {
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .3s ease,
              transform .3s cubic-bezier(.22,.61,.36,1), opacity .25s ease, filter .3s ease, text-decoration-color .25s ease;
}
.nsm-practice { padding-bottom: 0; }
.nsm-practice > .nsm-panel + .nsm-panel, .nsm-practice > .nsm-row + .nsm-panel { margin-top: 14px; }
.nsm-practice .nsm-qpanel .qContent { margin-top: 4px; }
#nsPracticeRow, #nsQuizPanel, #nsGame { scroll-margin-top: 84px; }
               /* typography.css caps bold at 600 */
.nsm-head h2, .nsm-cat b, .nsm-fam .top b, .nsm-type > b, .nsm-w .k, .nsm-mini h3, .nsm-pcard b, .nsm-nx b, .nsm-fold > summary, .nsm-video .cap b, .nsm-hero h1 { font-weight: 700; }
.nsm-panel + .nsm-panel, .nsm-row + .nsm-panel, .nsm-panel + .nsm-row, .nsm-row + .nsm-row { margin-top: 14px; }
.nsm-row { display: grid; gap: 14px; }
.nsm-row.c2 { grid-template-columns: 1.55fr 1fr; }
.nsm-row.c2b { grid-template-columns: 1fr 1fr; }
.nsm-row.c3 { grid-template-columns: 1.6fr 1fr; align-items: stretch; }
.nsm-row.c3 > .nsm-panel { display: flex; flex-direction: column; }
.nsm-row.c3 .nsm-pcards, .nsm-row.c3 .nsm-prog { flex: 1; }
/* icon, title and description start at the top; every button sits on the same bottom line */
/* every card has the same block (icon, one-line title, two-line description, button), centred as one unit */
.nsm-pcard { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nsm-pcard > span:not(.em) { line-height: 1.55; min-height: 3.1em; }   /* exactly two lines, so titles and buttons line up */
.nsm-pcard .em { height: 2.2rem; }
.nsm-pcard > b { white-space: nowrap; }
@media (max-width: 860px) { .nsm-row.c2, .nsm-row.c2b, .nsm-row.c3 { grid-template-columns: 1fr; } }
.nsm-mini { display: flex; flex-direction: column; }
.nsm-mini .nsm-stack { flex: 1; grid-auto-rows: 1fr; }
.nsm-mini .nsm-chips { flex: 1; align-content: center; }
.nsm-mini .g-tblwrap { flex: 1; display: flex; flex-direction: column; }
.nsm-mini .g-tblwrap table { flex: 1; }
.nsm-mini { border-radius: 16px; background: var(--bg-soft); padding: 12px 14px; font-size: .9375rem; }
.nsm-mini h3 { font-size: 1.0625rem; font-weight: 700; margin: 0 0 8px; }
.nsm-mini .g-tbl { font-size: .9375rem; }
.nsm-mini .try { background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.nsm-mini .try > b { display: block; margin-bottom: 3px; }
.nsm-mini .try span { display: block; font-size: .9375rem; color: var(--text-muted); }

/* ---------- practice ---------- */
.nsm-pcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 640px) { .nsm-pcards { grid-template-columns: 1fr; } }
.nsm-pcard { border-radius: 16px; padding: 16px 12px 14px; text-align: center; background: var(--tint); cursor: pointer;
             border: 1.5px solid transparent; transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .3s ease; }
.nsm-pcard:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px var(--module-shadow); border-color: color-mix(in srgb, var(--module) 25%, transparent); }
.nsm-pcard:focus-visible { outline: none; border-color: var(--module); box-shadow: 0 0 0 4px color-mix(in srgb, var(--module) 18%, transparent); }
.nsm-pcard.is-pressed { transform: scale(.97); border-color: var(--module); box-shadow: 0 0 0 5px color-mix(in srgb, var(--module) 16%, transparent); transition-duration: .16s; }
.nsm-pcard button, .nsm-pcard a { transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
.nsm-pcard.is-pressed button { background: var(--module); color: #fff; border-color: var(--module); }
.nsm-pcard .em { font-size: 2.2rem; line-height: 1; margin-bottom: 8px; display: block; }
.nsm-pcard b { display: block; font-size: 1.0625rem; }
.nsm-pcard > span:not(.em) { display: block; font-size: .875rem; color: var(--text-muted); margin: 2px 0 10px; }
.nsm-pcard button, .nsm-pcard a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border);
                               background: #fff; color: var(--module); font-family: inherit; font-weight: 700; font-size: .9375rem; cursor: pointer; text-decoration: none; transition: .15s; }
.nsm-pcard button:hover, .nsm-pcard a:hover { transform: translateY(-1px); box-shadow: 0 8px 16px -10px var(--module-shadow); }

.nsm-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.nsm-tab { transition: background .25s ease, color .25s ease, border-color .25s ease; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); font-family: inherit;
          font-size: .9375rem; font-weight: 600; color: var(--text); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.nsm-tab .xp { font-size: .8125rem; color: #c08415; background: rgba(251,191,36,.18); border-radius: 999px; padding: 1px 6px; }
.nsm-tab.is-on { background: var(--module); border-color: var(--module); color: #fff; }
.nsm-tab.is-on .xp { background: rgba(255,255,255,.25); color: #fff; }
.nsm-tab.done::after { content: "✓"; font-weight: 700; }
.nsm-qpanel { border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; background: var(--surface); }
.nsm-qpanel[hidden] { display: none; }
.nsm-qpanel h4 { margin: 0 0 10px; font-size: 1.1875rem; font-weight: 700; }

/* ---------- progress ---------- */
.nsm-prog { display: flex; flex-direction: column; gap: 12px; }
.nsm-prog .nsm-mimi { margin-top: auto; }
.nsm-ring { display: flex; align-items: center; gap: 16px; }
.nsm-ring svg { width: 92px; height: 92px; flex: none; transform: rotate(-90deg); }
.nsm-ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.nsm-ring .tr { stroke: var(--bg-soft); }
.nsm-ring .fg { stroke: url(#nsGrad); stroke-dasharray: 251.3; stroke-dashoffset: 251.3; transition: stroke-dashoffset .5s; }
.nsm-ring .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.1875rem; white-space: nowrap; }
.nsm-ring .rw { position: relative; width: 92px; height: 92px; flex: none; }
.nsm-ring b { display: block; font-size: 1.0625rem; }
.nsm-ring span { color: var(--text-muted); font-size: .9375rem; }
.nsm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nsm-stat { text-align: center; padding: 10px 6px; border-radius: 12px; background: var(--bg-soft); }
.nsm-stat b { display: block; font-size: 1.375rem; color: var(--module); line-height: 1.1; }
.nsm-stat span { font-size: .8125rem; color: var(--text-muted); line-height: 1.25; display: block; margin-top: 2px; }

/* ---------- what's next ---------- */
.nsm-next { display: grid; grid-template-columns: 1.1fr repeat(4, 1fr) 1.1fr; gap: 8px; }
@media (max-width: 960px) { .nsm-next { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .nsm-next { grid-template-columns: 1fr 1fr; } }
.nsm-nx { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text); min-height: 60px; transition: .15s; }
.nsm-nx:hover { border-color: var(--module); transform: translateY(-2px); box-shadow: 0 10px 22px -14px var(--module-shadow); }
.nsm-nx .em { font-size: 1.35rem; flex: none; }
.nsm-nx b { display: block; font-size: .9375rem; }
.nsm-nx span { display: block; font-size: .8125rem; color: var(--text-muted); }
.nsm-nx.prev, .nsm-nx.nextp { background: var(--bg-soft); }
.nsm-nx.nextp { justify-content: flex-end; text-align: right; }
.nsm-nx.nextp .em { order: 2; }
.nsm-game-slot > section.max-w-6xl { max-width: none; padding: 0; margin-bottom: 0 !important; }
.nsm-game-slot .ns-wrap { max-width: none; }
.nsm-game-slot > section .mb-6 { margin-bottom: 10px; }
.nsm-mini p { margin: 0 0 4px; }
.nsm-mimi { cursor: pointer; }
.nsm-mimi div { margin-top: 4px; color: var(--text-muted); }

/* the picture game: the card is full width here, so let the picture use it
   (80% of the card on desktop; the live lesson keeps its 260px version) */
.nsm-game-slot .ns-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px 28px; align-items: center; }
.nsm-game-slot .ns-q { grid-column: 1 / -1; }
.nsm-game-slot .ns-pic { grid-row: 2 / span 2; max-width: 100%; width: 80%; justify-self: center; }
.nsm-game-slot .ns-word { grid-column: 2; align-self: end; margin: 0; }
.nsm-game-slot .ns-opts { grid-column: 2; align-self: start; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nsm-game-slot .ns-fb, .nsm-game-slot .ns-actions, .nsm-game-slot .ns-next { grid-column: 1 / -1; }
.nsm-game-slot .ns-fb:empty, .nsm-game-slot .ns-actions:has(> [hidden]) { display: none; }
.nsm-game-slot .ns-fb { min-height: 0; margin: 0; }
@media (max-width: 860px) {
  .nsm-game-slot .ns-card { display: block; }
  .nsm-game-slot .ns-pic { width: 80%; max-width: 420px; }
}
@keyframes nsmEnter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nsmArrive { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--module) 35%, transparent); }
                       100% { box-shadow: 0 0 0 14px transparent; } }
.nsm-qpanel.nsm-enter { animation: nsmEnter .4s cubic-bezier(.22,.61,.36,1) both; }
.nsm-arrive { animation: nsmArrive .9s cubic-bezier(.22,.61,.36,1) both; }
.nsm-back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.nsm-back:hover { text-decoration: none; border-color: var(--module); background: var(--bg-soft); }
.nsm-backrow { display: flex; justify-content: flex-end; margin-top: 12px; }
@media (prefers-reduced-motion: reduce) {
  .nsm-pcard, .nsm-pcard button, .nsm-qpanel, .nsm-arrive { transition: none !important; animation: none !important; }
  .nsm-pcard:hover { transform: none; }
}

/* ---------- every hover eases with the same curve ----------
   One rule for all interactive pieces, so no state change ever snaps. */
.nsm-page a, .nsm-page button, .nsm-page summary, .nsm-tab, .nsm-nx, .nsm-back, .nsm-flow a, .nsm-crumb a,
.nsm-fam summary, .nsm-fold > summary, .nsm-type, .nsm-cat, .nsm-ex, .nsm-rule, .nsm-w, .nsm-stat, .nsm-chip,
.nsm-mimi, .nsm-bub, .nsm-video, .nsm-video img, .nsm-video .play {
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .3s ease,
              transform .3s cubic-bezier(.22,.61,.36,1), opacity .25s ease, filter .3s ease, text-decoration-color .25s ease;
}
.nsm-tab:hover:not(.is-on) { border-color: var(--module); color: var(--module); }
.nsm-back:hover { transform: translateY(-1px); }
.nsm-cat:hover, .nsm-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -14px var(--module-shadow); }
.nsm-mimi:hover { background: color-mix(in srgb, var(--module) 8%, var(--bg-soft)); }
/* the shared quiz engine and game: give their options the same easing */
.nsm-qpanel .opt, .nsm-qpanel button, .nsm-qpanel .match-item, .nsm-qpanel .word-chip, .nsm-qpanel .tile,
.nsm-game-slot .ns-opt, .nsm-game-slot .ns-next, .nsm-game-slot .ns-again, .nsm-game-slot .ns-redo, .nsm-game-slot .ns-spk {
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, box-shadow .3s ease,
              transform .3s cubic-bezier(.22,.61,.36,1), opacity .25s ease;
}
@media (prefers-reduced-motion: reduce) {
  .nsm-page *, .nsm-page *::before, .nsm-page *::after { transition: none !important; animation: none !important; }
  .nsm-cat:hover, .nsm-stat:hover, .nsm-bub:hover, .nsm-flow a:hover, .nsm-nx:hover, .nsm-back:hover, .nsm-play:hover { transform: none; }
}

.nsm-row > .nsm-panel { margin-top: 0; }   /* siblings inside a row sit level */
.nsm-stat b em { font-style: normal; }

#nsQuizPanel[hidden], #nsGame[hidden] { display: none; }   /* one activity at a time */

/* what's next: as many equal columns as there are links (no empty slot) */
.nsm-practice .nsm-next { display: flex; flex-wrap: wrap; }
.nsm-practice .nsm-nx { flex: 1 1 150px; }

/* Mimi's tip: the sentence in <q> keeps plain straight quotes */
.nsm-mimi q { quotes: '"' '"'; }
.nsm-mimi q::before { content: open-quote; }
.nsm-mimi q::after { content: close-quote; }

/* phone: the head's text column must not be squeezed by the link on its right */
@media (max-width: 640px) {
  .nsm-head { flex-wrap: wrap; }
  .nsm-head .l { flex: 1 1 100%; }
  .nsm-head > a, .nsm-head > .nsm-link { flex: 0 0 auto; margin-left: 55px; }
}

