/* =========================================================
   自媒体热点雷达
   依赖 /assets/style.css 与 /assets/tool.css 的变量与 ts-* 结构
   ========================================================= */

.rd-wrap {
  padding-top: 28px;
  padding-bottom: 56px;
}

.rd-hero h1 {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--fg);
}

.rd-hero p {
  margin-top: 10px;
  color: var(--muted-fg);
  font-size: 15px;
  line-height: 1.7;
  max-width: 36em;
}

/* ---------- 状态条 ---------- */
.rd-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted-fg);
}

.rd-status__time {
  font-weight: 600;
  color: var(--fg);
}

.rd-status__warn {
  flex: 1 1 100%;
  color: #92400e;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 1.5;
}

/* ---------- 平台 tab ---------- */
.rd-tabs {
  display: flex;
  gap: 6px;
  margin-top: 20px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  overflow-x: auto;
  scrollbar-width: none;
}
.rd-tabs::-webkit-scrollbar { display: none; }

.rd-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-fg);
  white-space: nowrap;
}
.rd-tab:hover { color: var(--fg); }
.rd-tab.is-active {
  background: linear-gradient(120deg, var(--accent), var(--accent-sec));
  color: #fff;
}

.rd-subtabs,
.rd-newtoggle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rd-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 13px;
  color: var(--muted-fg);
}
.rd-chip:hover { border-color: var(--accent-sec); color: var(--fg); }
.rd-chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(4, 120, 87, .07);
  font-weight: 600;
}

/* ---------- 工具行 ---------- */
.rd-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 16px;
}

.rd-sorts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rd-sort {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted-fg);
  border: 1px solid transparent;
}
.rd-sort:hover { background: rgba(15, 23, 42, .04); color: var(--fg); }
.rd-sort.is-active {
  border-color: var(--border);
  background: var(--card);
  color: var(--fg);
  font-weight: 600;
}

.rd-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted-fg);
  font-family: var(--mono);
}

.rd-note {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-fg);
  padding-left: 10px;
  border-left: 3px solid var(--border);
}

/* ---------- 列表 ---------- */
.rd-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rd-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.rd-item:hover {
  border-color: var(--accent-sec);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.rd-item__rank {
  flex: none;
  min-width: 30px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--muted-fg);
  text-align: center;
  padding-top: 2px;
}
.rd-item:nth-child(-n+3) .rd-item__rank { color: var(--accent); }

.rd-item__body {
  flex: 1 1 auto;
  min-width: 0;
}

.rd-item__title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--fg);
  overflow-wrap: anywhere;
}
.rd-item__title:hover { color: var(--accent); }

.rd-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted-fg);
  font-family: var(--mono);
}

