:root {
  --ink: #000000;
  --paper: #faf9f7;
  --card-border: #000000;
  --accent: #b98a3d;
  --muted: #6b6b6b;
  --tab-bg: #eeece8;
  --tab-active-bg: #000000;
  --tab-active-ink: #ffffff;
  --brand-blue: #2A93C9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid #e2ded6;
  background: #ffffff;
}

.region-select {
  position: relative;
  display: inline-block;
}

.region-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #d8d3c8;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--tab-bg);
  cursor: pointer;
  font-family: inherit;
}

.region-current:hover {
  background: #e6e2d8;
}

.region-caret {
  font-size: 10px;
  color: var(--muted);
}

.region-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  border: 1px solid #d8d3c8;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  z-index: 20;
}

.region-menu li {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.region-menu li:hover,
.region-menu li.active {
  background: var(--tab-bg);
}

.publisher-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.publisher-name {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 18px;
  color: var(--brand-blue);
  text-transform: uppercase;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #e2ded6;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab-button {
  border: 1px solid var(--card-border);
  background: var(--tab-bg);
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab-button.active {
  background: var(--tab-active-bg);
  color: var(--tab-active-ink);
}

.category-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 24px;
  background: #ffffff;
  border: none;
  border-bottom: 1px solid #e2ded6;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 11;
}

.category-toggle-caret {
  font-size: 12px;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.category-toggle[aria-expanded="true"] .category-toggle-caret {
  transform: rotate(180deg);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.section-heading h1 {
  font-size: 34px;
  margin: 0;
  line-height: 1.15;
}

.section-heading h2 {
  font-size: 22px;
  margin: 2px 0 0;
  color: var(--muted);
  font-weight: 600;
}

.hint {
  margin: 14px 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.provider-card {
  display: block;
  border: 2px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--ink);
  background: #ffffff;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}

a.provider-card:hover {
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--card-border);
}

.provider-card.disabled {
  opacity: 0.55;
  cursor: default;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.logo-badge {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
}

.logo-badge.has-logo {
  background: transparent;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.provider-name {
  font-weight: 800;
  font-size: 21px;
  text-transform: uppercase;
}

.rates {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  margin-left: 86px;
}

.rate-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font-size: 19px;
  font-weight: 700;
}

.rate-label {
  color: var(--muted);
  font-weight: 600;
}

.note {
  margin: 6px 0 0 86px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

.empty-state {
  border: 1px dashed #c9c3b8;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid #e2ded6;
}

@media (max-width: 640px) {
  .site-header { justify-content: center; }
  .section-heading h1 { font-size: 26px; }
  .section-heading h2 { font-size: 17px; }

  .category-toggle {
    display: flex;
  }

  .category-tabs {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 8px 16px 16px;
    top: 49px;
  }

  .category-tabs.collapsed {
    display: none;
  }

  .tab-button {
    text-align: left;
  }

  main {
    padding: 20px 12px 40px;
  }

  .provider-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .provider-card {
    padding: 10px;
    border-radius: 8px;
  }

  .card-top {
    gap: 6px;
    margin-bottom: 6px;
  }

  .logo-badge {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 12px;
  }

  .logo-badge img {
    border-radius: 8px;
  }

  .provider-name {
    font-size: 12px;
    line-height: 1.2;
  }

  .rates {
    margin-left: 0;
    align-items: stretch;
  }

  .rate-row {
    font-size: 13px;
  }

  .rate-label {
    font-size: 11px;
  }

  .note {
    margin-left: 0;
    font-size: 10px;
  }
}
