/* MPT design system — components.css
   Shared classes consumed by /app (Telegram Mini App) and / (site).
   All spacing via var(--sp-*), all radii via var(--radius-*), type via var(--type-*). */

/* ---- Reset & base --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  font-size: var(--type-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, video { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}

[hidden] { display: none !important; }

code, .mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---- App header ------------------------------------------------------------ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--line);
}

.app-header .logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
}

.app-header .logo::before {
  content: "M";
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 13px;
  box-shadow: var(--glow);
  flex: none;
}

.app-header .user {
  color: var(--muted);
  font-size: var(--type-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}

/* ---- Cards ----------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-4);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--type-md);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition),
              transform 120ms ease;
}

.btn:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
}

.btn-primary:active { box-shadow: var(--shadow-sm); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
  transform: none;
}

.btn-danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--err) 40%, transparent);
  color: var(--err);
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--err) 10%, transparent);
  border-color: var(--err);
}

.btn-sm {
  min-height: 34px;
  padding: var(--sp-1) var(--sp-3);
  font-size: 13px;
}

@media (max-width: 520px) {
  .btn-sm { min-height: 44px; }
  .btn:not(.btn-sm) { width: 100%; }
}

/* ---- Forms ----------------------------------------------------------------- */
.lbl {
  display: block;
  color: var(--muted);
  font-size: var(--type-sm);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  padding: 12px var(--sp-3);
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--type-base);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input::placeholder { color: var(--muted); }

.input:focus,
.select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

/* Number stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.stepper button {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--type-lg);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 120ms;
}

.stepper button:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); background: var(--surface-3); }

.stepper button:active { transform: scale(0.95); }

.stepper span {
  min-width: 52px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* Toggle */
.tgl {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  min-height: 44px;
  font-size: var(--type-sm);
  color: var(--text);
}

.tgl input { position: absolute; opacity: 0; width: 0; height: 0; }

.tgl .tgl-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  border: 1px solid var(--line);
  transition: background var(--transition), border-color var(--transition);
  flex: none;
}

.tgl .tgl-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--on-accent);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.tgl input:checked + .tgl-track {
  background: var(--accent);
  border-color: var(--accent);
}

.tgl input:checked + .tgl-track .tgl-thumb { transform: translateX(18px); }

.tgl input:focus-visible + .tgl-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Status chips ---------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--type-xs);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--sc, var(--muted)) 14%, transparent);
  color: color-mix(in srgb, var(--sc, var(--muted)) 55%, var(--text));
  border-color: color-mix(in srgb, var(--sc, var(--muted)) 25%, transparent);
  white-space: nowrap;
}

.chip-queued     { --sc: var(--status-queued); }
.chip-running    { --sc: var(--status-running); }
.chip-done       { --sc: var(--status-done); }
.chip-failed     { --sc: var(--status-failed); }
.chip-cancelled  { --sc: var(--status-cancelled); }

.chip-running::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: mpt-pulse 1.4s ease-in-out infinite;
}

@keyframes mpt-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

/* ---- Progress -------------------------------------------------------------- */
.progress {
  position: relative;
  height: 8px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--line) 55%, transparent);
  overflow: hidden;
}

.progress .fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width var(--transition);
}

.progress.indeterminate .fill {
  position: absolute;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: mpt-shimmer 1.1s infinite linear;
}

@keyframes mpt-shimmer {
  from { transform: translateX(-100%); }
  to   { transform: translateX(350%); }
}

/* ---- Metrics (dashboard) --------------------------------------------------- */
.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  min-width: 0;
}

.metric-value {
  font-family: var(--font-display);
  font-size: var(--type-lg);
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.metric-label {
  color: var(--muted);
  font-size: var(--type-sm);
  margin-top: var(--sp-1);
}

/* ---- Status mini-chart (site dashboard) ------------------------------------ */
.statbar {
  display: flex;
  gap: var(--sp-1);
  height: 10px;
}

.statbar .bar {
  flex: 1 1 auto;
  min-width: 2px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--muted) 25%, transparent);
}

