/* 历年真题（2026-11）：灰阶卡片 + 主色点缀，版式对齐 mengxiong.cn 的真题页。
   类名统一 rp- 前缀，避免与 custom.css / semantic.css 既有规则撞车。 */

.rp-page {
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------- 页头 ---------- */
.rp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 2px 0 14px;
}

.rp-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.rp-head-icon {
  color: #19aab0 !important;
  font-size: 1.5rem !important;
  margin: 0 !important;
}

.rp-head-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.rp-head-right {
  color: #8c8c8c;
  font-size: 13px;
}

.rp-head-right b {
  color: #262626;
  font-weight: 600;
}

/* ---------- 工具条：赛事筛选 + 说明 ---------- */
.rp-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.rp-filter .button {
  color: #595959 !important;
  font-weight: 400 !important;
}

.rp-filter .button.active {
  background-color: #19aab0 !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.rp-tip {
  flex: 1;
  min-width: 240px;
  color: #8c8c8c;
  font-size: 12px;
  line-height: 1.9;
}

/* ---------- 卡片网格 ---------- */
.rp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(430px, 1fr));
  gap: 12px;
}

.rp-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
}

.rp-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #fafafa;
  border-bottom: 1px solid #f2f2f2;
}

.rp-card-title {
  font-size: 15px;
  font-weight: 600;
  color: #262626;
}

.rp-card-sub {
  font-size: 12px;
  color: #bfbfbf;
}

.rp-items {
  display: flex;
  flex-direction: column;
}

.rp-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  min-height: 42px;
}

.rp-item + .rp-item {
  border-top: 1px dashed #f5f5f5;
}

.rp-item:hover {
  background: #f7fdfe;
}

/* 题序 T1..TN：固定宽度，跨行对齐 */
.rp-seq {
  flex: none;
  width: 24px;
  font-size: 12px;
  color: #bfbfbf;
  font-variant-numeric: tabular-nums;
}

.rp-name {
  flex: 1;
  min-width: 0;
  color: #262626;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rp-name:hover {
  color: #19aab0;
  text-decoration: underline;
}

/* 徽标：字号压小，避免把题名挤没 */
.rp-item .rp-label {
  flex: none;
  margin: 0 !important;
  padding: 2px 6px !important;
  font-size: 11px !important;
}

.rp-solved {
  flex: none;
  margin: 0 !important;
}

.rp-rate {
  flex: none;
  width: 42px;
  text-align: right;
  font-size: 12px;
  color: #8c8c8c;
  font-variant-numeric: tabular-nums;
}

.rp-empty {
  margin-top: 10px;
}

/* ---------- 移动端：单列，筛选按钮改横向滑动 ---------- */
@media (max-width: 768px) {
  .rp-grid {
    grid-template-columns: 1fr;
  }

  .rp-head-title {
    font-size: 1.2rem;
  }

  /* 六个赛事按钮在 390px 下会折成两行、还容易被顶部宠物挂件压住；
     改成一条可横滑的按钮带，既省高度也更好点。 */
  .rp-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }

  /* SUI 的 .ui.buttons 自带 flex-wrap: wrap，普通优先级压不住，这里必须 !important */
  .rp-toolbar .rp-filter {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .rp-filter::-webkit-scrollbar {
    display: none;
  }

  .rp-toolbar .rp-filter .button {
    flex: 0 0 auto;
  }

  .rp-tip {
    display: none;
  }

  .rp-item {
    padding: 8px 10px;
    gap: 4px;
  }

  .rp-rate {
    width: auto;
  }
}
