:root {
  color-scheme: light;
  --iiru-blue: #2a83b7;
  --iiru-blue-dark: #1a69a5;
  --iiru-blue-light: #30bdec;
  --iiru-blue-pale: #74b8df;
  --ink: #404040;
  --ink-soft: #595959;
  --muted: #a6a6a6;
  --line: #d9d9d9;
  --paper: #ffffff;
  --page: #f5f7f9;
  --panel: #eef4f8;
  --shadow: 0 18px 44px rgba(26, 105, 165, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: MiSans, "MiSans VF", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    linear-gradient(90deg, rgba(42, 131, 183, 0.06) 0 1px, transparent 1px 80px),
    linear-gradient(180deg, rgba(42, 131, 183, 0.045) 0 1px, transparent 1px 80px),
    var(--page);
  color: var(--ink);
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  width: min(1720px, calc(100vw - 56px));
  margin: 0 auto;
  padding: 24px 0 44px;
}

.nav-strip {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line);
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 10px 30px rgba(64, 64, 64, 0.06);
}

.nav-progress {
  position: absolute;
  left: -1px;
  right: -1px;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, var(--iiru-blue-dark), var(--iiru-blue-light));
  transform: scaleX(var(--load-progress, 0));
  transform-origin: left center;
  transition: transform 0.24s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 8px;
  color: var(--iiru-blue);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
}

.category-select-wrap {
  display: flex;
  align-items: center;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}

.category-select-wrap select {
  min-width: 220px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 38px 0 12px;
  outline: 0;
  cursor: pointer;
}

.category-select-wrap select:focus {
  border-color: var(--iiru-blue);
  box-shadow: 0 0 0 3px rgba(42, 131, 183, 0.14);
}

.category-select-wrap option {
  color: var(--ink);
  background: #fff;
}

.ghost-btn {
  border: 1px solid var(--iiru-blue);
  border-radius: 8px;
  color: #fff;
  background: var(--iiru-blue);
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 700;
}