.bar-queued     { background: var(--status-queued); }
.bar-running    { background: var(--status-running); }
.bar-done       { background: var(--status-done); }
.bar-failed     { background: var(--status-failed); }
.bar-cancelled  { background: var(--status-cancelled); opacity: 0.55; }

/* ---- Tabs (pill navigation, settings dialect) ------------------------------ */
.tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  padding: var(--sp-2) var(--sp-3);
  min-height: 40px;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--type-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.tab:hover { color: var(--text); }

.tab.active {
  background: var(--accent);
  color: var(--on-accent);
}

@media (max-width: 520px) {
  .tab { min-height: 44px; }
}

.tabpanel { padding-top: var(--sp-3); }
.tabpanel:not(.active) { display: none; }

/* ---- Jobs ------------------------------------------------------------------ */
.job {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.job + .job { margin-top: var(--sp-2); }

.job-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.job-meta {
  font-family: var(--font-mono);
  font-size: var(--type-xs);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.stage {
  color: var(--muted);
  font-size: var(--type-sm);
}

.err { color: var(--err); font-size: var(--type-sm); }

.cancelled { color: var(--muted); font-size: var(--type-sm); }

.done-count {
  color: var(--ok);
  font-size: var(--type-sm);
  font-weight: 600;
}

/* ---- Clips / preview ------------------------------------------------------- */
.clip {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.clip video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}

.clip-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
}

.clip-title { font-weight: 700; font-size: var(--type-sm); }

.clip-hook { color: var(--muted); font-size: var(--type-sm); }

.dl { align-self: flex-start; }

/* ---- Empty state ----------------------------------------------------------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-3);
  color: var(--muted);
  text-align: center;
  font-size: var(--type-sm);
}

/* ---- Toast ----------------------------------------------------------------- */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sp-4) + env(safe-area-inset-bottom));
  transform: translate(-50%, 140%);
  opacity: 0;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--type-sm);
  font-weight: 650;
  box-shadow: var(--shadow-md);
  max-width: min(90vw, 420px);
  text-align: center;
  transition: transform var(--transition), opacity var(--transition);
  z-index: 999;
  pointer-events: none;
}

#toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ---- Settings / customizer ------------------------------------------------- */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: var(--sp-2);
  align-items: center;
}

.color-input {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.color-input input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
}

.color-input input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.color-input input[type="color"]::-webkit-color-swatch { border: none; border-radius: calc(var(--radius-md) - 3px); }

.seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  flex-wrap: wrap;
}

.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--type-sm);
  font-weight: 600;
  padding: 7px 13px;
  min-height: 36px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: color 160ms, background 160ms, transform 120ms;
}

.seg button:hover { color: var(--text); }

.seg button:active { transform: scale(0.96); }

.seg button.active,
.seg button[aria-selected="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

@media (max-width: 520px) {
  .seg button { min-height: 44px; }
}

.btn-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 32px;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--err) 40%, transparent);
  background: transparent;
  color: var(--err);
  font-size: var(--type-xs);
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-reset:hover {
  background: color-mix(in srgb, var(--err) 10%, transparent);
  border-color: var(--err);
}

.swatches {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  transition: transform 140ms;
}

.swatch:hover { transform: scale(1.08); }

