html {
  overflow-x: hidden;
}

body {
  font-family: "Cinzel", "Copperplate", serif;
  margin: 2rem;
  color: #111;
  background: #fff;
}

.num, .stat-value, .range {
  font-family: "Copperplate", "Copperplate Gothic Light", serif;
}

td a, th a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  padding: 1px 5px;
  border-radius: 4px;
  transition: background 0.15s ease, text-decoration-color 0.15s ease;
}

td a:hover, th a:hover {
  background: #f0f0f0;
  text-decoration-color: #888;
}

h1 {
  margin-bottom: 0.25rem;
}

h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.meta {
  color: #666;
  margin-bottom: 1.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1rem;
}

.site-header img {
  height: 80px;
  width: auto;
  display: block;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  margin-top: 21px;
}

.main-nav a {
  text-decoration: none;
  color: #111;
  font-size: 1.1rem;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fafafa;
}

.main-nav a:hover {
  background: #eee;
}

.low-activity {
  display: none;
}

.search {
  max-width: 700px;
  margin-bottom: 1rem;
}

.search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  box-sizing: border-box;
}

.search input:focus {
  outline: none;
  border-color: #888;
  background: #fff;
}

.anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.anchors a {
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  color: #111;
  text-decoration: none;
  background: #fafafa;
}

.anchors a:hover {
  background: #eee;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin-bottom: 1.5rem;
}

.stat {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: #fafafa;
}

.stat-label {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 1200px;
  margin-bottom: 1.5rem;
}

.index-table {
  max-width: 700px;
}

.item-table {
  max-width: 800px;
}

th, td {
  border-bottom: 1px solid #ddd;
  padding: 0.55rem 0.7rem;
  text-align: left;
}

th {
  background: #f5f5f5;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th:hover {
  background: #eee;
}

th.sort-asc::after {
  content: " ▲";
  color: #777;
}

th.sort-desc::after {
  content: " ▼";
  color: #777;
}

.section-title td {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f0f0f0;
  padding: 1.25rem 0.7rem 0.75rem;
  border-top: 1px solid #ccc;
  text-align: left;
  cursor: default;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.num {
  line-height: 2.4em;
}

.range {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.price-icon {
  height: 2.4em;
  width: 2.4em;
  vertical-align: middle;
  margin-right: 0.4em;
}

.footer {
  margin-top: 2rem;
  color: #777;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  body {
    margin: 1rem;
  }

  .main-nav {
    margin-top: 0;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  table {
    max-width: none;
  }

  tr {
    border: 1px solid #ddd;
    border-radius: 0.75rem;
    margin-bottom: 0.9rem;
    padding: 0.6rem 0.7rem;
    background: #fff;
  }

  td {
    border-bottom: 0;
    padding: 0.35rem 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    text-align: right;
  }

  td::before {
    content: attr(data-label);
    font-family: "Cinzel", "Copperplate", serif;
    font-weight: 600;
    color: #555;
    text-align: left;
  }

  td:first-child {
    display: block;
    text-align: left;
    font-size: 1.05rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.35rem;
    border-bottom: 1px solid #eee;
  }

  td:first-child::before {
    content: "";
  }

  .num {
    text-align: right;
  }
}
