:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f0f4f8;
  --ink: #111827;
  --muted: #5f6b7a;
  --line: #d9e0ea;
  --blue: #1d4ed8;
  --teal: #0f766e;
  --amber: #b45309;
  --violet: #6d28d9;
  --red: #b42318;
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(246, 247, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: #111827;
  border-radius: 8px;
  font-weight: 800;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(22px, 4vw, 34px);
  line-height: 1.08;
}

.layout {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 28px) 48px;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: end;
  padding: clamp(20px, 4vw, 34px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-copy h2 {
  max-width: 820px;
  margin-bottom: 12px;
  font-size: clamp(30px, 5.2vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.muted {
  color: var(--muted);
}

.compact {
  margin-bottom: 0;
}

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

.metric {
  min-height: 78px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  font-size: 28px;
}

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

.toolbar {
  margin: 18px 0 12px;
  overflow-x: auto;
}

.tabs {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.tab,
.icon-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.tab {
  padding: 0 14px;
}

.tab.active {
  color: #fff;
  background: #111827;
  border-color: #111827;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  white-space: nowrap;
}

.icon-button[disabled] {
  cursor: wait;
  opacity: 0.58;
}

.source-status {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.source-pill {
  min-width: 0;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  text-decoration: none;
}

.source-pill strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-pill span {
  color: var(--muted);
}

.content-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 3vw, 34px);
}

.section-heading > p {
  max-width: 420px;
  margin-bottom: 3px;
  text-align: right;
}

.release-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.release-card,
.blog-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.release-card {
  border-top: 5px solid var(--blue);
}

.blog-card {
  border-top: 5px solid var(--teal);
}

[data-source="claude-code"] {
  border-top-color: var(--amber);
}

[data-source="anthropic"] {
  border-top-color: var(--violet);
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #fff;
  background: #242424;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.release-card h3,
.blog-card h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.25;
}

.summary {
  margin-bottom: 12px;
  color: #273244;
  line-height: 1.72;
}

.install-hint {
  padding: 10px 0;
  margin-bottom: 12px;
  color: #312a1d;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}

.release-notes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.release-note {
  border-top: 1px solid var(--line);
}

.release-note summary {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
}

.release-note summary::-webkit-details-marker {
  display: none;
}

.note-index {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: #111827;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.note-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.note-impact {
  padding: 4px 7px;
  color: var(--blue);
  background: #e8efff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.note-body {
  padding: 0 0 12px 38px;
  color: #334155;
  line-height: 1.68;
}

.note-body p {
  margin-bottom: 8px;
}

.original-text,
.original {
  color: var(--muted);
  font-size: 13px;
}

.summary-list {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #334155;
  line-height: 1.65;
}

.original {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}

.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

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

.tag {
  padding: 4px 7px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 6px;
  font-size: 12px;
}

.source-link {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.empty {
  grid-column: 1 / -1;
  padding: 28px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

@media (max-width: 980px) {
  .hero-panel,
  .release-grid,
  .blog-grid,
  .source-status {
    grid-template-columns: 1fr 1fr;
  }

  .hero-panel {
    align-items: start;
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
    padding: 12px 14px;
  }

  .brand-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .icon-button span:last-child {
    display: none;
  }

  .layout {
    padding: 12px 12px 36px;
  }

  .hero-panel,
  .metric-row,
  .source-status,
  .release-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 18px;
  }

  .hero-copy h2 {
    font-size: 33px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 8px;
    text-align: left;
  }

  .release-card,
  .blog-card {
    padding: 16px;
  }

  .release-note summary {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .note-impact {
    grid-column: 2;
    justify-self: start;
  }

  .note-title {
    white-space: normal;
  }

  .note-body {
    padding-left: 0;
  }

  .release-notes {
    max-height: none;
    overflow: visible;
  }
}