/* ---- Responsive grid (site dashboard cards) -------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-3);
}

/* ---- Editorial sections (streaming character) ----------------------------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin: var(--sp-4) 0 var(--sp-3);
}

.section-head .overline {
  display: block;
  font-size: var(--type-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-1);
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: var(--type-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.section-head .more {
  color: var(--muted);
  font-size: var(--type-sm);
  font-weight: 600;
  background: none;
  border: 0;
  padding: var(--sp-1);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), transform 120ms ease;
}

.section-head .more:hover { color: var(--accent); }

.section-head .more:active { transform: translateY(1px); }

/* Display type (hero) */
.display-title {
  font-family: var(--font-display);
  font-size: clamp(var(--type-2xl), 6vw, var(--type-3xl));
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display-sub {
  color: var(--muted);
  font-size: var(--type-md);
  max-width: 46ch;
  margin-top: var(--sp-2);
}

/* ---- Featured (premier) card ---------------------------------------------- */
.featured {
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1fr;
  gap: var(--sp-3);
  align-items: stretch;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  overflow: hidden;
}

.featured-media {
  position: relative;
  border-radius: var(--radius-md);
  background: #000;
  aspect-ratio: 9 / 16;
  overflow: hidden;
}

.featured-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-media::after {
  content: "▶";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 70%, transparent);
  color: var(--bg);
  font-size: 18px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.featured-media:hover::after { opacity: 1; }

.featured-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  min-width: 0;
}

.featured-body .overline { margin-top: var(--sp-1); }

.featured-title {
  font-family: var(--font-display);
  font-size: var(--type-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-hook {
  color: var(--muted);
  font-size: var(--type-base);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: auto;
}

.featured .score-ring { flex: none; }

@media (max-width: 640px) {
  .featured { grid-template-columns: 1fr; }
  .featured-media { aspect-ratio: 16 / 10; max-height: 260px; }
}

/* ---- Score visualization -------------------------------------------------- */
.score-ring {
  --ring: 52px;
  position: relative;
  width: var(--ring);
  height: var(--ring);
}

.score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring .ring-track {
  fill: none;
  stroke: color-mix(in srgb, var(--line) 70%, transparent);
  stroke-width: 5;
}

.score-ring .ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

.score-ring .ring-num {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: var(--type-sm);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.score-bar {
  --w: 0%;
  flex: 1 1 auto;
  min-width: 90px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--line) 70%, transparent);
  overflow: hidden;
}

.score-bar .fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, var(--link, #8AB8FF) 45%));
  transition: width 0.6s ease;
}

.badge-best {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-pill);
  background: linear-gradient(120deg, var(--accent-bright, var(--accent)), color-mix(in srgb, var(--accent) 60%, var(--link, #8AB8FF) 40%));
  color: var(--on-accent);
  font-size: var(--type-xs);
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
}

/* ---- Stats band (dashboard) ----------------------------------------------- */
.stat-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.stat-band .stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
}

.stat-band .num {
  font-family: var(--font-display);
  font-size: var(--type-xl);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--text);
}

.stat-band .num.accent { color: var(--accent); }

.stat-band .lbl {
  margin: 0;
  margin-top: var(--sp-1);
  color: var(--muted);
  font-weight: 600;
}

/* ---- Empty state with icon ------------------------------------------------ */
.empty-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  margin-bottom: var(--sp-1);
}

.empty-icon svg { width: 28px; height: 28px; }

.empty strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--type-md);
  font-weight: 700;
}

.empty .actions { margin-top: var(--sp-1); }

/* ---- Card hover (gallery lift, streaming feel) ---------------------------- */
.lift {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.lift:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-md);
}

/* ---- Panel enter ------------------------------------------------ */
.tabpanel { animation: mpt-panel-in 240ms ease both; }

@keyframes mpt-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---- Staggered entrance (OD-style, applied to list/card wrappers) -------- */
.rise > * {
  animation: mpt-rise 300ms cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.rise > :nth-child(2)  { animation-delay: 30ms; }
.rise > :nth-child(3)  { animation-delay: 60ms; }
.rise > :nth-child(4)  { animation-delay: 90ms; }
.rise > :nth-child(5)  { animation-delay: 120ms; }
.rise > :nth-child(6)  { animation-delay: 150ms; }
.rise > :nth-child(n+7) { animation-delay: 180ms; }

@keyframes mpt-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}