:root {
  color-scheme: light;
  --ink: #171719;
  --muted: #68666b;
  --paper: #f7f5f0;
  --surface: #ffffff;
  --surface-subtle: #f0ede6;
  --line: #dedad2;
  --red: #9f1d2d;
  --red-dark: #77131f;
  --gold: #e6af2e;
  --gold-pale: #f9edcd;
  --green: #317357;
  --shadow: 0 16px 48px rgb(36 28 25 / 8%);
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
select,
input[type="checkbox"] {
  cursor: pointer;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: white;
  color: var(--red);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  padding: 0 max(1.25rem, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 83% 25%, rgb(230 175 46 / 28%), transparent 24%),
    linear-gradient(120deg, #72101d 0%, #a61f31 48%, #72101d 100%);
  color: white;
}

.hero::after {
  position: absolute;
  right: -9rem;
  bottom: -20rem;
  width: 47rem;
  height: 47rem;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 50%;
  box-shadow:
    0 0 0 7rem rgb(255 255 255 / 3%),
    0 0 0 14rem rgb(255 255 255 / 3%);
  content: "";
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 86px;
  border-bottom: 1px solid rgb(255 255 255 / 20%);
}

.wordmark {
  display: inline-flex;
  gap: 0.7rem;
  align-items: center;
  color: white;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark-mark {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 50%);
  border-radius: 50%;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1rem;
  letter-spacing: 0;
}

.source-link {
  padding-bottom: 0.2rem;
  border-bottom: 1px solid rgb(255 255 255 / 55%);
  color: rgb(255 255 255 / 90%);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.source-link:hover {
  color: white;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 7.6rem 0 9.3rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.hero h1 span {
  color: var(--gold-pale);
  font-style: italic;
}

.hero-copy {
  max-width: 630px;
  margin: 2rem 0 0;
  color: rgb(255 255 255 / 76%);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.hero-stats {
  position: absolute;
  z-index: 2;
  right: max(1.25rem, calc((100vw - 1180px) / 2));
  bottom: 0;
  left: max(1.25rem, calc((100vw - 1180px) / 2));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgb(255 255 255 / 20%);
}

.hero-stats div {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  padding: 1.55rem 1.3rem 1.7rem;
  border-right: 1px solid rgb(255 255 255 / 20%);
}

.hero-stats div:first-child {
  padding-left: 0;
}

.hero-stats div:last-child {
  border-right: 0;
}

.hero-stats strong {
  font-family: Georgia, serif;
  font-size: 1.85rem;
  font-weight: 400;
}

.hero-stats span {
  color: rgb(255 255 255 / 65%);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

main {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.progress-panel {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 0.85fr 1.25fr auto;
  gap: 2.5rem;
  align-items: center;
  margin: -2.3rem 0 6.5rem;
  padding: 2.15rem 2.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.progress-panel .section-kicker,
.catalog .section-kicker {
  margin-bottom: 0.55rem;
  color: var(--red);
}

.progress-copy h2 {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  margin: 0;
}

#owned-count {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  font-weight: 400;
}

.progress-total {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.progress-track {
  overflow: hidden;
  height: 0.6rem;
  border-radius: 999px;
  background: var(--surface-subtle);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #c5394b);
  transition: width 300ms ease;
}

.progress-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.button,
.text-button {
  border: 0;
  background: none;
  font-weight: 800;
}

.button {
  min-height: 2.65rem;
  padding: 0 1rem;
  border-radius: 0.55rem;
  font-size: 0.76rem;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #aaa49a;
}

.button-primary {
  background: var(--red);
  color: white;
}

.button-quiet {
  padding: 0 0.45rem;
  color: var(--muted);
}

.button-quiet:hover,
.text-button:hover {
  color: var(--red);
}

.catalog {
  padding-bottom: 7rem;
}

.catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.catalog-heading h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
}

#result-count {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.catalog-summary {
  display: grid;
  gap: 0.25rem;
  justify-items: end;
}

.group-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  color: #aaa49a;
  font-size: 0.7rem;
}

.group-actions button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.group-actions button:hover {
  color: var(--red);
}

.group-actions button:disabled {
  color: #bcb7af;
  cursor: default;
}

.filters {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 260px 180px;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field svg {
  position: absolute;
  left: 1rem;
  width: 1.1rem;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.8;
}

.search-field input,
.select-field select {
  width: 100%;
  min-height: 3.35rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  outline: none;
  background: var(--paper);
  color: var(--ink);
}

.search-field input {
  padding: 0 1rem 0 2.85rem;
}

.search-field input:focus,
.select-field select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgb(159 29 45 / 12%);
}

.search-field input::placeholder {
  color: #969198;
}

.select-field {
  position: relative;
}

.select-field span {
  position: absolute;
  z-index: 1;
  top: 0.48rem;
  left: 0.85rem;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  pointer-events: none;
  text-transform: uppercase;
}

.select-field select {
  padding: 1rem 2rem 0 0.8rem;
  font-size: 0.83rem;
  font-weight: 700;
}

.filter-toggles {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  min-height: 4rem;
  padding: 0 1rem;
}

.toggle {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.toggle input,
.card-checkbox {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--red);
}

.text-button {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.76rem;
}

.loading-state,
.empty-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  color: var(--muted);
}

.loading-state {
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.loading-state span {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  gap: 0.6rem;
  padding: 3rem;
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-family: Georgia, serif;
  font-size: 1.5rem;
}

.empty-state .button {
  margin-top: 1rem;
}

.card-groups {
  display: grid;
  gap: 1.35rem;
}

.card-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  box-shadow: 0 6px 22px rgb(36 28 25 / 4%);
}

.group-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.25rem 1.4rem;
  border-bottom: 1px solid var(--line);
  background: #eeebe4;
  cursor: pointer;
  list-style: none;
  transition: background 150ms ease;
}

.group-header::-webkit-details-marker {
  display: none;
}

.group-header:hover {
  background: #e7e3da;
}

.group-header:focus-visible {
  outline: 3px solid rgb(159 29 45 / 28%);
  outline-offset: -3px;
}

.card-group:not([open]) .group-header {
  border-bottom: 0;
}

.group-header h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}

.group-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.group-progress {
  overflow: hidden;
  width: 72px;
  height: 0.3rem;
  border-radius: 999px;
  background: #d9d5cd;
}

.group-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 200ms ease;
}

.group-chevron {
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border: 1px solid #d0cbc2;
  border-radius: 50%;
  color: var(--muted);
  transition: transform 180ms ease;
}

.group-chevron svg {
  width: 0.75rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.card-group[open] .group-chevron {
  transform: rotate(180deg);
}

.card-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-row {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-height: 5.15rem;
  padding: 0.8rem 1.4rem;
  border-bottom: 1px solid #ebe8e2;
  transition: background 150ms ease;
}

.card-row:last-child {
  border-bottom: 0;
}

.card-row:hover {
  background: #fbfaf7;
}

.card-row.is-owned {
  background: #f5faf7;
}

.checkbox-wrap {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
}

.card-checkbox {
  width: 1.25rem;
  height: 1.25rem;
}

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

.card-title {
  margin: 0 0 0.38rem;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.card-row.is-owned .card-title {
  color: var(--green);
}

.card-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.card-detail span:not(.badge)::before {
  margin-right: 0.85rem;
  color: #c2bdb5;
  content: "•";
}

.card-detail span:first-child::before,
.card-detail .badge::before,
.card-detail .badge + span::before {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  padding: 0 0.43rem;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: #615d56;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-official {
  background: var(--gold-pale);
  color: #7d5800;
}

.badge-special {
  background: #f3e1e4;
  color: var(--red);
}

.card-source {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
}

.card-source:hover {
  color: var(--red);
}

.card-source svg {
  width: 0.85rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 2.2rem max(1.25rem, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  background: #ece9e2;
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--red);
  font-weight: 800;
  text-decoration: none;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 1.25rem;
  bottom: 1.25rem;
  max-width: min(360px, calc(100vw - 2.5rem));
  padding: 0.9rem 1.1rem;
  border-radius: 0.6rem;
  background: var(--ink);
  box-shadow: var(--shadow);
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 960px) {
  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 6rem;
  }

  .progress-panel {
    grid-template-columns: 1fr 1.7fr;
  }

  .progress-actions {
    grid-column: 1 / -1;
  }

  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 690px;
  }

  .topbar {
    min-height: 72px;
  }

  .source-link {
    font-size: 0.74rem;
  }

  .hero-content {
    padding: 5rem 0 11rem;
  }

  .hero h1 {
    font-size: clamp(2.85rem, 15vw, 4.5rem);
  }

  .hero-copy {
    font-size: 0.95rem;
  }

  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats div {
    padding: 1rem 0.75rem;
    border-top: 1px solid rgb(255 255 255 / 20%);
  }

  .hero-stats div:nth-child(odd) {
    padding-left: 0;
  }

  .hero-stats div:nth-child(2) {
    border-right: 0;
  }

  .hero-stats strong {
    font-size: 1.45rem;
  }

  main {
    width: min(100% - 1.5rem, 1180px);
  }

  .progress-panel {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 4.5rem;
    padding: 1.5rem;
  }

  .progress-actions {
    grid-column: auto;
    flex-wrap: wrap;
  }

  .catalog-heading {
    display: block;
  }

  .catalog-summary {
    margin-top: 0.8rem;
    justify-items: start;
  }

  #result-count {
    margin: 0;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  .filter-toggles {
    flex-wrap: wrap;
    gap: 0.8rem 1.2rem;
    padding: 1rem 0.2rem 1.3rem;
  }

  .text-button {
    margin-left: 0;
  }

  .group-header {
    gap: 0.7rem;
    padding: 1rem;
  }

  .group-progress {
    display: none;
  }

  .card-row {
    grid-template-columns: 2rem minmax(0, 1fr);
    padding: 0.85rem 0.75rem;
  }

  .checkbox-wrap {
    width: 2rem;
  }

  .card-source {
    grid-column: 2;
    justify-self: start;
    padding: 0.2rem 0;
  }

  footer {
    display: grid;
    gap: 1rem;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
