/* =========================================================
   矩阵子应用入口卡 · 主站可直接引入
   纸面 + 砖红强调，与探究学堂主站同一视觉体系
   ========================================================= */

.matrix-entry {
  --me-ink: #1A1712;
  --me-muted: #6A6254;
  --me-line: #C9BFA9;
  --me-accent: #A93A2A;
  --me-accent-strong: #85291C;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 48px;
  padding: 22px 24px;
  border: 1px solid var(--me-line);
  border-left: 3px solid var(--me-accent);
  border-radius: 2px;
  background: linear-gradient(150deg, #FDFBF6, #F7F2E7);
  box-shadow: 10px 10px 0 rgba(26, 23, 18, 0.05);
  color: var(--me-ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.matrix-entry::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(169, 58, 42, 0.10) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
  pointer-events: none;
}

.matrix-entry:hover,
.matrix-entry:focus-visible {
  transform: translateY(-2px);
  border-color: var(--me-accent);
  box-shadow: 12px 14px 0 rgba(26, 23, 18, 0.07);
}

.matrix-entry:hover::after { transform: translateX(120%); }

.matrix-entry__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.matrix-entry__kicker {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--me-accent);
}

.matrix-entry__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(169, 58, 42, 0.45);
  border-radius: 2px;
  color: var(--me-accent);
  font-size: 15px;
  font-weight: 700;
  background: #FFFDF8;
}

.matrix-entry__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.matrix-entry__desc {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--me-muted);
  max-width: 46ch;
}

.matrix-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.matrix-entry__chip {
  padding: 4px 10px;
  border: 1px solid var(--me-line);
  border-radius: 2px;
  font-size: 11.5px;
  color: var(--me-muted);
  background: #FFFDF9;
}

.matrix-entry__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  min-height: 32px;
}

.matrix-entry__cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--me-accent-strong);
}

.matrix-entry__arrow { transition: transform 0.2s ease; }
.matrix-entry:hover .matrix-entry__arrow { transform: translateX(4px); }

/* ---------- 主题任务卡内联深链 ---------- */

.task-warmup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #C9BFA9;
  border-radius: 2px;
  background: #FDFBF6;
  color: inherit;
  font-size: 13.5px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.task-warmup:hover,
.task-warmup:focus-visible {
  background: #FBF3EE;
  border-color: var(--me-accent);
}

.task-warmup__icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 2px;
  background: rgba(169, 58, 42, 0.10);
  color: #A93A2A;
  font-size: 13px;
}

.task-warmup__body { display: flex; flex-direction: column; gap: 1px; }
.task-warmup__label { font-weight: 600; }
.task-warmup__hint { font-size: 11.5px; opacity: 0.7; }
.task-warmup__arrow { margin-left: 4px; opacity: 0.8; }

/* ---------- 动效与响应式 ---------- */

@media (prefers-reduced-motion: reduce) {
  .matrix-entry,
  .matrix-entry::after,
  .matrix-entry__arrow,
  .task-warmup {
    transition: none !important;
  }
  .matrix-entry:hover,
  .matrix-entry:focus-visible { transform: none; }
  .matrix-entry:hover::after { transform: translateX(-120%); }
}

@media (max-width: 520px) {
  .matrix-entry { padding: 18px; border-radius: 2px; }
  .matrix-entry__title { font-size: 19px; }
  .matrix-entry__desc { font-size: 13px; }
  .task-warmup { width: 100%; }
}