.rd-item__sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted-fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rd-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #64748B;
}
.rd-badge--douyin { background: #111827; }
.rd-badge--xiaohongshu { background: #E11D48; }
.rd-badge--weibo { background: #D97706; }
.rd-badge--bilibili { background: #0EA5E9; }

.rd-metric { color: var(--fg); }

.rd-rise.is-up { color: #B91C1C; }
.rd-rise.is-down { color: #047857; }

.rd-first { color: var(--muted-fg); }

.rd-item__go {
  flex: none;
  align-self: center;
  white-space: nowrap;
  font-family: var(--sans);
  letter-spacing: 0;
}

/* ---------- 更多/空态 ---------- */
.rd-more {
  margin-top: 20px;
  text-align: center;
}

.rd-more__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.rd-more__link:hover { border-color: var(--accent); color: var(--accent); }
.rd-more__link.is-loading { opacity: .7; pointer-events: none; }

.rd-more__end {
  font-size: 13px;
  color: var(--muted-fg);
}

.rd-empty {
  margin-top: 18px;
  padding: 36px 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  text-align: center;
}
.rd-empty__hint { margin-top: 6px; font-size: 13px; color: var(--muted-fg); }

.rd-callout {
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-fg);
}
/* 只管正文里的文字链接；按钮有自己的配色，不能被这条规则改成绿字。 */
.rd-callout p a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.rd-callout__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 16px;
}
.rd-callout__actions:last-child { margin-bottom: 0; }
.rd-callout__actions .btn { margin-top: 0; text-decoration: none; }

@media (max-width: 559px) {
  .rd-hero h1 { font-size: 24px; }
  .rd-item { padding: 12px 10px; gap: 8px; }
  .rd-item__title { font-size: 15px; }
  .rd-item__go {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
  }
  .rd-count { margin-left: 0; }
}

/* ---------- 详情 ---------- */
.rd-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted-fg);
}
.rd-crumb a { color: var(--muted-fg); }
.rd-crumb a:hover { color: var(--accent); }

.rd-detail {
  margin-top: 14px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.rd-detail__title {
  font-family: var(--display);
  font-size: 27px;
  line-height: 1.3;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.rd-detail__meta { margin-top: 12px; }

.rd-detail__up,
.rd-detail__profile {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted-fg);
}

.rd-detail__src {
  margin-top: 14px;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.rd-detail__src a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}
.rd-detail__hint { font-size: 12px; color: var(--muted-fg); }

/* ---------- 拆解 ---------- */
.rd-digest { margin-top: 22px; }

.rd-digest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.rd-digest__head h2 { font-family: var(--display); font-size: 22px; }
.rd-digest__model { font-size: 12px; color: var(--muted-fg); font-family: var(--mono); }

.rd-digest__msg {
  margin-top: 14px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted-fg);
}
.rd-digest__hint { margin-top: 6px; font-size: 13px; }
.rd-digest__hint a { color: var(--accent); text-decoration: underline; }
.rd-digest__msg .btn { margin-top: 10px; }

.rd-block {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.rd-block h2 {
  font-family: var(--display);
  font-size: 18px;
  margin-bottom: 10px;
}
.rd-block p { font-size: 15px; line-height: 1.75; color: var(--fg); }
.rd-block__hint { font-size: 13px !important; color: var(--muted-fg) !important; margin-bottom: 12px; }

.rd-block--warn { border-color: #FDE68A; background: #FFFBEB; }
.rd-block--warn h2 { color: #92400E; }

.rd-angles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.rd-angle { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.rd-angle h3 { font-size: 16px; font-weight: 700; line-height: 1.5; }
.rd-angle p { margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--muted-fg); }
.rd-angle strong { color: var(--fg); }

.rd-titles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rd-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg);
  text-align: left;
  cursor: pointer;
}
.rd-title:hover { border-color: var(--accent); }
.rd-title__copy { flex: none; font-size: 12px; color: var(--accent); font-family: var(--mono); }

.rd-platforms { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.rd-platforms dt { font-size: 13px; font-weight: 700; color: var(--accent); }
.rd-platforms dd { margin: 4px 0 0; font-size: 14px; line-height: 1.75; color: var(--muted-fg); }

@media (max-width: 559px) {
  .rd-detail__title { font-size: 22px; }
  .rd-block { padding: 14px; }
}

/* ---------- 选题表单 ---------- */
.rd-form { margin-top: 20px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.rd-field { margin-top: 16px; }
.rd-field:first-child { margin-top: 0; }
.rd-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.rd-field .rd-hint { font-size: 12px; color: var(--muted-fg); margin-top: 6px; line-height: 1.6; }
.rd-field input[type="text"],
.rd-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-size: 15px;
  color: var(--fg);
}
.rd-field input[type="text"]:focus,
.rd-field select:focus { outline: 2px solid rgba(4, 120, 87, .35); outline-offset: 1px; border-color: var(--accent); }
.rd-form .btn { margin-top: 18px; }

.rd-out {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  min-height: 80px;
}
.rd-out__text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.85;
  color: var(--fg);
}
.rd-out__empty { font-size: 14px; color: var(--muted-fg); line-height: 1.7; }
.rd-out__foot { margin-top: 14px; font-size: 12px; color: var(--muted-fg); }

/* ---------- 多行输入（账号诊断） ---------- */
.rd-field textarea {
  width: 100%;
  min-height: 150px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: var(--mono), "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.8;
  color: var(--fg);
  resize: vertical;
}
.rd-field textarea:focus { outline: 2px solid rgba(4, 120, 87, .35); outline-offset: 1px; border-color: var(--accent); }

/* ---------- 账号诊断 ---------- */
.rd-audit__verdict {
  border-left: 4px solid var(--accent);
  background: rgba(4, 120, 87, .05);
}
.rd-audit__verdict p { font-size: 16px; font-weight: 600; line-height: 1.7; }

.rd-audit__score {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}
.rd-audit__score strong {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
}
.rd-audit__score span { font-size: 14px; color: var(--muted-fg); }

.rd-audit__kv { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.rd-audit__kv div { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; }
.rd-audit__kv dt { font-size: 13px; color: var(--muted-fg); line-height: 1.7; }
.rd-audit__kv dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.rd-audit__list,
.rd-audit__next {
  margin: 0;
  padding-left: 1.3em;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rd-audit__list li { font-size: 14px; line-height: 1.75; color: var(--fg); overflow-wrap: anywhere; }
.rd-audit__next li { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.rd-audit__fix { font-size: 13px; color: var(--muted-fg); }
.rd-audit__tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(4, 120, 87, .1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  vertical-align: 1px;
}

.rd-audit__tablewrap {
  margin-top: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rd-audit__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.rd-audit__table th,
.rd-audit__table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.rd-audit__table th { color: var(--muted-fg); font-weight: 600; }
.rd-audit__table td:nth-child(2) { white-space: normal; min-width: 140px; }
.rd-audit__table tbody tr:last-child td { border-bottom: 0; }

.rd-audit__delete { margin-top: 14px; display: flex; justify-content: flex-end; }
.rd-audit__delete .btn { margin-top: 0; }

.rd-audit__history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rd-audit__history li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
}
.rd-audit__history li > a {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  color: var(--fg);
}
.rd-audit__history li > a:hover { color: var(--accent); }
.rd-audit__date { font-size: 12px; color: var(--muted-fg); font-family: var(--mono); }
.rd-audit__handle { font-size: 14px; font-weight: 600; }
.rd-audit__count { font-size: 12px; color: var(--muted-fg); }
.rd-audit__verdict-inline {
  flex-basis: 100%;
  min-width: 0;
  font-size: 13px;
  color: var(--muted-fg);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.rd-audit__del {
  flex: none;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 13px;
  color: #B91C1C;
  cursor: pointer;
}
.rd-audit__del:hover { border-color: #B91C1C; }

@media (max-width: 559px) {
  .rd-audit__kv div { grid-template-columns: 1fr; gap: 2px; }
  .rd-audit__history li { align-items: flex-start; }
}
