:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  color: #d4d4d4;
  background: #1e1e1e;
  font-synthesis: none;
  color-scheme: dark;
  accent-color: #007acc;
  --blue: #4daafc;
  --navy: #252526;
  --muted: #aaaaaa;
  --line: #3c3c3c;
  --surface: #252526;
  --radius: 4px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--blue);
  text-decoration: none;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #6cb3ff;
  outline-offset: 3px;
}
button {
  border: 0;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #3c3c3c;
  color: inherit;
  padding: 10px 12px;
  max-width: 100%;
  min-width: 0;
}
input::placeholder {
  color: #a0a0a0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
.shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #cccccc;
  width: 238px;
  flex-shrink: 0;
  padding: 35px 20px 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 1px;
  padding: 0 10px;
  margin-bottom: 42px;
}
.brand-mark {
  background: #007acc;
  border-radius: 4px;
  display: grid;
  place-items: center;
  width: 43px;
  height: 45px;
  font-size: 32px;
  font-weight: 400;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2.7px;
  font-weight: 500;
  color: #a0a0a0;
}
.nav-label {
  font-size: 12px;
  color: #aaaaaa;
  letter-spacing: 2px;
  padding: 0 14px;
  margin-bottom: 12px;
}
nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border-radius: 4px;
  color: #cccccc;
  background: transparent;
  padding: 11px 13px;
  font-size: 14px;
  white-space: nowrap;
}
.nav-item:hover {
  background: #2a2d2e;
}
.nav-item.active {
  background: #094771;
  color: white;
}
.nav-symbol {
  font-size: 17px;
  width: 22px;
  text-align: center;
}
.nav-count {
  margin-left: auto;
  font-size: 12px;
  opacity: 0.8;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 25px 12px 0;
}
.sidebar-bottom > a {
  color: #cccccc;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 15px;
}
.sidebar-bottom p {
  font-size: 12px;
  color: #aaaaaa;
  border-top: 1px solid #3c3c3c;
  padding-top: 22px;
  margin: 25px 0 0;
  line-height: 1.9;
}
.workspace {
  padding: 0 38px;
  flex: 1;
  min-width: 0;
  max-width: 1800px;
}
.topbar {
  height: 77px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.eyebrow,
.topbar-right {
  font-size: 14px;
  color: var(--muted);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.schedule {
  border: 1px solid #454545;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
}
.text-button {
  background: none;
  color: var(--blue);
  font-size: 14px;
  padding: 6px 0;
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 31px 0 25px;
}
.section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--blue);
  margin-bottom: 8px;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.heading p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.date-control {
  font-size: 12px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}
.date-control input {
  font-size: 14px;
  width: 162px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #252526;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 25px;
  padding: 23px 0;
  box-shadow: none;
}
.metrics > div {
  padding: 0 23px;
  border-right: 1px solid var(--line);
  display: grid;
  gap: 5px;
}
.metrics > div:last-child {
  border-right: 0;
}
.metrics span {
  font-size: 13px;
  color: var(--muted);
}
.metrics strong {
  font-size: 29px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  letter-spacing: -1px;
}
.metrics small {
  font-size: 12px;
  color: #aaaaaa;
}
.metrics .time-metric {
  font-size: 25px;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.toolbar select {
  font-size: 14px;
  height: 44px;
  max-width: 240px;
}
.search {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 210px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #252526;
  gap: 5px;
  padding-left: 14px;
}
.search span {
  font-size: 23px;
  color: #aaaaaa;
}
.search input {
  border: 0;
  flex: 1;
  font-size: 14px;
  width: 100%;
  background: transparent;
}
.notice {
  font-size: 12px;
  color: #aaaaaa;
  min-height: 22px;
  margin-bottom: 19px;
}
.notice.error {
  color: #f48771;
}
.news-section {
  margin: 25px 0 35px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 14px;
}
.section-title h2 {
  font-size: 18px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title h2:before {
  content: "";
  display: block;
  width: 4px;
  height: 18px;
  background: var(--blue);
  border-radius: 2px;
}
.section-title span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.section-title button {
  font-size: 13px;
  color: var(--blue);
  background: none;
  padding: 5px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition:
    box-shadow 0.18s,
    border-color 0.18s;
}
.news-card:hover {
  border-color: #007acc;
  box-shadow: 0 4px 14px #00000030;
}
.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}
.source-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank {
  color: #9cdcfe;
  font-size: 12px;
  flex-shrink: 0;
}
.news-card h3 {
  font-size: 17px;
  line-height: 1.65;
  margin: 0 0 12px;
  overflow-wrap: anywhere;
}
.title-button {
  color: inherit;
  font: inherit;
  font-weight: 650;
  text-align: left;
  background: transparent;
  padding: 0;
}
.summary {
  font-size: 14px;
  line-height: 1.85;
  color: #bcbcbc;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  margin-bottom: 18px;
}
.tag {
  background: #263749;
  color: #9cdcfe;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
}
.card-bottom {
  border-top: 1px solid #3c3c3c;
  padding-top: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}
.score {
  color: #4ec9b0;
}
.source-link {
  font-size: 13px;
  white-space: nowrap;
}
.empty {
  padding: 55px 25px;
  text-align: center;
  border: 1px dashed #555555;
  background: #252526;
  border-radius: 4px;
  margin: 20px 0;
}
.empty h2 {
  font-size: 20px;
  margin-bottom: 10px;
}
.empty p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
.empty.compact {
  padding: 23px;
  font-size: 14px;
  color: var(--muted);
}
footer {
  color: #a0a0a0;
  font-size: 12px;
  padding: 25px 0 35px;
  border-top: 1px solid var(--line);
  line-height: 1.9;
}
dialog {
  background: #252526;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 760px;
  width: calc(100% - 32px);
  max-height: 88vh;
  padding: 28px;
  color: inherit;
  box-shadow: 0 25px 100px #00000080;
}
dialog::backdrop {
  background: #25252680;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.icon-button {
  background: #3c3c3c;
  color: #cccccc;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
}
.dialog-meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
#detail-body h2 {
  font-size: 23px;
  line-height: 1.6;
}
#detail-body p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.detail-block {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 18px;
}
.detail-block h3 {
  font-size: 14px;
  margin-bottom: 8px;
  color: #9cdcfe;
}
.detail-block p {
  font-size: 15px;
  line-height: 1.85;
  margin-bottom: 0;
}
.original {
  background: #1e1e1e;
  border-radius: 4px;
  padding: 15px;
  color: #ce9178;
  font-size: 14px;
}
.detail-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.detail-scores span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  font-size: 12px;
  border-radius: 5px;
}
.primary-button {
  background: #0e639c;
  color: white;
  padding: 10px 17px;
  border-radius: 4px;
  display: inline-block;
  font-size: 14px;
}
.secondary-button {
  background: #333333;
  color: #cccccc;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
}
.danger-button {
  color: #f48771;
  background: #452c2c;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
[hidden] {
  display: none !important;
}
.admin-wrap {
  max-width: 1160px;
  padding: 32px 24px;
  margin: auto;
}
.admin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 25px;
}
.admin-top h1 {
  font-size: 24px;
  margin: 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #252526;
  padding: 24px;
  margin-bottom: 20px;
}
.panel h2 {
  font-size: 19px;
}
.panel p.help,
.help {
  font-size: 13px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
}
.field small {
  font-size: 12px;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-size: 14px;
}
.field textarea {
  min-height: 80px;
  resize: vertical;
}
.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
  flex-wrap: wrap;
}
.login-panel {
  max-width: 440px;
  margin: 70px auto;
}
.login-panel .field {
  margin-top: 20px;
}
.status-message {
  font-size: 14px;
  color: #9cdcfe;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.status-message.error {
  color: #f48771;
}
.table-scroll {
  overflow: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 11px 9px;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
td input,
td select {
  font-size: 13px;
  padding: 6px;
  min-width: 95px;
  width: 100%;
}
td input[type="checkbox"] {
  min-width: 16px;
  width: 16px;
  height: 16px;
}
.source-url {
  min-width: 220px;
}
details summary {
  cursor: pointer;
  font-size: 14px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #1e1e1e;
  padding: 15px;
  border-radius: 4px;
  font-size: 12px;
}
.run-state {
  border-radius: 4px;
  padding: 2px 6px;
  background: #333333;
}
.run-state.ok {
  color: #4ec9b0;
  background: #223d35;
}
.run-state.failed,
.run-state.error {
  color: #f48771;
  background: #452c2c;
}
.run-state.partial {
  color: #dcdcaa;
  background: #3b382a;
}
.video-card {
  margin-bottom: 15px;
}
.video-card h3 {
  font-size: 18px;
}
.video-card p {
  color: var(--muted);
  font-size: 14px;
}
.video-meta {
  font-size: 12px;
  color: var(--muted);
}
@media (min-width: 1600px) {
  .workspace {
    padding-left: 50px;
    padding-right: 50px;
  }
  .card-grid {
    gap: 20px;
  }
  .news-card {
    padding: 25px;
  }
}
@media (max-width: 1180px) {
  .sidebar {
    width: 205px;
    padding-left: 13px;
    padding-right: 13px;
  }
  .workspace {
    padding: 0 25px;
  }
  .metrics > div {
    padding: 0 16px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics small {
    font-size: 12px;
  }
  .heading h1 {
    font-size: 27px;
  }
  .brand {
    font-size: 20px;
  }
}
@media (max-width: 800px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 18px 20px 12px;
  }
  .brand {
    margin: 0;
    font-size: 21px;
    padding: 0;
  }
  .brand small {
    font-size: 9px;
  }
  .brand-mark {
    width: 36px;
    height: 38px;
    font-size: 28px;
  }
  .nav-label {
    display: none;
  }
  .sidebar nav {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin-top: 20px;
    padding-bottom: 4px;
  }
  .nav-item {
    width: auto;
    padding: 8px 12px;
    font-size: 13px;
  }
  .nav-symbol {
    display: none;
  }
  .nav-count {
    margin-left: 4px;
  }
  .sidebar-bottom {
    position: absolute;
    right: 20px;
    top: 24px;
    padding: 0;
    display: flex;
    gap: 15px;
  }
  .sidebar-bottom > a {
    font-size: 12px;
    margin: 0;
  }
  .sidebar-bottom > a span,
  .sidebar-bottom p {
    display: none;
  }
  .workspace {
    padding: 0 20px;
  }
  .topbar {
    height: 58px;
  }
  .topbar-right {
    gap: 10px;
  }
  .schedule {
    display: none;
  }
  .heading {
    padding: 25px 0 22px;
    align-items: flex-start;
  }
  .heading h1 {
    font-size: 24px;
  }
  .heading p {
    font-size: 13px;
    max-width: 230px;
  }
  .section-kicker {
    font-size: 10px;
  }
  .date-control input {
    width: 142px;
    padding: 8px;
    font-size: 13px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
    padding: 7px 0;
    row-gap: 0;
  }
  .metrics > div {
    padding: 14px 18px;
  }
  .metrics > div:nth-child(2) {
    border-right: 0;
  }
  .metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .metrics strong {
    font-size: 27px;
  }
  .metrics .time-metric {
    font-size: 23px;
  }
  .toolbar {
    gap: 8px;
  }
  .search {
    flex-basis: 100%;
    height: 44px;
  }
  .toolbar select {
    font-size: 13px;
    max-width: 180px;
  }
  .news-card {
    padding: 18px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-wrap {
    padding: 22px 16px;
  }
  .panel {
    padding: 20px;
  }
}
@media (max-width: 520px) {
  .workspace {
    padding: 0 15px;
  }
  .heading {
    flex-wrap: wrap;
    gap: 15px;
  }
  .heading p {
    max-width: none;
  }
  .date-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    font-size: 12px;
  }
  .date-control input {
    width: auto;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .toolbar select {
    max-width: 155px;
    padding: 9px;
    font-size: 12px;
  }
  .toolbar label:last-child select {
    max-width: 105px;
  }
  .section-title h2 {
    font-size: 17px;
  }
  .section-title {
    gap: 8px;
  }
  .metrics > div {
    padding: 13px;
  }
  .metrics small {
    font-size: 11px;
  }
  .news-section {
    margin-bottom: 27px;
  }
  .brand small {
    letter-spacing: 2px;
  }
  .sidebar-bottom {
    gap: 10px;
    right: 15px;
  }
  .sidebar {
    padding-left: 15px;
    padding-right: 15px;
  }
  .heading h1 {
    font-size: 25px;
  }
  dialog {
    padding: 20px;
  }
  .topbar .eyebrow {
    font-size: 12px;
  }
  .news-card h3 {
    font-size: 17px;
  }
  .summary {
    font-size: 14px;
  }
}
/* 窄屏优先露出新闻内容；详细采集状态仍可在管理中心查看。 */
@media (max-width: 520px) {
  .heading {
    padding: 18px 0 15px;
    gap: 10px;
  }
  .heading .section-kicker,
  .heading > div > p {
    display: none;
  }
  .heading h1 {
    font-size: 23px;
    margin-bottom: 0;
  }
  .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 0;
    margin-bottom: 18px;
  }
  .metrics > div {
    padding: 12px 8px;
    align-content: start;
    gap: 6px;
    min-width: 0;
  }
  .metrics > div:nth-child(2) {
    border-right: 1px solid var(--line);
  }
  .metrics > div:nth-child(-n + 2) {
    border-bottom: 0;
  }
  .metrics span {
    font-size: 11px;
    white-space: nowrap;
  }
  .metrics strong {
    font-size: 23px;
    letter-spacing: -0.5px;
  }
  .metrics .time-metric {
    font-size: 16px;
    overflow-wrap: anywhere;
    letter-spacing: 0;
    line-height: 2;
  }
  .metrics small {
    display: none;
  }
  .topbar {
    height: 46px;
  }
}

/* VS Code Dark+：编辑区 #1e1e1e，侧栏 #252526，输入区 #3c3c3c。 */
::selection { background: #264f78; color: #ffffff; }
:root { scrollbar-color: #555555 #1e1e1e; }
.primary-button:hover { background: #1177bb; }
.secondary-button:hover, .icon-button:hover { background: #454545; }
.visitor-info {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  padding: 9px 0;
  min-height: 36px;
  overflow-wrap: anywhere;
}
.visitor-info::before {
  content: "";
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #4ec9b0;
}
.visitor-info strong {
  font-family: Consolas, "Cascadia Code", monospace;
  font-weight: 400;
  color: #9cdcfe;
}
.admin-top { flex-wrap: wrap; gap: 12px; }
.admin-top + .visitor-info { margin-top: -20px; margin-bottom: 10px; }
