/* ==========================================================================
   Learner hub screens: Today (dashboard), the learning path, the lesson catalogue, vocabulary decks, the practice hub.
   Loaded only by the templates that need it ({% block feature_css %}); split out of app.css, ui.css and
   kashi.css (docs/PERFORMANCE.md §7) in their original order, so the cascade is unchanged.
   ========================================================================== */

/* ---- from app.css ---- */
mark.m { background: color-mix(in srgb, var(--saffron) 38%, var(--card)); color: var(--ink); border-radius: 6px; padding: 1px 4px; }
mark.m sup { font-weight: 800; margin-inline-end: 3px; font-size: 0.7em; }
.issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.issue { border: 1px solid var(--hair); border-radius: var(--r-md); padding: 12px 14px; display: grid; gap: 6px; background: var(--paper); }
.issue p { margin: 0; }
.issue-head { display: flex; gap: 10px; align-items: center; }
/* ---- from ui.css ---- */
.hello { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.hello h1 { font-size: var(--fs-h1); }
.goal { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
.ring { inline-size: 104px; block-size: 104px; position: relative; }
.ring svg { inline-size: 100%; block-size: 100%; transform: rotate(-90deg); }
.ring .track { stroke: var(--paper-2); }
.ring .val { stroke: var(--teal-deco); stroke-linecap: round; transition: stroke-dashoffset 900ms var(--ease-out); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 700 var(--fs-lg) var(--f-display); }
.next-list { display: grid; gap: 10px; }
.next-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--hair);
  border-radius: var(--r-md); text-decoration: none; background: var(--card); }
@media (hover: hover) and (pointer: fine) { .next-item:hover { border-color: var(--indigo); } }
.next-item .t { font-weight: 700; }
.plan-days { display: grid; gap: 8px; }
.plan-day { display: grid; grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--hair); font-size: var(--fs-sm); }
.plan-day.today { border-color: var(--teal-deco); background: color-mix(in srgb, var(--teal-deco) 7%, var(--card)); }
.plan-day b { font-size: var(--fs-sm); }
.plan-day ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.plan-day li a { position: relative; display: inline-flex; align-items: center; min-block-size: 32px; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); text-decoration: none; font-size: var(--fs-xs); }
.plan-day li a::before { content: ""; position: absolute; inset: -6px 0; }
.countdown { font: 800 var(--fs-2xl) var(--f-display); color: var(--indigo); }
/* catalog --------------------------------------------------------------------- */
.unit { display: grid; gap: 10px; margin-block-end: 24px; }
.unit h2 { font-size: var(--fs-md); display: flex; gap: 8px; align-items: center; }
.lcards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .lcards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .lcards { grid-template-columns: repeat(3, 1fr); } }
.lcardx { display: grid; gap: 6px; padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--hair); background: var(--card); text-decoration: none;
  transition: transform 180ms var(--ease-out), border-color 180ms; }
