:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f6f8fb;
  --ink: #07111f;
  --text: #182537;
  --muted: #647286;
  --line: #dbe2eb;
  --line-strong: #c9d4e2;
  --blue: #147efb;
  --cyan: #0aa2c0;
  --green: #0f9f6e;
  --coral: #ec6547;
  --shadow: 0 18px 44px rgba(21, 37, 57, 0.08);
  --radius: 8px;
  --max: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  align-self: stretch;
}

.nav a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 3px solid transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.nav a:hover,
.nav a.is-active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.github-link,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.github-link,
.button-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 10px 22px rgba(7, 17, 31, 0.14);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
}

.section-shell {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 28px;
  align-items: end;
  padding: 56px 0 28px;
}

.section-label {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 880px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: clamp(40px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 720px;
  margin-bottom: 28px;
  color: #314156;
  font-size: 19px;
}

.hero-subtitle a {
  color: var(--blue);
  font-weight: 650;
}

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

.month-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 12px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.month-control label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.month-control select {
  min-width: 150px;
}

.snapshot-panel,
.panel,
.command-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.snapshot-panel {
  padding: 22px;
}

.snapshot-header,
.panel-heading,
.table-heading,
.readme-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.snapshot-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.snapshot-header strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 19px;
}

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

.status-dot {
  position: relative;
  padding-left: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 720;
  white-space: nowrap;
}

.status-dot::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  content: "";
  transform: translateY(-50%);
}

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

.metric-card {
  min-height: 112px;
  padding: 16px;
  background: var(--surface-muted);
  border: 1px solid #e4eaf2;
  border-radius: var(--radius);
}

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

.metric-card strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--blue);
  font-size: 31px;
  line-height: 1;
}

.metric-card small {
  color: var(--green);
  font-weight: 720;
}

.metric-card small.change-negative,
.change-negative {
  color: var(--coral);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  padding: 10px 0 28px;
}

.side-stack {
  display: grid;
  gap: 20px;
}

.panel {
  padding: 22px;
}

.panel-large {
  min-height: 508px;
}

.panel-heading {
  margin-bottom: 22px;
}

.panel-heading.compact {
  align-items: flex-start;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
}

.panel-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.select-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

select,
input {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
}

select {
  padding: 0 34px 0 12px;
}

input {
  width: min(290px, 100%);
  padding: 0 12px;
}

.bar-chart {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 170px) minmax(120px, 1fr) 110px;
  gap: 16px;
  align-items: center;
  min-height: 28px;
}

.bar-label {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  position: relative;
  height: 14px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 0 24.8%, rgba(21, 37, 57, 0.08) 25% 25.2%, transparent 25.4% 49.8%, rgba(21, 37, 57, 0.08) 50% 50.2%, transparent 50.4% 74.8%, rgba(21, 37, 57, 0.08) 75% 75.2%, transparent 75.4%),
    #edf3fa;
  border-radius: 999px;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.bar-value {
  color: #314156;
  font-size: 13px;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.change-positive {
  color: var(--green);
  font-size: 14px;
  font-weight: 780;
  white-space: nowrap;
}

.trend-chart {
  width: 100%;
  height: auto;
  min-height: 210px;
}

.grid-lines line {
  stroke: #dfe7f0;
  stroke-width: 1;
}

.trend-area {
  fill: url("#trendFill");
}

.trend-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.data-notes {
  display: grid;
  gap: 14px;
  margin: 0;
}

.summary-panel {
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
}

.summary-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  position: relative;
  padding-left: 18px;
  color: #314156;
  font-size: 14px;
}

.summary-list li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.data-notes div {
  padding-left: 14px;
  border-left: 3px solid #d7e9ff;
}

.data-notes dt {
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
}

.data-notes dd {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.table-panel {
  padding: 0;
  overflow: hidden;
}

.table-heading {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

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

th {
  background: #fafbfd;
  color: #46566d;
  font-size: 13px;
  font-weight: 760;
}

td {
  color: var(--text);
  font-size: 14px;
}

td:nth-child(1) {
  width: 52px;
  color: var(--muted);
}

.domain-link {
  color: var(--ink);
  font-weight: 720;
  text-decoration: none;
}

.domain-link:hover {
  color: var(--blue);
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  cursor: pointer;
}

.sort-button::after {
  color: #91a1b6;
  content: "↕";
  font-size: 12px;
}

.sort-button.is-sorted {
  color: var(--blue);
}

.sort-button.is-sorted::after {
  content: "↓";
}

.readme-band {
  margin-top: 28px;
  padding: 42px 0;
  background: linear-gradient(180deg, #f7fafc, #eef6f9);
  border-top: 1px solid var(--line);
}

.readme-grid {
  align-items: stretch;
}

.readme-grid h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 30px;
}

.readme-grid p {
  max-width: 760px;
  margin-bottom: 0;
  color: #405069;
}

.command-card {
  display: grid;
  gap: 8px;
  min-width: 360px;
  padding: 18px;
  align-content: center;
}

.command-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.command-card code {
  color: var(--ink);
  font-size: 16px;
  font-weight: 720;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1060px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 16px 22px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .nav a {
    min-height: 44px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .hero,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel-large {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .section-shell,
  .footer {
    width: min(calc(100% - 32px), var(--max));
  }

  .site-header {
    gap: 12px;
    padding-bottom: 12px;
  }

  .brand {
    font-size: 16px;
    white-space: normal;
  }

  .github-link {
    width: 100%;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding-bottom: 0;
    overflow: visible;
  }

  .nav a {
    justify-content: center;
    min-height: 38px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13px;
    text-align: center;
    white-space: normal;
  }

  .nav a:hover,
  .nav a.is-active {
    border-color: #b7d7ff;
    background: #f0f7ff;
  }

  .hero {
    padding-top: 34px;
  }

  h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .month-control {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  .month-control select {
    width: 100%;
  }

  .snapshot-header,
  .panel-heading,
  .table-heading,
  .readme-grid,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric-grid,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .bar-row {
    gap: 6px;
  }

  .bar-value {
    text-align: left;
  }

  .table-tools {
    align-items: stretch;
    width: 100%;
    flex-direction: column;
  }

  input,
  .button,
  .command-card {
    width: 100%;
  }

  .command-card {
    min-width: 0;
  }
}
