/* =====================================================================
   Premium polish layer — loads after base/platform/templates.
   Purely additive and token-driven, so it adapts to every design
   template, light/dark, and RTL. Goal: make the platform feel more
   premium, easier to read, and more motivating to learn in — depth,
   soft brand light, rewarding progress, and calm micro-motion.
   Nothing here redefines a template's palette or its scoped rules.
   ===================================================================== */

:root {
  --grad-brand: linear-gradient(135deg, var(--brand), var(--brand-2));
  --glow-brand: color-mix(in srgb, var(--brand) 42%, transparent);
  --lift-shadow: 0 14px 36px color-mix(in srgb, var(--ink) 12%, transparent);
  --hairline: color-mix(in srgb, var(--brand) 22%, var(--line));
}

/* ---- Depth: a soft brand light behind everything (both themes) ---- */
body {
  background:
    radial-gradient(1100px 560px at 100% -8%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 60%),
    radial-gradient(900px 480px at -8% 108%, color-mix(in srgb, var(--brand-2) 6%, transparent), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* ---- Calm, consistent micro-motion on things that respond ---- */
.card, .tcard, .stat, .comp, .mini-row, .chip, .btn, .continue-card,
.role-card, .kpi { transition: transform .18s ease, box-shadow .18s ease,
  border-color .18s ease, background-color .18s ease, filter .18s ease; }
html { scroll-behavior: smooth; }

/* ---- Cards: a touch more depth, and a lift when they're a link ---- */
.card { box-shadow: var(--shadow); }
a.tcard:hover, a.comp:hover, a.mini-row:hover, a.role-card:hover {
  transform: translateY(-3px);
  border-color: var(--hairline);
  box-shadow: var(--lift-shadow);
}
.comp, .mini-row { border-radius: var(--radius-sm); }

/* ---- Overview stat cards: gradient numerals + a fine top accent ---- */
.stat { position: relative; overflow: hidden; }
.stat::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: var(--grad-brand); opacity: .95;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--lift-shadow); }
.stat .stat-num, .kpi b, .ring b {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Progress: make momentum feel rewarding ---- */
.bar { height: 10px; box-shadow: inset 0 1px 2px color-mix(in srgb, var(--ink) 8%, transparent); }
.bar-fill {
  background: var(--grad-brand);
  box-shadow: 0 0 10px var(--glow-brand);
  min-width: 0;
}
/* a slow sheen travelling across an in-progress bar */
@media (prefers-reduced-motion: no-preference) {
  .bar-fill::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
    transform: translateX(-100%);
    animation: prg-sheen 2.6s ease-in-out infinite;
  }
  .bar-fill { position: relative; overflow: hidden; }
  @keyframes prg-sheen { 0% { transform: translateX(-100%);} 55%,100% { transform: translateX(100%);} }
}

/* ---- The "start here / continue" hero: premium, inviting ---- */
:root:not([data-buttons="outline"]) .continue-card {
  position: relative; overflow: hidden;
  box-shadow: 0 12px 34px color-mix(in srgb, var(--brand) 30%, transparent);
}
:root:not([data-buttons="outline"]) .continue-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(520px 200px at 100% 0%, rgba(255,255,255,.20), transparent 62%),
    radial-gradient(360px 200px at 0% 120%, rgba(255,255,255,.10), transparent 60%);
}
.continue-card > * { position: relative; z-index: 1; }
:root:not([data-buttons="outline"]) .continue-card .cc-go {
  background: rgba(255,255,255,.16); border-radius: 999px;
  padding-inline: 16px; backdrop-filter: blur(2px);
  transition: background-color .18s ease, gap .18s ease;
}
:root:not([data-buttons="outline"]) .continue-card:hover .cc-go { background: rgba(255,255,255,.26); gap: 12px; }

/* ---- Buttons: refined weight, glow and press ---- */
.btn { letter-spacing: .2px; }
.btn-primary { box-shadow: 0 6px 18px var(--glow-brand); }
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 12px 28px var(--glow-brand); }
.btn:active { transform: translateY(0) scale(.99); }
.btn-ghost:hover {
  border-color: var(--hairline);
  background: color-mix(in srgb, var(--brand) 7%, var(--bg-elev));
}
.btn.done-state, .continue-card.done { box-shadow: 0 6px 18px color-mix(in srgb, var(--ok) 30%, transparent); }

