:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #edf2fb;
  --text: #132238;
  --muted: #607089;
  --line: #d7dfeb;
  --primary: #1f6feb;
  --primary-soft: #eaf2ff;
  --success: #0f9d58;
  --danger: #d93025;
  --shadow: 0 18px 42px rgba(17, 30, 52, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-shell {
  width: min(1280px, calc(100vw - 32px));
  margin: 32px auto 48px;
}

.hero,
.stats-grid,
.toolbar,
.table-wrap,
.notice {
  background: var(--surface);
  border: 1px solid rgba(215, 223, 235, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.hero h1,
.toolbar h2 {
  margin: 0;
  font-size: 30px;
}

.hero-text,
.toolbar p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ghost-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
}

.primary-button {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding: 20px;
}

.stat-card {
  padding: 18px;
  background: var(--surface-muted);
  border-radius: 8px;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 24px;
  line-height: 1.3;
}

.stat-value.small {
  font-size: 16px;
}

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

.stat-value.status.success {
  color: var(--success);
  text-transform: capitalize;
}

.stat-value.status.failure {
  color: var(--danger);
  text-transform: capitalize;
}

.notice {
  margin-top: 20px;
  padding: 16px 18px;
  font-size: 14px;
}

.notice.success {
  border-left: 4px solid var(--success);
}

.notice.error {
  border-left: 4px solid var(--danger);
}

.toolbar {
  margin-top: 20px;
  padding: 24px 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.toolbar-controls {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.segment-button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.segment-button.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(17, 30, 52, 0.08);
}

.search-field {
  display: grid;
  gap: 8px;
  min-width: min(320px, 100%);
  font-size: 13px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.table-wrap {
  margin-top: 20px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #f7faff;
}

th,
td {
  padding: 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

tbody tr:hover {
  background: #fbfdff;
}

.time-cell small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.type-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
}

.content-cell {
  display: flex;
  gap: 14px;
  min-width: 360px;
}

.cover {
  width: 132px;
  min-width: 132px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eef3fa;
}

.content-copy {
  display: grid;
  gap: 8px;
}

.content-copy strong {
  font-size: 15px;
}

.content-copy p {
  margin: 0;
  color: #34445c;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.metric-cell {
  display: grid;
  gap: 8px;
  color: var(--muted);
  min-width: 110px;
}

.link-cell {
  display: grid;
  gap: 10px;
  min-width: 88px;
}

.empty-cell {
  text-align: center;
  color: var(--muted);
  padding: 32px 16px;
}

@media (max-width: 980px) {
  .hero,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-controls {
    justify-items: stretch;
  }

  .content-cell {
    min-width: 280px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 20px, 100%);
    margin: 16px auto 28px;
  }

  .hero,
  .toolbar,
  .stats-grid {
    padding: 18px;
  }

  .hero h1,
  .toolbar h2 {
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    width: 100%;
  }

  .segment-button {
    flex: 1 1 0;
  }

  th,
  td {
    padding: 12px;
  }

  .content-cell {
    flex-direction: column;
    min-width: 220px;
  }

  .cover {
    width: 100%;
    min-width: 100%;
  }
}