.ghost-btn:hover {
  background: var(--iiru-blue-dark);
  border-color: var(--iiru-blue-dark);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.nav-spacer {
  flex: 1;
}

.history-updated {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.data-health {
  width: 10px;
  height: 10px;
  display: inline-block;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #46b86a;
  box-shadow: 0 0 0 4px rgba(70, 184, 106, 0.14);
}

.data-health--ok {
  background: #46b86a;
  box-shadow: 0 0 0 4px rgba(70, 184, 106, 0.14);
}

.data-health--warn {
  background: #d19a2a;
  box-shadow: 0 0 0 4px rgba(209, 154, 42, 0.16);
}

main {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 16px;
}

.lead-card {
  min-height: 250px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(64, 64, 64, 0.06);
  grid-column: span 2;
  display: flex;
  flex-direction: column;
}

.lead-bg {
  min-height: 250px;
  background:
    linear-gradient(90deg, rgba(26, 105, 165, 0.86), rgba(42, 131, 183, 0.18)),
    linear-gradient(135deg, #2a83b7, #74b8df);
}

.lead-bg[style] {
  background-size: cover;
  background-position: center;
  transform: none;
}

.lead-content {
  max-width: 820px;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 0;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--iiru-blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.lead-card h1 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.25;
}

.lead-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.58;
}

.news-grid {
  display: contents;
}

.news-card {
  min-height: 250px;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 22px rgba(64, 64, 64, 0.06);
}

.news-card:hover {
  border-color: rgba(42, 131, 183, 0.45);
  box-shadow: 0 14px 34px rgba(26, 105, 165, 0.12);
}

.news-card.featured {
  grid-column: span 2;
}

.card-art {
  aspect-ratio: 2 / 1;
  min-height: 0;
  background:
    linear-gradient(135deg, rgba(42, 131, 183, 0.88), rgba(116, 184, 223, 0.68)),
    var(--panel);
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  position: relative;
}

.card-art.has-image {
  min-height: 0;
}

.lead-art {
  width: 100%;
}

.lead-track {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  width: 200%;
  transform: translateX(0);
}

.lead-panel {
  flex: 0 0 50%;
  min-width: 50%;
  height: 100%;
  z-index: 0;
  background:
    linear-gradient(135deg, rgba(42, 131, 183, 0.88), rgba(116, 184, 223, 0.68)),
    var(--panel);
  background-position: center;
  background-size: cover;
}

.lead-art.lead-animating .lead-track {
  animation: leadTrackSlide 0.76s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

@keyframes leadTrackSlide {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.lead-copy-current,
.lead-copy-next {
  pointer-events: none;
}

.lead-copy-next {
  opacity: 0;
}

.lead-copy-current a,
.lead-copy-next a {
  pointer-events: auto;
}

.lead-art.lead-animating .lead-copy-current {
  animation: leadCopyOut 0.76s linear both;
}

.lead-art.lead-animating .lead-copy-next {
  animation: leadCopyIn 0.76s linear both;
}

@keyframes leadCopyOut {
  0% {
    opacity: 1;
  }
  45%,
  100% {
    opacity: 0;
  }
}

@keyframes leadCopyIn {
  0%,
  48% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.overlay-art {
  min-height: 100%;
  padding: 0;
}

.overlay-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03) 18%, rgba(0, 0, 0, 0.72) 100%);
}

.overlay-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.lead-card .overlay-content {
  bottom: 38px;
}

.lead-dots {
  position: absolute;
  left: 50%;
  bottom: 13px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transform: translateX(-50%);
}

.lead-dot {
  appearance: none;
  border: 0;
  padding: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.32);
  cursor: pointer;
  transition: width 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.lead-dot.active {
  width: 20px;
  background: #fff;
}

.lead-dot:hover,
.lead-dot:focus-visible {
  background: #fff;
  transform: translateY(-1px);
  outline: none;
}

.overlay-content .meta,
.overlay-content .meta span:first-child,
.overlay-content .summary {
  color: rgba(255, 255, 255, 0.88);
}

.overlay-content h2 {
  color: #fff;
}

.overlay-content h2 a,
.lead-card h1 a {
  color: #fff;
}

.overlay-content .summary {
  margin-bottom: 0;
}

.card-body {
  padding: 15px 16px 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.meta span:first-child:not(.brand-name) {
  color: var(--iiru-blue-dark);
  font-weight: 700;
}

.brand-name {
  max-width: 160px;
  overflow: hidden;
  color: var(--brand-color, var(--iiru-blue-dark));
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta span.brand-name {
  color: var(--brand-color, var(--iiru-blue-dark));
}

.overlay-content .meta span.brand-name {
  color: var(--brand-color, var(--iiru-blue-dark));
  text-shadow: 0 1px 5px rgba(255, 255, 255, 0.55);
}

.lead-card .overlay-content .meta span.brand-name {
  max-width: 260px;
  font-size: 18px;
  line-height: 1;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.news-card h2 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.28;
}

.news-card h2 a:hover {
  color: var(--iiru-blue);
}

.summary {
  margin: 0 0 16px;
  color: var(--ink-soft);
  line-height: 1.58;
}

.card-actions {
  display: none;
}

.status {
  color: var(--muted);
  font-size: 13px;
}

.open-source {
  margin-left: auto;
  color: var(--iiru-blue);
  font-weight: 800;
}

.load-more-gate {
  grid-column: 1 / -1;
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 18px;
  padding: 2px 8px 0;
}

.load-more-gate[hidden] {
  display: none;
}

.load-more-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.load-more-dots {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 58px;
  height: 38px;
  padding: 0 12px;
  cursor: default;
}

.load-more-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--iiru-blue);
  opacity: 0.58;
}

.load-more-dots:hover i {
  opacity: 1;
}

.load-more-gate.loading .load-more-dots i {
  animation: dotPulse 0.9s ease-in-out infinite;
}

.load-more-gate.loading .load-more-dots i:nth-child(2) {
  animation-delay: 0.12s;
}

.load-more-gate.loading .load-more-dots i:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 0.38;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.skeleton {
  opacity: 0.72;
}

.skeleton .card-art,
.skeleton h2,
.skeleton .summary {
  background: linear-gradient(90deg, #f0f2f4, #d9d9d9, #f0f2f4);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  color: transparent;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1180px) {
  .page-shell {
    width: min(100vw - 28px, 1080px);
  }

  main {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 820px) {
  main {
    grid-template-columns: 1fr;
  }

  .page-shell {
    width: min(100vw - 20px, 760px);
    padding-top: 10px;
  }

  .news-card.featured {
    grid-column: span 1;
  }

  .lead-card {
    grid-column: span 1;
  }

  .nav-strip {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .category-select-wrap,
  .category-select-wrap select,
  .ghost-btn,
  .history-updated {
    width: 100%;
  }

  .history-updated {
    white-space: normal;
  }

  .category-select-wrap {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .nav-spacer {
    display: none;
  }

  main {
    padding: 12px;
    gap: 12px;
  }
}
