body {
  margin: 0;
  background: #fdfdfd;
}

a {
  color: #242424;
  text-decoration: none;
}

a:hover {
  color: #2563eb;
}

button {
  font: inherit;
}

.page {
  container-type: inline-size;
  background: #fdfdfd;
  color: var(--iz-body);
  min-height: 100vh;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 20px 36px;
}

.wrap > * + * {
  margin-top: 40px;
}

.wrap > * {
  min-width: 0;
  max-width: 100%;
}

.top {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #efefef;
  background: #fdfdfd;
}

.wordmark {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--iz-font-mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  color: #242424;
}

.today {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--iz-font-mono);
  font-size: 12px;
}

.today-kicker {
  color: #6d6e70;
}

.today-rank {
  font-weight: 600;
  color: #242424;
  font-variant-numeric: tabular-nums;
}

.today-lang {
  color: #8e8e8e;
}

.live,
.live-wait {
  position: relative;
  width: 8px;
  height: 8px;
  display: inline-flex;
  flex: none;
}

.live-wait {
  border-radius: 9999px;
  background: #c9c9c9;
}

.live-dot,
.live-ping {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #17a34a;
}

.live-ping {
  position: absolute;
  inset: 0;
  animation: izping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.live-dot {
  position: relative;
}

@keyframes izping {
  0% { transform: scale(1); opacity: 0.55; }
  100% { transform: scale(2.8); opacity: 0; }
}

@keyframes izpulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 12px;
}

.hero h1 {
  font-family: var(--iz-font-display);
  font-weight: 500;
  font-size: clamp(28px, 5.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #242424;
  margin: 0;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
}

.hero h1 .hash {
  color: #2563eb;
}

.hero-login {
  font-size: 15px;
  color: #6d6e70;
}

.hero-login:hover {
  color: #2563eb;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #242424;
}

@container (min-width: 520px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@container (min-width: 900px) {
  .stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.stat {
  padding: 14px 16px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-bottom: 1px solid #efefef;
  min-width: 0;
}

.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6d6e70;
}

.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex: none;
}

.stat-value {
  font-family: var(--iz-font-display);
  font-weight: 500;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #242424;
  font-variant-numeric: tabular-nums;
}

.chart-block {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chart-head,
.heat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-head h2,
.heat-head h2,
.repos h2 {
  font-family: var(--iz-font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: #242424;
  margin: 0;
}

.chart-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: #f5f5f5;
}

.seg button {
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--iz-font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: #6d6e70;
}

.seg-mono button {
  padding: 6px 10px;
  font-family: var(--iz-font-mono);
  font-size: 12px;
}

.seg button.is-on {
  background: #fff;
  color: #242424;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px #efefef;
}

.chart-stage {
  position: relative;
}

.chart-stage svg {
  display: block;
  touch-action: pan-y;
  cursor: crosshair;
}

.axis-label {
  position: absolute;
  text-align: right;
  font-family: var(--iz-font-mono);
  font-size: 11px;
  line-height: 14px;
  color: #8e8e8e;
  pointer-events: none;
}

.tick-label {
  position: absolute;
  font-size: 11px;
  line-height: 14px;
  white-space: nowrap;
  pointer-events: none;
}

.tip {
  position: absolute;
  top: 0;
  width: 200px;
  box-sizing: border-box;
  pointer-events: none;
  background: #fff;
  border: 1px solid #efefef;
  border-radius: 12px;
  box-shadow: 0 8px 28px -6px rgba(0, 0, 0, 0.14);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tip-date {
  font-size: 12px;
  color: #6d6e70;
}

.tip-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.tip-rank {
  font-family: var(--iz-font-display);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tip-unit,
.tip-repo {
  font-size: 12px;
  color: #6d6e70;
}

.tip-repo {
  font-family: var(--iz-font-mono);
  color: #242424;
}

.empty {
  position: absolute;
  inset: 0 0 28px 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.empty-card {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #efefef;
  border-radius: 16px;
  padding: 18px 20px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.empty-card strong {
  font-family: var(--iz-font-display);
  font-weight: 500;
  font-size: 18px;
  color: #242424;
}

.empty-card span {
  font-size: 13px;
  color: #6d6e70;
  text-wrap: pretty;
}

.empty-card button {
  margin-top: 6px;
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #242424;
  cursor: pointer;
}

.empty-card button:hover {
  background: #f7f7f7;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12px;
  color: #6d6e70;
}

.legend:empty {
  display: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  flex: none;
}

.heat-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.heat-head {
  align-items: baseline;
  border-top: 1px solid #efefef;
  padding-top: 20px;
}

.heat-caption {
  font-size: 13px;
  color: #6d6e70;
  font-variant-numeric: tabular-nums;
  min-height: 1.2em;
}

.heat-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.heat-board {
  position: relative;
}

.heat-month,
.heat-dow {
  position: absolute;
  font-size: 10px;
  line-height: 12px;
  white-space: nowrap;
  pointer-events: none;
  color: #8e8e8e;
}

.heat-board svg {
  display: block;
}

.repos {
  display: flex;
  flex-direction: column;
}

.repos h2 {
  padding: 20px 0 12px;
  border-top: 1px solid #efefef;
}

.repo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 20px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid #efefef;
  color: #242424;
}

.repo:hover {
  background: #fafafa;
}

.repo-name {
  font-family: var(--iz-font-mono);
  font-size: 15px;
  font-weight: 500;
  color: #242424;
}

.repo-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-blue {
  color: #1d4ed8;
  background:
    linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%) padding-box,
    linear-gradient(180deg, #d6e8fc 0%, #c3defc 100%) border-box;
}

.badge-yellow {
  color: #a67c00;
  background:
    linear-gradient(180deg, #fffdf8 0%, #fffbef 100%) padding-box,
    linear-gradient(180deg, #f3e6c0 0%, #e7dbb9 100%) border-box;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #6d6e70;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a {
  color: #242424;
  font-weight: 500;
}

.footer-links a:hover,
.updated:hover {
  color: #2563eb;
}

.updated {
  color: #6d6e70;
}

.skel {
  border-radius: 10px;
  background: #f0f0f0;
  animation: izpulse 1.4s ease-in-out infinite;
}

.skel-lg {
  height: min(5.6cqw, 60px);
  width: 92%;
}

.skel-sm {
  height: 16px;
  width: min(70%, 420px);
  border-radius: 6px;
  background: #f5f5f5;
}

.skel-repo {
  height: 64px;
  border-radius: 10px;
  background: #f5f5f5;
}

.skel-chart {
  height: 310px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 12px 0 28px 34px;
  box-sizing: border-box;
}

.skel-bar {
  flex: 1;
  border-radius: 2px;
  background: #f0f0f0;
  animation: izpulse 1.4s ease-in-out infinite;
}

@media (max-width: 860px) {
  .hero h1 {
    font-size: clamp(20px, 6.2vw, 32px);
    white-space: normal;
    text-wrap: balance;
    overflow-wrap: break-word;
  }
}