@media (hover: hover) and (pointer: fine) { .lcardx:hover { transform: translateY(-2px); border-color: var(--indigo); } }
.lcardx h3 { font-size: var(--fs-base); line-height: 1.6; }
.lcardx p { color: var(--ink-2); font-size: var(--fs-sm); }
.lcardx .mini { block-size: 6px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.lcardx .mini i { display: block; block-size: 100%; background: var(--ok); }
.lcardx.done { border-color: color-mix(in srgb, var(--ok) 50%, var(--hair)); }
@media (max-width: 559px) { .lcardx { padding: 12px 14px; gap: 4px; } }
/* dashboard «پیشرفت من» (templates/learn/dashboard.html): the numbers, folded under one row; open state remembered */
.dash-more { padding: 0; overflow: hidden; }
.dash-more > summary { display: flex; align-items: center; gap: 12px; min-block-size: 60px; padding: 14px 18px; cursor: pointer; list-style: none;
  -webkit-tap-highlight-color: transparent; }
.dash-more > summary::-webkit-details-marker { display: none; }
.dash-more > summary:focus-visible { outline: 2px solid var(--indigo); outline-offset: -2px; border-radius: inherit; }
.dm-head { display: grid; gap: 2px; flex: 1; min-inline-size: 0; }
.dm-head h2 { margin: 0; }
.dm-head small { font-size: var(--fs-xs); line-height: 1.6; }
.dm-chev { inline-size: 20px; block-size: 20px; flex: none; color: var(--ink-2); transition: transform var(--dur-2) var(--spring); }
.dash-more[open] .dm-chev { transform: rotate(180deg); }
.dm-grid { display: grid; gap: 0; padding: 0 18px 8px; }
.dm-block { padding-block: 16px; border-block-start: 0.5px solid var(--sep); min-inline-size: 0; }
.dm-block h3 { margin: 0 0 12px; font-size: var(--fs-md); }
@media (min-width: 760px) { .dm-grid { grid-template-columns: 1fr 1fr; column-gap: 28px; } }
html[data-motion]:not([data-motion="0"]) .dash-more[open] .dm-grid { animation: dm-in var(--dur-3) var(--ease-std); }
@keyframes dm-in { from { opacity: 0; transform: translateY(-6px); } }
/* dashboard: the learner's study programme (learn/programmes.py) */
.prog-card { display: grid; gap: 8px; }
.prog-card h2 { display: flex; align-items: center; gap: 6px; font-size: var(--fs-lg); margin: 0; }
.prog-cta { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.prog-cta small { display: block; color: var(--ink-2); }
/* ---- from kashi.css ---- */
/* ---- learning path ------------------------------------------------------------------------------------------- */
.tile-btn, .medal-btn { display: grid; place-items: center; padding: 0; border: 0; background: none; border-radius: 50%; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.tile-btn:focus-visible, .medal-btn:focus-visible { outline: 3px solid var(--indigo); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) { .tile-btn:hover .k-face { transform: translateY(-2px); } }
.tile-btn:active .k-face, .tile-btn:active .ic { transform: translateY(7px); }
/* ---- Today (dashboard) --------------------------------------------------------------------------------------- */
.today-hero { position: relative; overflow: hidden; display: grid; gap: 16px; padding: clamp(16px, 2.2vw, 24px); border-radius: var(--r-xl);
  color: #f5f5f7; background: radial-gradient(120% 90% at 100% 0%, rgb(108 112 240 / 0.55) 0%, transparent 60%),
  radial-gradient(90% 80% at 0% 100%, rgb(34 184 171 / 0.4) 0%, transparent 65%), #111118; box-shadow: var(--e2); }
@media (min-width: 900px) { .today-hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; } }
.today-hero h1 { font-size: var(--fs-h1); color: #fff; }
.today-hero .th-sub { color: #d9d6ee; font-size: var(--fs-sm); }
.today-hero .th-sub a { color: #fff; }
.today-hero .lvl { background: rgb(255 255 255 / 0.14); color: #fff; }
.th-main { display: grid; gap: 12px; }
.continue-card { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-lg); text-decoration: none; color: inherit;
  background: rgb(255 255 255 / 0.09); border: 0; transition: transform 180ms var(--ease-out), background-color 180ms; }
@media (hover: hover) and (pointer: fine) { .continue-card:hover { background: rgb(255 255 255 / 0.13); transform: translateY(-2px); } }
.continue-card .cc-text { display: grid; gap: 2px; flex: 1; min-inline-size: 0; }
.continue-card small { color: #d9d6ee; font-size: var(--fs-xs); }
.continue-card b { font-size: var(--fs-md); line-height: 1.55; }
.mini-trail { display: flex; align-items: center; gap: 4px; text-decoration: none; color: #d9d6ee; font-size: var(--fs-xs); flex-wrap: wrap; }
.mini-trail .khatam { inline-size: 34px; }
.mini-trail .khatam.open { --tf: rgb(255 255 255 / 0.1); --ts: rgb(255 255 255 / 0.22); --tl: rgb(255 255 255 / 0.18); --ti: #d9d6ee; }
.mini-trail .dash-line { inline-size: 12px; block-size: 3px; border-radius: 4px; background: rgb(255 255 255 / 0.22); }
.mini-trail span.lbl { margin-inline-start: 8px; }
.th-goal { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 16px; border-radius: var(--r-lg); background: rgb(255 255 255 / 0.07); }
.th-goal .ring { inline-size: 128px; block-size: 128px; }
.th-goal .ring .track { stroke: rgb(255 255 255 / 0.14); }
.th-goal .ring .val { stroke: var(--tile-sun); }
.th-goal .ring b { color: #fff; font-size: var(--fs-lg); display: grid; place-content: center; line-height: 1.2; }
.th-goal .ring b small { font-size: var(--fs-2xs); font-weight: 500; color: #d9d6ee; }
.th-goal p { color: #d9d6ee; font-size: var(--fs-sm); }
.week-dots { display: flex; gap: 6px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.week-dots li { display: grid; gap: 2px; justify-items: center; font-size: var(--fs-2xs); color: #d9d6ee; }
.week-dots .khatam { inline-size: 24px; block-size: 26px; }
.week-dots li { align-content: start; }
.week-dots .khatam.open { --tf: rgb(255 255 255 / 0.08); --ts: rgb(255 255 255 / 0.2); --tl: rgb(255 255 255 / 0.12); }
.week-dots .today .khatam.open { --ts: var(--tile-sun); }
.th-stats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.th-stats span { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 999px; background: rgb(255 255 255 / 0.08); font-weight: 700; font-size: var(--fs-sm); }
.th-stats .ic { color: var(--tile-sun); }
.quick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
@media (max-width: 560px) { .qtile { padding: 10px 12px; } .qtile b { font-size: var(--fs-lg); } .qtile b.word { font-size: var(--fs-base); } .qtile span { font-size: var(--fs-xs); } }
details.week-plan > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; min-block-size: 44px; }
details.week-plan > summary::-webkit-details-marker { display: none; }
details.week-plan > summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; color: var(--indigo); }
details.week-plan[open] > summary::after { content: "–"; }
details.week-plan > summary h2 { margin: 0; }
.qtile { position: relative; display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--hair);
  text-decoration: none; overflow: hidden; transition: transform 180ms var(--ease-out), border-color 180ms; }
@media (hover: hover) and (pointer: fine) { .qtile:hover { transform: translateY(-2px); border-color: var(--indigo); } }
.qtile .ic { inline-size: 20px; block-size: 20px; color: var(--indigo); margin-block-end: 4px; }
.qtile b { font-size: var(--fs-xl); line-height: 1.25; font-variant-numeric: tabular-nums; }
.qtile span { color: var(--ink-2); font-size: var(--fs-sm); }
.qtile b.word { font-size: var(--fs-md); line-height: 1.6; }
.qtile.hot { border-color: color-mix(in srgb, var(--saffron) 60%, var(--hair)); background: linear-gradient(160deg, color-mix(in srgb, var(--saffron) 14%, var(--card)), var(--card)); }
.qtile.hot .ic { color: var(--tile-sun-ledge); }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.todo a { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: var(--r-md); min-block-size: 48px;
  border: 1px solid var(--hair); background: var(--paper); text-decoration: none; transition: border-color 160ms; }
@media (hover: hover) and (pointer: fine) { .todo a:hover { border-color: var(--indigo); } }
.todo .dot { inline-size: 30px; block-size: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: color-mix(in srgb, var(--indigo) 12%, var(--card)); color: var(--indigo); }
.todo .dot .ic { inline-size: 17px; block-size: 17px; }
.todo .t { font-weight: 600; font-size: var(--fs-sm); }
.todo .m { color: var(--ink-2); font-size: var(--fs-xs); }
/* ---- catalogue --------------------------------------------------------------------------------------------- */
.lcardx .khatam.xs { inline-size: 28px; }
.lcardx { box-shadow: 0 2px 0 var(--hair); }
.lcardx.done { background: linear-gradient(160deg, color-mix(in srgb, var(--tile-done) 8%, var(--card)), var(--card) 60%); }
.unit h2 { padding-block-end: 6px; border-block-end: 1px dashed var(--hair); }
/* ---- vocabulary decks ------------------------------------------------------------------------------------- */
.deck-jump { margin-block-end: 18px; }
.deck-group { --h: var(--indigo); display: grid; gap: 12px; margin-block-end: 28px; scroll-margin-block-start: 76px; }
.dg-phrasal { --h: #b8336a; }
.dg-academic { --h: #b4640a; }
.dg-topics { --h: #07756d; }
.dg-head { display: flex; gap: 12px; align-items: center; font-size: var(--fs-sm); }
.dg-head h2 { font-size: var(--fs-lg); }
.dg-ic { inline-size: 38px; block-size: 38px; border-radius: var(--r-md); display: grid; place-items: center; flex: none; color: #fff; background: var(--h);
  box-shadow: 0 var(--ledge) 0 color-mix(in srgb, var(--h) 60%, #000); }
.dg-ic .ic { inline-size: 20px; block-size: 20px; }
.deck-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
@media (max-width: 560px) {
  .deck-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .deckc { padding: 12px; gap: 6px; }
  .deckc h3 { font-size: var(--fs-sm); }
  .deckc .en, .deckc .tag.ok { display: none; }
  .deckc .btn { inline-size: 100%; padding-inline: 8px; gap: 4px; font-size: var(--fs-xs); }
}
.deckc { position: relative; display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--hair);
  box-shadow: 0 3px 0 color-mix(in srgb, var(--h) 18%, var(--hair)), 0 6px 0 -2px color-mix(in srgb, var(--h) 9%, var(--paper)); margin-block-end: 6px; font-size: var(--fs-sm); }
.deckc.on { border-color: color-mix(in srgb, var(--h) 50%, var(--hair)); }
.deckc h3 { font-size: var(--fs-base); line-height: 1.55; }
.deckc h3 a { text-decoration: none; }
.deckc h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.deckc form { position: relative; z-index: 1; }
.deck-meter { display: grid; gap: 4px; }
.deck-meter .bar { block-size: 6px; }
.deck-meter .bar > i { background: var(--h); }
.wordcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.wcard { display: grid; gap: 6px; align-content: start; padding: 12px 14px; border-radius: var(--r-lg); font-size: var(--fs-sm); background: var(--card); border: 1px solid var(--hair); }
.wcard.known { border-inline-start: 3px solid var(--tile-done); }
.wc-head { display: flex; gap: 8px; align-items: center; }
.wc-en { font-size: var(--fs-lg); }
.wc-fa { font-weight: 600; color: var(--teal); }
.wc-ex { padding: 6px 10px; border-radius: var(--r-sm); background: var(--paper-2); }
.wc-ex .en { display: block; }
.wc-coll { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; direction: ltr; }
.wc-coll li { padding: 1px 8px; border-radius: 999px; border: 1px solid var(--hair); font-size: var(--fs-xs); color: var(--ink-2); }
/* ---- practice hub bento -------------------------------------------------------------------------------------- */
.hub { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .hub { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.htile { --h: var(--indigo); position: relative; overflow: hidden; display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: var(--r-lg); min-block-size: 132px;
  background: var(--card); border: 1px solid var(--hair); text-decoration: none; color: var(--ink); transition: transform 200ms var(--ease-out), border-color 200ms, box-shadow 200ms; }
.htile::after { content: ""; position: absolute; inset-block-start: -36px; inset-inline-end: -36px; inline-size: 120px; block-size: 120px; border-radius: 50%;
  background: var(--lattice), color-mix(in srgb, var(--h) 16%, transparent); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .htile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--h) 60%, var(--hair)); box-shadow: var(--e2); } }
.htile .hic { position: relative; z-index: 1; inline-size: 38px; block-size: 38px; border-radius: var(--r-md); display: grid; place-items: center; color: #fff; background: var(--h);
  box-shadow: 0 var(--ledge) 0 color-mix(in srgb, var(--h) 60%, #000); margin-block-end: 6px; }
.htile .hic .ic { inline-size: 20px; block-size: 20px; }
.htile h2 { font-size: var(--fs-md); position: relative; z-index: 1; }
.htile p { color: var(--ink-2); font-size: var(--fs-sm); position: relative; z-index: 1; }
.htile .count { position: relative; z-index: 1; justify-self: start; margin-block-start: auto; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600;
  background: color-mix(in srgb, var(--h) 14%, var(--card)); color: var(--ink); }
.htile.big { grid-column: span 2; min-block-size: 184px; }
.htile.big h2 { font-size: var(--fs-lg); }
.htile .viz { position: relative; z-index: 1; block-size: 52px; display: flex; align-items: center; gap: 5px; direction: ltr; margin-block: 6px; }
.viz.wavebars i { inline-size: 4px; border-radius: 4px; background: var(--h); opacity: 0.8; }
.viz.lines { display: grid; gap: 8px; align-content: center; inline-size: 70%; }
.viz.lines i { block-size: 7px; border-radius: 4px; background: var(--hair); }
.viz.lines i.hl { background: linear-gradient(to right, color-mix(in srgb, var(--saffron) 70%, transparent) 0 55%, var(--hair) 55%); }
.htile.c-read { --h: var(--sk-reading); }
.htile.c-listen { --h: var(--sk-listening); }
.htile.c-write { --h: var(--sk-writing); }
.htile.c-speak { --h: var(--sk-speaking); }
.htile.c-place { --h: #14122b; }
.htile.c-media { --h: #8e2756; }
.htile.c-pron { --h: var(--sk-pronunciation); }
.htile.c-tech { --h: #0b7a3e; }
.htile.c-chat { --h: #2a78d6; }
.htile.c-review { --h: #c0322b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .htile.c-place { --h: #8f8ab8; } }
:root[data-theme="dark"] .htile.c-place { --h: #8f8ab8; }
@media (min-width: 900px) {
  .htile.big { grid-column: span 6; }
  .htile.mid { grid-column: span 4; }
  .htile.sm { grid-column: span 3; }
}
/* floating "back to the current tile" (bottom, end side = left in RTL), above the tab bar on phones */
.to-current { position: fixed; z-index: 50; inset-inline-end: 16px; inset-block-end: calc(16px + var(--safe-b));
  display: inline-flex; gap: 6px; align-items: center; min-block-size: 44px; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  background: var(--ink); color: var(--paper); font-weight: 600; font-size: var(--fs-sm); box-shadow: var(--shadow); }
.to-current[hidden] { display: none; }
.to-current .ic { inline-size: 18px; block-size: 18px; transition: transform 160ms var(--ease-std); }
.to-current.up .ic { transform: rotate(180deg); }
.has-tabbar .to-current { inset-block-end: calc(72px + var(--safe-b)); }
@media (min-width: 900px) { .has-tabbar .to-current { inset-block-end: 24px; } }
html[data-motion="2"] .to-current:not([hidden]), html[data-motion="3"] .to-current:not([hidden]) { animation: sheet-in 220ms var(--ease-out); }
/* ---- Today v2: one primary action, Jalali week goal with freezes, getting-started checklist ---- */
.continue-card .cc-ic { inline-size: 44px; block-size: 44px; flex: none; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--tile-sun); color: var(--on-sun); box-shadow: 0 var(--ledge) 0 var(--tile-sun-ledge); }
.continue-card .cc-ic .ic { inline-size: 22px; block-size: 22px; }
.continue-card.calm { background: rgb(255 255 255 / 0.05); }
.btn-glass { background: rgb(255 255 255 / 0.12); color: #fff; border: 1px solid rgb(255 255 255 / 0.28); }
@media (hover: hover) and (pointer: fine) { .btn-glass:hover { background: rgb(255 255 255 / 0.2); } }
.mini-trail .lbl .ic { inline-size: 14px; block-size: 14px; vertical-align: -3px; }
.th-goal-top { display: flex; gap: 14px; align-items: center; justify-content: center; inline-size: 100%; }
.th-goal .ring { inline-size: 100px; block-size: 100px; flex: none; }
.th-goal .ring.full .val { stroke: var(--tile-sun); }
.th-goal .ring b svg.ic { transform: none; }
.th-goal .ring b .ic { inline-size: 26px; block-size: 26px; color: var(--tile-sun); margin-inline: auto; stroke-width: 2.25; }
.wk-head { display: grid; gap: 4px; text-align: start; }
.wk-num { font-size: var(--fs-sm); font-weight: 600; color: #d9d6ee; line-height: 1.5; }
.wk-num span { display: block; font-size: var(--fs-xl); font-weight: 800; color: #fff; line-height: 1.2; font-variant-numeric: tabular-nums; }
.week-dots li.future { opacity: 0.55; }
.week-dots .khatam.frozen .ic { inline-size: 52%; margin-block-end: 8%; }
.th-stats .minor { font-weight: 600; background: rgb(255 255 255 / 0.05); color: #d9d6ee; }
.th-stats .minor .ic { color: #d9d6ee; }
.th-stats svg.ic { inline-size: 16px; block-size: 16px; color: var(--ice); }
.wk-goal { inline-size: 100%; text-align: start; border-block-start: 1px solid rgb(255 255 255 / 0.12); padding-block-start: 8px; }
.wk-goal summary { cursor: pointer; min-block-size: 44px; display: flex; align-items: center; color: #fff; font-weight: 600; font-size: var(--fs-sm); }
.wk-goal form { padding-block: 8px 4px; }
.wk-goal p { color: #d9d6ee; }
.chips-pick { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.chips-pick label { position: relative; }
.chips-pick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chips-pick span { display: grid; place-items: center; inline-size: 44px; block-size: 44px; border-radius: var(--r-md); font-weight: 700;
  border: 1px solid rgb(255 255 255 / 0.35); color: #fff; }
.chips-pick input:checked + span { background: var(--tile-sun); color: var(--on-sun); border-color: var(--tile-sun); }
.chips-pick input:focus-visible + span { outline: 3px solid #fff; outline-offset: 2px; }
.starter { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: rgb(255 255 255 / 0.08); }
.starter h2 { font-size: var(--fs-md); color: #fff; }
.starter .small { color: #d9d6ee; }
.starter .bar { flex: none; block-size: 8px; background: rgb(255 255 255 / 0.14); }
.starter .bar > i { background: var(--tile-sun); }
.starter .btn-sun { justify-self: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.st-row { display: flex; gap: 10px; align-items: center; min-block-size: 44px; padding: 4px 6px; border-radius: var(--r-sm); text-decoration: none; color: inherit; font-size: var(--fs-sm); }
@media (hover: hover) and (pointer: fine) { a.st-row:hover { background: rgb(127 127 127 / 0.12); } }
.st-row > .ic { margin-inline-start: auto; inline-size: 16px; block-size: 16px; }
.st-note { display: flex; gap: 4px; align-items: center; margin-block-start: 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); }
.st-note .ic { inline-size: 14px; block-size: 14px; flex: none; }
.st-dot { inline-size: 22px; block-size: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; opacity: 0.8; }
.steps li.is-done .st-dot { background: var(--tile-done); border-color: var(--tile-done); color: var(--on-done, #fff); opacity: 1; }
.steps li.is-done .st-dot .ic { inline-size: 14px; block-size: 14px; stroke-width: 2.5; }
.steps li.is-done .st-row > span:not(.st-dot) { text-decoration: line-through; text-decoration-thickness: 1px; opacity: 0.8; }
.starter-card .st-row { color: var(--ink); }
.todo li.is-done a { background: color-mix(in srgb, var(--tile-done) 7%, var(--card)); }
.todo li.is-done .dot { background: var(--tile-done); color: var(--on-done, #fff); }
.todo li.is-done .t { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.todo li.is-done .m { color: var(--teal); font-weight: 700; }
/* «قدم بعدی تو» (TOEFL learners; IELTS learners get it inside .ihp): a calm card tinted by its skill, not a dark banner */
.next-step { --h: var(--sk-reading); grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 14px 16px;
  border-radius: var(--r-lg); text-decoration: none; font-size: var(--fs-sm); color: var(--ink);
  background: color-mix(in srgb, var(--h) 7%, var(--card)); border: 1px solid color-mix(in srgb, var(--h) 22%, var(--hair)); }
.next-step.listening { --h: var(--sk-listening); }
.next-step b { color: var(--ink); font-size: var(--fs-md); }
.next-step .ns-text { display: grid; gap: 2px; flex: 1 1 240px; }
.next-step small { color: var(--ink-2); }

/* «خانه‌ی آیلتس» panel (templates/assessments/_ielts_panel.html): Soft Precision card, the same 3-9 track as /ielts/ */
.ihp { grid-column: 1 / -1; position: relative; overflow: hidden; display: grid; gap: 14px; padding: 18px; border-radius: var(--r-xl);
  background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--indigo) 12%, transparent), transparent 60%), var(--card);
  border: 1px solid var(--hair); box-shadow: var(--e1); }
.ihp::after { content: ""; position: absolute; inset-block-start: -60px; inset-inline-end: -60px; inline-size: 200px; block-size: 200px;
  border-radius: 50%; background: var(--lattice); opacity: 0.5; pointer-events: none; }
.ihp > * { position: relative; z-index: 1; }
.ihp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ihp-title { display: grid; gap: 4px; min-inline-size: 0; }
.ihp-kicker { margin: 0; display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--accent-ink); }
.ihp-kicker .ic { inline-size: 16px; block-size: 16px; }
.ihp h2 { margin: 0; font-size: var(--fs-lg); line-height: 1.5; text-wrap: balance; }
.ihp-num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; font-family: var(--f-body); }
.ihp h2 .ihp-num { color: var(--accent-ink); }
.ihp-days { flex: none; margin: 0; display: grid; justify-items: center; align-content: center; gap: 0; min-inline-size: 84px; padding: 8px 12px;
  border-radius: var(--r-md); background: var(--surface-2); text-decoration: none; color: var(--ink); text-align: center; }
.ihp-days b { font-size: var(--fs-2xl); line-height: 1.1; font-weight: 800; }
.ihp-days small { font-size: var(--fs-2xs); color: var(--ink-2); font-weight: 600; }
.ihp-set { gap: 4px; color: var(--accent-ink); }
.ihp-set .ic { inline-size: 20px; block-size: 20px; }
.ihp-set small { color: var(--accent-ink); }
.ihp-skills { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .ihp-skills { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ihp-skill { --c: var(--accent); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 8px; padding: 10px 12px 12px;
  border-radius: var(--r-md); background: var(--surface-2); }
.ihp-skill.listening { --c: #2f7fd8; }
.ihp-skill.reading { --c: var(--accent); }
.ihp-skill.writing { --c: #c2410c; }
.ihp-skill.speaking { --c: var(--teal); }
.ihp-ic { inline-size: 28px; block-size: 28px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.ihp-ic .ic { inline-size: 16px; block-size: 16px; }
.ihp-name { font-size: var(--fs-sm); font-weight: 700; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ihp-band { display: inline-flex; align-items: baseline; gap: 3px; font-size: var(--fs-md); font-weight: 800; }
.ihp-band small { font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-2); }
.ihp-track { grid-column: 1 / -1; position: relative; block-size: 8px; border-radius: 99px; background: var(--fill-q); }
.ihp-skill.ihp-empty .ihp-track { background: repeating-linear-gradient(90deg, var(--fill-q) 0 6px, transparent 6px 10px); }
.ihp-range { position: absolute; inset-block: 0; left: calc(var(--lo) * 100%); right: calc((1 - var(--hi)) * 100%); min-inline-size: 8px;
  border-radius: 99px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); }
.ihp-goal { position: absolute; inset-block: -4px; left: calc(var(--at) * 100%); inline-size: 2px; margin-left: -1px; border-radius: 2px;
  background: var(--ink); opacity: 0.7; }
.ihp-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-block-start: 12px; border-block-start: 1px solid var(--hair); }
.ihp-next { flex: 1 1 260px; display: grid; gap: 2px; margin: 0; text-decoration: none; color: var(--ink); min-inline-size: 0; }
.ihp-next small { font-size: var(--fs-xs); color: var(--ink-2); }
.ihp-next b { font-size: var(--fs-md); }
.ihp-next b .en { color: var(--accent-ink); }
@media (hover: hover) and (pointer: fine) { a.ihp-next:hover b { text-decoration: underline; text-underline-offset: 3px; } }
.ihp-open { flex: none; gap: 6px; }
.ihp-open .ic { inline-size: 16px; block-size: 16px; }
.ihp-note { margin: -4px 0 0; display: flex; gap: 6px; align-items: center; font-size: var(--fs-2xs); color: var(--ink-2); }
.ihp-note .ic { inline-size: 14px; block-size: 14px; flex: none; }
@media (max-width: 520px) {
  .ihp { padding: 14px; gap: 12px; border-radius: var(--r-lg); }
  .ihp h2 { font-size: var(--fs-md); }
  .ihp-days { min-inline-size: 70px; padding: 6px 8px; }
  .ihp-days b { font-size: var(--fs-xl); }
  .ihp-open { flex: 1 1 100%; justify-content: center; }
  /* two skills a row: name beside the icon, the band on its own line (no truncated names) */
  .ihp-skill { grid-template-columns: auto 1fr; padding: 10px 10px 12px; }
  .ihp-band { grid-column: 1 / -1; font-size: var(--fs-lg); }
}
.htile .mine { position: relative; z-index: 1; font-size: var(--fs-xs); font-weight: 600; color: var(--ink); display: flex; gap: 6px; align-items: center; }
.htile .mine .ic { inline-size: 14px; block-size: 14px; color: var(--h); }
.htile .weakest { position: relative; z-index: 1; justify-self: start; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600;
  background: var(--warning-bg); color: var(--warning-fg); }
/* `.done` is also the lesson-complete screen class in app.css (grid, centred, 24px padding): keep it off tiles and rows */
.mini-trail .lbl { white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.starter-card .steps { max-inline-size: 440px; }
/* the mini trail sits on the dark hero: locked tiles must not glow white */
.mini-trail .khatam.locked { --tf: rgb(255 255 255 / 0.06); --ts: rgb(255 255 255 / 0.16); --tl: rgb(255 255 255 / 0.1); --ti: #b6b2d1; }
.mini-trail { padding: 4px 6px; margin-inline: -6px; border-radius: var(--r-md); transition: background-color 160ms var(--ease-std); }
@media (hover: hover) and (pointer: fine) { .mini-trail:hover { background: rgb(255 255 255 / 0.06); } }
/* week-goal chips: one row of seven on every phone */
.chips-pick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.chips-pick span { inline-size: 100%; }
/* Today: tidy empty states and the recent-tests list */
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.recent-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-md);
  text-decoration: none; border: 1px solid var(--hair); background: var(--paper); transition: border-color 160ms; }
@media (hover: hover) and (pointer: fine) { .recent-list a:hover { border-color: var(--indigo); } }
.recent-list .ri { inline-size: 30px; block-size: 30px; border-radius: var(--r-sm); display: grid; place-items: center; background: color-mix(in srgb, var(--sk-reading) 12%, var(--card)); color: var(--sk-reading); }
.recent-list .ri.listening { background: color-mix(in srgb, var(--sk-listening) 12%, var(--card)); color: var(--sk-listening); }
.recent-list .ri .ic { inline-size: 16px; block-size: 16px; }
.recent-list .t { font-weight: 600; font-size: var(--fs-sm); line-height: 1.55; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-list .m { font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.weekbars.is-empty i { opacity: 0.35; }
.chart-empty { margin-block-start: -4px; }
.recent-list .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.deck-jump { position: sticky; inset-block-start: 62px; z-index: 5; box-shadow: 0 6px 16px -14px rgb(20 18 43 / 0.5); }
/* Today, desktop: the two card stacks flow as balanced columns instead of one short and one very long column */
@media (min-width: 980px) {
  .page > .dash:has(#todo-h) { display: block; columns: 2; column-gap: 12px; }
  .page > .dash:has(#todo-h) > .stack { display: contents; }
  .page > .dash:has(#todo-h) > .stack > * { break-inside: avoid; margin-block-end: 12px; inline-size: 100%; }
}
.deck-jump { mask-image: linear-gradient(to left, #000 calc(100% - 28px), transparent); padding-inline-end: 24px; }
/* sticky bars under the site header: the header is taller inside the app (status bar), so offsets include --safe-t
   (writing.css, speaking.css and tools.css carry the same fix for their own bars) */
.deck-jump { inset-block-start: calc(var(--header-h) + var(--safe-t) + 10px); }

/* Direct goal-matched practice on the dashboard and after placement. */
.quick-talk { display: grid; position: relative; isolation: isolate; overflow: hidden; gap: 12px;
  align-items: start; justify-items: start; padding: clamp(18px, 3vw, 30px);
  background: linear-gradient(110deg, var(--tint), var(--card) 75%); }
.quick-talk h2 { font-size: clamp(1.2rem, 3.5vw, 1.65rem); margin: 0; max-inline-size: 78%; text-wrap: balance; }
.quick-talk-info, .quick-talk-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: var(--fs-xs); }
.quick-talk-wave { position: absolute; inset-inline-end: clamp(12px, 4%, 36px); inset-block-start: 28%; display: flex;
  align-items: center; gap: 3px; color: var(--indigo); opacity: .37; z-index: -1; }
.quick-talk-wave i { inline-size: 4px; block-size: 12px; border-radius: 5px; background: currentColor; }
.quick-talk-wave i:nth-child(2n) { block-size: 26px; }
.quick-talk-wave i:nth-child(3n) { block-size: 38px; }
.quick-talk-wave i:nth-child(4) { block-size: 50px; }
