/* TopicRadar 页面样式:内容优先的简洁候选 Feed。 */
:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --paper: #fffffc;
  --ink: #171717;
  --muted: #6e716a;
  --soft: #ecebe4;
  --line: #dfddd3;
  --accent: #2f6f57;
  --accent-soft: #e8f2ed;
  --danger: #b45147;
  --danger-soft: #f6e9e6;
  --shadow: 0 24px 70px -42px rgba(34, 36, 30, 0.45);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at top left, rgba(76, 111, 88, 0.12), transparent 34rem),
    linear-gradient(180deg, #fbfbf8 0%, var(--bg) 100%);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 96px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #111827;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.mark::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px solid #d8fff0;
  border-radius: 9px;
  transform: rotate(45deg);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}

h2 {
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.12;
}

h3 {
  font-size: 18px;
}

.muted {
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.6;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill,
.ghost-button,
.primary-button,
.refresh-fab,
.feedback-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.82);
  color: var(--ink);
  padding: 9px 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.ghost-button:hover,
.feedback-button:hover {
  border-color: #b8b6aa;
}

.ghost-button:active,
.primary-button:active,
.refresh-fab:active,
.feedback-button:active {
  transform: translateY(1px) scale(0.99);
}

.primary-button,
.refresh-fab {
  background: #172019;
  color: #fff;
  border-color: #172019;
}

.summary-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(360px, 1fr);
  gap: 32px;
  align-items: center;
  background: rgba(255, 255, 252, 0.84);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 30px 34px;
  box-shadow: var(--shadow);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.metric {
  border-left: 1px solid var(--line);
  padding-left: 18px;
}

.metric strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
  margin-top: 32px;
}

.feed-root {
  display: grid;
  gap: 28px;
}

.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 2px 14px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 13px;
}

.card {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  gap: 26px;
  background: rgba(255, 255, 252, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 46px -36px rgba(30, 32, 26, 0.5);
  animation: rise 420ms ease both;
}

.media-link {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 16px 0 16px 16px;
}

.thumb-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: var(--soft);
  position: relative;
}

.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.82);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
}

.source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px 0;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9eadf, #f4dfcf);
}

.source-meta strong {
  display: block;
  font-size: 14px;
}

.source-meta span {
  color: var(--muted);
  font-size: 13px;
}

.card-body {
  padding: 26px 24px 18px 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.verdict-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.verdict {
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.candidate-id {
  color: var(--muted);
  font-size: 12px;
}

.copy {
  font-size: 17px;
  line-height: 1.72;
  max-width: 68ch;
  margin: 0;
}

.evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.evidence-strip span {
  border-radius: 999px;
  background: #f1f0e8;
  color: #4d514a;
  padding: 6px 10px;
  font-size: 12px;
}

.feedback-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 22px;
}

.feedback-button[data-action="like"].active {
  color: var(--accent);
  border-color: rgba(47, 111, 87, 0.28);
  background: var(--accent-soft);
}

.feedback-button[data-action="less"].active {
  color: var(--danger);
  border-color: rgba(180, 81, 71, 0.28);
  background: var(--danger-soft);
}

.note-input {
  display: none;
  width: min(100%, 420px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  background: #fff;
}

.note-input.open {
  display: block;
}

.side-column {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 18px;
}

.side-card,
.status-card {
  background: rgba(255, 255, 252, 0.9);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 16px 44px -38px rgba(25, 27, 22, 0.5);
}

.status-card {
  display: none;
  margin-bottom: 18px;
}

.status-card.show {
  display: block;
}

.side-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.side-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #41443e;
}

.bar {
  flex: 1;
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: var(--soft);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.refresh-fab {
  position: fixed;
  right: 28px;
  bottom: 26px;
  padding: 14px 20px;
  box-shadow: 0 18px 50px -24px rgba(12, 16, 13, 0.7);
}

.settings-dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.settings-dialog::backdrop {
  background: rgba(27, 28, 24, 0.32);
}

.settings-card {
  width: min(520px, calc(100vw - 32px));
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.field span {
  font-weight: 700;
}

.field input {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
