:root {
  --color-primary: #1a237e;
  --color-accent:  #f9a825;
  --color-bg:      #fafafa;
  --color-text:    #333;
}

.md-typeset .card {
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 1em;
  margin: 1em 0.5em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background: #fff;
  display: inline-block;
  width: calc(31% - 1em);      /* 三列布局 */
  vertical-align: top;
  height: 180px;               /* 固定高度 */
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
}

.md-typeset .card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.md-typeset .card-title {
  font-weight: bold;
  font-size: 1.1em;
  margin-top: 0.5em;
}

.md-typeset .card p {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

@media screen and (max-width: 768px) {
  .md-typeset .card {
    width: 100%;
    height: auto;
  }
}

.md-typeset .card-lg {
  border: 1px solid #bbb;
  border-radius: 12px;
  padding: 1em;
  margin: 1em 0.5em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  background: #fff;
  display: inline-block;
  width: calc(31% - 1em);   /* 三列排布 */
  vertical-align: top;
  height: 560px;            /* 比 .card 高 */
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
}

.md-typeset .card-lg img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 10px;
}

.md-typeset .card-lg .card-title {
  font-weight: bold;
  font-size: 1.2em;
  margin-top: 0.5em;
}

.md-typeset .card-lg p {
  font-size: 0.95em;
  margin: 0.4em 0;
  line-height: 1.4;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

@media screen and (max-width: 768px) {
  .md-typeset .card-lg {
    width: 100%;
    height: auto;
  }
}
.md-typeset .card-md {
  border: 1px solid #bbb;
  border-radius: 12px;
  padding: 1em;
  margin: 1em 0.5em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  background: #fff;
  display: inline-block;
  width: calc(24% - 1em);     /* 三列排布 */
  vertical-align: top;
  height: 320px;              /* 比 .card 高，比 .card-lg 低 */
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
}

.md-typeset .card-md img {
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

.md-typeset .card-md .card-title {
  font-weight: bold;
  font-size: 1.15em;
  margin-top: 0.4em;
}

.md-typeset .card-md p {
  font-size: 0.92em;
  margin: 0.4em 0;
  line-height: 1.4;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

@media screen and (max-width: 768px) {
  .md-typeset .card-md {
    width: 100%;
    height: auto;
  }
}

/* extra.css */
.md-typeset p {
  text-align: justify;
  text-justify: inter-word;
}