/* ---- Chips & badges: a little life ---- */
.chip:hover { border-color: var(--hairline); color: var(--ink); }

/* ---- Section headings: a small brand tick before big section titles ---- */
h2.h2 { position: relative; }

/* ---- Kicker text: quietly premium ---- */
.page-kicker, .cc-kicker, .tc-kicker { letter-spacing: .8px; }

/* ---- Respect reduced-motion: kill transforms & the sheen ---- */
@media (prefers-reduced-motion: reduce) {
  .card, .tcard, .stat, .comp, .mini-row, .chip, .btn, .continue-card, .role-card, .kpi { transition: none; }
  a.tcard:hover, a.comp:hover, a.mini-row:hover, a.role-card:hover, .stat:hover, .btn:hover, .btn:active { transform: none; }
  .bar-fill::after { display: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   Motivating moments — celebration on a win + richer progress labels.
   ===================================================================== */

/* ---- Confetti burst (spawned by app.js celebrate()) ---- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-layer i {
  position: absolute; top: -12px; display: block; opacity: 0;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(.25,.6,.35,1); animation-fill-mode: forwards;
}
@keyframes confetti-fall {
  0%   { opacity: 0; transform: translateY(-10px) rotate(0deg); }
  8%   { opacity: 1; }
  100% { opacity: .9; transform: translateY(102vh) rotate(var(--rot, 360deg)); }
}

/* ---- A satisfying pop + glow when a checkpoint/exam is passed ---- */
@media (prefers-reduced-motion: no-preference) {
  .quiz-result.pass .score-ring { animation: score-pop .6s cubic-bezier(.2,1.3,.4,1) both; }
  .quiz-result.pass .pass-badge { animation: badge-rise .5s ease .12s both; }
  @keyframes score-pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
  @keyframes badge-rise { 0% { transform: translateY(8px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
}
.quiz-result.pass .score-ring { box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 16%, transparent), 0 10px 30px color-mix(in srgb, var(--ok) 30%, transparent); }

/* ---- Progress bars: show momentum with a subtle percent-driven feel ---- */
.tcard .tc-meta { font-weight: 600; }
.bar[data-pct]::after { content: attr(data-pct) "%"; }

/* =====================================================================
   Tabs, minimal icons & a calmer, more comfortable feel.
   ===================================================================== */

/* ---- Sidebar nav: elegant, roomy tabs with a slim accent ---- */
.nav { padding: 10px 12px 22px; }
.nav-group-title { padding: 18px 12px 8px; letter-spacing: 1.1px; color: color-mix(in srgb, var(--ink-mute) 90%, transparent); }
.nav-item { padding: 11px 12px; gap: 11px; border-radius: 12px; position: relative;
  transition: background-color .16s ease, color .16s ease; }
.nav-item:hover { background: color-mix(in srgb, var(--brand) 6%, var(--bg-soft)); color: var(--ink); }
.nav-item.active { background: color-mix(in srgb, var(--brand) 9%, transparent); color: var(--brand-ink); font-weight: 600; }
:root[data-theme="dark"] .nav-item.active { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--ink); }
.nav-item.active::before {
  content: ""; position: absolute; inset-inline-start: 3px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 999px; background: var(--grad-brand);
}
.nav-item .ni-num { border-radius: 8px; background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink-mute); font-weight: 600; }
.nav-item.active .ni-num { background: var(--grad-brand); color: #fff; box-shadow: 0 2px 8px var(--glow-brand); }

/* ---- Stepper tabs (top-strip layout): calmer, gradient active ---- */
.stepper .step .step-n { box-shadow: none; }
.stepper .step.active .step-n { background: var(--grad-brand); box-shadow: 0 3px 10px var(--glow-brand); }
.stepper .step.done .step-n { background: var(--ok); }

/* ---- Minimal, quiet icons ---- */
/* locks are the most repeated glyph — make them soft, small and monochrome */
.nav-item .ni-lock, .jstep .step-lock, .lock-ico { opacity: .4; font-size: .8rem; filter: grayscale(1); }
.nav-item .ni-check { font-size: .82rem; opacity: .9; }
/* decorative emoji on cards/badges: keep them, just quieter and smaller */
.tc-icon, .mr-ico { font-size: 1.35rem; opacity: .8; }
.role-badge .rb-icon { opacity: .9; }

/* ---- Top bar: lighter, more elegant ---- */
.topbar { border-bottom-color: color-mix(in srgb, var(--line) 65%, transparent); }
.sidebar { border-inline-end-color: color-mix(in srgb, var(--line) 70%, transparent); }
.sidebar-head { border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }

/* ---- Comfort: more air and calmer reading ---- */
p.para { line-height: 1.72; }
.callout p { line-height: 1.7; }
.card { border-color: color-mix(in srgb, var(--line) 82%, transparent); }
.h2, h2.h2 { letter-spacing: -.2px; }
.page-title { letter-spacing: -.5px; }

/* softer crumb + gentle separators everywhere */
.crumb { font-weight: 500; }

/* ---- Minimal heading icons: desaturate the decorative emoji that lead
   section titles, while the (low-saturation) heading text stays intact.
   This turns loud colour emoji into quiet, refined monochrome glyphs. ---- */
h2.h2 { filter: grayscale(.6) opacity(.92); }
.page-title { filter: grayscale(.5); }
.tc-icon, .mr-ico, .role-badge .rb-icon, .comp-name { filter: grayscale(.4); }

/* =====================================================================
   Admin — organised, premium tab groups.
   ===================================================================== */
.admin-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  border-bottom: none; margin-bottom: 24px; }
.atg { display: flex; align-items: center; gap: 9px; }
.atg + .atg { border-inline-start: 1px solid var(--line); padding-inline-start: 14px; }
.atg-label { font-size: .64rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-mute); white-space: nowrap; }
.atg-links { display: flex; flex-wrap: wrap; gap: 4px; }
.admin-tabs a { border: 0; border-radius: 999px; padding: 7px 14px; font-size: .86rem;
  font-weight: 600; color: var(--ink-soft); background: transparent; white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease; }
.admin-tabs a:hover { background: color-mix(in srgb, var(--brand) 8%, var(--bg-soft)); color: var(--ink); }
.admin-tabs a.active { background: var(--grad-brand); color: #fff; box-shadow: 0 3px 12px var(--glow-brand); }

/* =====================================================================
   Dark mode: brighter, easier-to-read text + clearer block separation.
   ===================================================================== */
:root[data-theme="dark"] {
  --ink:       #f0f3fb;
  --ink-soft:  #c7d0e6;   /* was dimmer — brighter secondary text */
  --ink-mute:  #97a4c6;   /* brighter muted labels */
  --line:      #2e3a58;   /* clearer separators so blocks read as blocks */
  --line-strong:#3c4d72;
  --bg-soft:   #1a2236;
}
/* give dark blocks a touch of premium depth and a defined edge */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .tcard,
:root[data-theme="dark"] .stat,
:root[data-theme="dark"] .comp,
:root[data-theme="dark"] .mini-row {
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-elev) 92%, #ffffff 8%), var(--bg-elev));
  border-color: color-mix(in srgb, var(--line) 100%, transparent);
}
:root[data-theme="dark"] .callout { background: color-mix(in srgb, var(--bg-elev) 80%, #ffffff 4%); }
:root[data-theme="dark"] .callout.principle { background: color-mix(in srgb, var(--accent) 18%, transparent); }
:root[data-theme="dark"] .callout.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); }
:root[data-theme="dark"] .callout p { color: var(--ink); }
/* code/inline emphasis and table rows read a bit stronger in dark */
:root[data-theme="dark"] .table th { color: var(--ink); }
:root[data-theme="dark"] .table td { color: var(--ink-soft); }

/* =====================================================================
   Blocks: a little more premium in both themes.
   ===================================================================== */
.card { border-radius: var(--radius); }
.stat, .kpi { border-radius: var(--radius-sm); }
.callout { border-inline-start-width: 4px; }
/* a soft top highlight on elevated cards (very subtle in light, gentle in dark) */
.stat, .tcard { position: relative; }

/* =====================================================================
   Even more premium: smaller, simpler, minimal icons + finer detailing.
   ===================================================================== */

/* ---- Block & badge icons: smaller, quieter, uniform ---- */
.tc-icon, .mr-ico { font-size: 1.05rem; opacity: .55; filter: grayscale(1); }
.role-badge .rb-icon { font-size: 1rem; opacity: .85; filter: none; }
.kpi .k, .ring-lbl { letter-spacing: .3px; }
/* admin section-card icons (first child of the card) — minimal */
.dash-cols .card > :first-child:not(h1):not(h2):not(h3):not(p) { opacity: .5; }

/* ---- Section-heading emoji: fully minimal monochrome.
   grayscale(1) desaturates the colour emoji to quiet glyphs while the
   (already low-saturation) heading text stays dark and readable — so we do
   NOT reduce opacity here, which would fade emoji-less headings too. ---- */
h2.h2 { filter: grayscale(1); font-weight: 750; }
.page-title { filter: grayscale(1); }

/* ---- Tab icons: smaller, simpler chips ---- */
.nav-item { gap: 10px; }
.nav-item .ni-num { width: 21px; height: 21px; font-size: .72rem; border-radius: 7px; }
.nav-item .ni-check { font-size: .78rem; opacity: .8; }
.nav-item .ni-lock { opacity: .32; font-size: .74rem; }
.stepper .step .step-n { font-weight: 650; }

/* ---- Finer premium detailing ---- */
.stat::before { height: 2px; opacity: .8; }                 /* thinner accent */
.card, .tcard { border-radius: calc(var(--radius) - 2px); }
.callout { border-radius: calc(var(--radius) - 2px); }
.chip { font-weight: 550; }
.badge { letter-spacing: .2px; }
/* soften the big brand wash a touch more for a calmer, upmarket ground */
body { background:
  radial-gradient(1100px 560px at 100% -8%, color-mix(in srgb, var(--brand) 6%, transparent), transparent 60%),
  radial-gradient(900px 480px at -8% 108%, color-mix(in srgb, var(--brand-2) 5%, transparent), transparent 55%),
  var(--bg); }

/* lighter, more refined shadows overall */
:root { --lift-shadow: 0 10px 30px color-mix(in srgb, var(--ink) 10%, transparent); }

/* =====================================================================
   Tasteful colour layer — a small, calm palette so the platform reads
   premium and alive rather than black-and-white. Brand stays primary;
   these hues appear only where they carry meaning (callouts, states,
   completion, quiet icon tint). Restrained on purpose: soft washes,
   coloured accents, never loud fills. Token-driven + theme-aware.
   ===================================================================== */
:root {
  --c-info:      var(--brand);
  --c-principle: #6d5ef0;     /* a refined indigo, distinct from brand blue */
  --c-success:   var(--ok);
  --c-warn:      var(--warn);
  --c-danger:    var(--danger);
  --c-gold:      var(--gold);
}
:root[data-theme="dark"] {
  --c-principle: #9b8cff;     /* brighter indigo for dark ground */
}

/* ---- Callouts: soft tinted wash + coloured accent bar + coloured label.
   Each variant carries its own quiet hue, so a page of blocks looks
   composed rather than monochrome. ---- */
.callout {
  border-inline-start-width: 4px;
  background: color-mix(in srgb, var(--c-info) 7%, var(--bg-elev));
  border-color: color-mix(in srgb, var(--c-info) 55%, var(--line));
}
.callout .callout-label { color: color-mix(in srgb, var(--c-info) 72%, var(--ink)); }

.callout.principle {
  background: color-mix(in srgb, var(--c-principle) 9%, var(--bg-elev));
  border-color: var(--c-principle);
}
.callout.principle .callout-label { color: color-mix(in srgb, var(--c-principle) 72%, var(--ink)); }

.callout.info {
  background: color-mix(in srgb, var(--c-info) 9%, var(--bg-elev));
  border-color: var(--c-info);
}
.callout.info .callout-label { color: color-mix(in srgb, var(--c-info) 70%, var(--ink)); }

.callout.warn {
  background: color-mix(in srgb, var(--c-warn) 12%, var(--bg-elev));
  border-color: var(--c-warn);
}
.callout.warn .callout-label { color: color-mix(in srgb, var(--c-warn) 76%, var(--ink)); }

.callout.success, .callout.good, .callout.ok {
  background: color-mix(in srgb, var(--c-success) 11%, var(--bg-elev));
  border-color: var(--c-success);
}
.callout.success .callout-label, .callout.good .callout-label, .callout.ok .callout-label {
  color: color-mix(in srgb, var(--c-success) 72%, var(--ink));
}
.callout.danger, .callout.bad {
  background: color-mix(in srgb, var(--c-danger) 11%, var(--bg-elev));
  border-color: var(--c-danger);
}
.callout.danger .callout-label, .callout.bad .callout-label { color: color-mix(in srgb, var(--c-danger) 74%, var(--ink)); }
:root[data-theme="dark"] .callout p { color: var(--ink); }

/* ---- Good/bad comparison columns pick up green / rose accents ---- */
.cols .good, .cols-good { border-inline-start: 3px solid color-mix(in srgb, var(--c-success) 60%, var(--line)); }
.cols .bad, .cols-bad   { border-inline-start: 3px solid color-mix(in srgb, var(--c-danger) 55%, var(--line)); }

/* ---- Decorative emoji get their colour back — small, calm, but alive.
   Overrides the earlier grayscale(1) rules (later wins in this file). ---- */
.tc-icon, .mr-ico { filter: none; opacity: .95; font-size: 1.15rem; }
.role-badge .rb-icon { filter: none; opacity: 1; }
/* section-title emoji: a hint of colour instead of full monochrome */
h2.h2 { filter: saturate(.85); font-weight: 750; }
.page-title { filter: saturate(.9); }
.comp-name { filter: none; }

/* ---- Progress & completion read green (done) vs brand (in progress) ---- */
.tcard.is-complete .bar-fill, .comp.done .bar-fill,
.bar-fill.full, .bar-fill[data-done="1"] {
  background: linear-gradient(135deg, var(--c-success), color-mix(in srgb, var(--c-success) 78%, #000));
  box-shadow: 0 0 10px color-mix(in srgb, var(--c-success) 40%, transparent);
}
.badge.done, .chip.done, .status-done { color: color-mix(in srgb, var(--c-success) 78%, var(--ink));
  background: color-mix(in srgb, var(--c-success) 12%, var(--bg-soft));
  border-color: color-mix(in srgb, var(--c-success) 35%, var(--line)); }

/* =====================================================================
   Premium blocks — refined depth, a whisper of a gradient edge, and a
   composed hover. Kept subtle so it reads upmarket, not busy.
   ===================================================================== */
.card, .tcard, .comp, .mini-row, .stat, .kpi, .callout {
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
}
/* a faint brand-tinted top hairline on primary cards for quiet polish */
.card.pad-lg { position: relative; }
.card.pad-lg::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 45%, transparent), transparent);
  opacity: .5;
}
a.tcard:hover, a.comp:hover, a.mini-row:hover, a.role-card:hover {
  box-shadow: var(--lift-shadow), 0 0 0 1px color-mix(in srgb, var(--brand) 22%, transparent);
}
.kpi { position: relative; overflow: hidden; }
.kpi::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px;
  background: var(--grad-brand); opacity: .75;
}
/* gentle colour rotation across a row of KPIs — a touch of life, not a rainbow */
.kpis .kpi:nth-child(4n+2)::before { background: linear-gradient(180deg, var(--c-principle), color-mix(in srgb,var(--c-principle) 70%,#000)); }
.kpis .kpi:nth-child(4n+3)::before { background: linear-gradient(180deg, var(--c-success), color-mix(in srgb,var(--c-success) 70%,#000)); }
.kpis .kpi:nth-child(4n)::before   { background: linear-gradient(180deg, var(--c-warn), color-mix(in srgb,var(--c-warn) 70%,#000)); }

/* =====================================================================
   Premium tabs — sidebar + admin: a defined active state with a soft
   tinted background and a smooth, contained hover.
   ===================================================================== */
.nav-item { border: 1px solid transparent; }
.nav-item.active {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-color: color-mix(in srgb, var(--brand) 22%, transparent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--brand) 14%, transparent);
}
:root[data-theme="dark"] .nav-item.active { background: color-mix(in srgb, var(--brand) 18%, transparent); }
.admin-tabs a { border: 1px solid transparent; }
.admin-tabs a:hover { border-color: color-mix(in srgb, var(--brand) 18%, transparent); }
.admin-tabs a.active { box-shadow: 0 4px 14px var(--glow-brand); }

/* =====================================================================
   Premium settings / appearance page — the template gallery and the
   colour picker feel tactile and refined.
   ===================================================================== */
.tpl-card {
  border-radius: calc(var(--radius) - 2px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: var(--lift-shadow); }
.tpl-card.on {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 40%, transparent), var(--shadow);
}
.tpl-live { color: color-mix(in srgb, var(--c-success) 80%, var(--ink)); font-weight: 700; }

.dp-colors { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.dp-color {
  width: var(--tap); height: var(--tap); border-radius: 999px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; background: transparent;
  transition: transform .16s ease, box-shadow .16s ease;
}
.dp-color .dp-dot {
  width: 26px; height: 26px; border-radius: 999px; background: var(--dot, var(--brand));
  box-shadow: 0 2px 8px color-mix(in srgb, var(--dot, var(--brand)) 45%, transparent),
              inset 0 0 0 1px color-mix(in srgb, #000 12%, transparent);
  transition: transform .16s ease;
}
.dp-color:hover { transform: translateY(-2px); }
.dp-color:hover .dp-dot { transform: scale(1.08); }
.dp-color.on {
  box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px color-mix(in srgb, var(--dot, var(--brand)) 70%, transparent);
}
.dp-color.on .dp-dot::after {
  content: "✓"; color: #fff; font-size: .8rem; font-weight: 800;
  display: grid; place-items: center; width: 100%; height: 100%;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* =====================================================================
   Reduced-motion: keep the new hovers static too.
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .tpl-card:hover, .dp-color:hover, .dp-color:hover .dp-dot { transform: none; }
}

/* =====================================================================
   Premium cards & minimal icon tiles — a refined, consistent surface
   with a quiet tinted icon "chip" instead of loud floating emoji.
   Everything token-driven and theme-aware.
   ===================================================================== */

/* ---- Minimal icon tiles: unify every card/badge glyph into a soft,
   rounded, tinted chip. Emoji keep a hint of colour but read as calm,
   premium glyphs rather than stickers. ---- */
.tcard .tc-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 13px; font-size: 1.3rem;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--brand) 15%, var(--bg-elev)),
    color-mix(in srgb, var(--brand) 5%, var(--bg-elev)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 16%, transparent);
  filter: saturate(.92); opacity: 1;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mini-row .mr-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; font-size: 1.08rem; flex: none;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--brand) 14%, var(--bg-elev)),
    color-mix(in srgb, var(--brand) 5%, var(--bg-elev)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 14%, transparent);
  filter: saturate(.92); opacity: 1;
}
/* the tile gets a gentle lift when its card is hovered */
a.tcard:hover .tc-icon { transform: translateY(-1px) scale(1.03);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 26%, transparent),
              0 6px 16px color-mix(in srgb, var(--brand) 22%, transparent); }

/* ---- Premium card surface: a whisper of a gradient, a refined edge,
   a faint top hairline, and a composed, elevated hover. ---- */
.tcard, .comp, .mini-row {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}
:root:not([data-theme="dark"]) .tcard,
:root:not([data-theme="dark"]) .comp,
:root:not([data-theme="dark"]) .mini-row {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--bg-elev) 96%, var(--brand) 4%), var(--bg-elev));
}
.tcard { position: relative; overflow: hidden; }
.tcard::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--brand) 42%, transparent), transparent);
  opacity: .55; pointer-events: none;
}
a.tcard:hover, a.comp:hover, a.mini-row:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  box-shadow: 0 16px 40px color-mix(in srgb, var(--ink) 14%, transparent),
              0 0 0 1px color-mix(in srgb, var(--brand) 20%, transparent);
}
.tcard h3 { letter-spacing: -.2px; }

/* dashboard "start here / continue" hero: a touch more presence */
.continue-card { border-radius: 20px; }

/* ---- Section-title emoji: keep them refined and quiet (a hint of colour,
   not stickers) so headings read premium. ---- */
h2.h2 { filter: saturate(.8); }

@media (prefers-reduced-motion: reduce) {
  a.tcard:hover, a.comp:hover, a.mini-row:hover { transform: none; }
  a.tcard:hover .tc-icon { transform: none; }
}
