:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-muted: #eef2f8;
  --border: #d8e0eb;
  --text: #16202b;
  --muted: #647286;
  --accent: #0f7b6c;
  --accent-strong: #0b5f54;
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 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.45;
}

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

button, input {
  font: inherit;
}

select {
  font: inherit;
}

.shell {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(244, 246, 251, 0.92);
  border-bottom: 1px solid rgba(216, 224, 235, 0.9);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-weight: 700;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-sub,
.metric-label,
.section-header p,
.footer span,
.list-main span,
.list-value span,
.eyebrow {
  color: var(--muted);
}

.brand-sub,
.section-header p,
.footer span,
.list-main span,
.list-value span,
.eyebrow {
  font-size: 0.92rem;
}

.searchbar {
  flex: 1;
  max-width: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.searchbar input,
.language-select select {
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
}

.searchbar button,
.action-row a,
.pager a {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: 0;
  font-weight: 600;
}

.language-select {
  display: grid;
  gap: 4px;
  min-width: 138px;
}

.language-select span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.language-select select {
  padding-right: 34px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 18px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 12px) 18px / 6px 6px no-repeat,
    var(--surface);
}

.searchbar button:hover,
.action-row a:hover,
.pager a:hover {
  background: var(--accent-strong);
}

.statusband {
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

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

.metric {
  min-width: 0;
}

.metric-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric strong {
  font-size: 1.08rem;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.95fr);
  gap: 22px;
  padding: 28px 0 42px;
}

.detail-layout {
  display: grid;
  gap: 22px;
  padding: 28px 0 42px;
}

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

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.section-header h1,
.section-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.tip-hash {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
}

.table-wrap {
  overflow-x: auto;
  padding: 18px 22px 22px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.list {
  display: grid;
  gap: 10px;
  padding: 18px 22px 22px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfe;
}

.list-row:hover {
  border-color: #bfd1de;
  background: #f7fafc;
}

.list-row.neutral:hover {
  border-color: var(--border);
  background: #fbfcfe;
}

.list-main,
.list-value {
  display: flex;
  align-items: center;
  gap: 12px;
}

.list-main {
  min-width: 0;
}

.list-value {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.rank {
  width: 32px;
  color: var(--muted);
  font-weight: 600;
}

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

.detail-grid dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-grid dd {
  margin: 0;
  font-weight: 600;
}

.compact-grid {
  padding-top: 0;
}

.label-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 10px;
  padding: 0 10px;
  border: 1px solid rgba(15, 123, 108, 0.18);
  border-radius: 999px;
  background: rgba(15, 123, 108, 0.08);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 600;
}

.inline-chip {
  margin-top: 8px;
}

.hero-state {
  padding: 30px 22px;
}

.hero-state h1 {
  margin: 0 0 10px;
  font-size: 1.75rem;
}

.action-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 22px 22px;
}

.pager-meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer {
  padding: 0 0 28px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.wrap {
  overflow-wrap: anywhere;
}

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

@media (max-width: 1024px) {
  .metrics,
  .page-grid,
  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-inner,
  .searchbar,
  .language-select,
  .footer-inner,
  .section-header,
  .pager-row {
    display: grid;
  }

  .topbar-inner,
  .section-header {
    justify-content: unset;
  }

  .searchbar {
    max-width: none;
  }

  .metrics {
    gap: 12px;
  }

  .shell {
    width: min(1200px, calc(100vw - 24px));
  }

  th,
  td {
    font-size: 0.94rem;
  }

  .list-row,
  .list-main,
  .list-value {
    align-items: flex-start;
  }

  .list-row {
    flex-direction: column;
  }

  .list-value {
    align-items: flex-start;
  }
}
