@font-face {
  font-family: 'Cinzel';
  src: url('assets/fonts/cinzel.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Flex';
  src: url('assets/fonts/roboto-flex.ttf') format('truetype');
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #16161d;
  --ink: #e6e7ed;
  --muted: #bbc0ce;
  --line: #5e6270;
  --accent: #9590f2;
  --soft: #30313b;
  --white: #24252f;
  --focus: #c4b9ff;
  --on-accent: #16161d;
  --control-radius: 10px;
  --table-radius: 14px;
  font-family: 'Roboto Flex',Arial,Helvetica,sans-serif;
  color: var(--ink);
  background: var(--paper);
}

:root[data-theme="light"] {
  color-scheme: light;
  --paper: #f3f4f7;
  --ink: #20212b;
  --muted: #555967;
  --line: #7a7e8c;
  --accent: #5d51a6;
  --soft: #e4e5ee;
  --white: #ffffff;
  --focus: #51448f;
  --on-accent: #ffffff;
}

@media(prefers-color-scheme:light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --paper: #f3f4f7;
    --ink: #20212b;
    --muted: #555967;
    --line: #7a7e8c;
    --accent: #5d51a6;
    --soft: #e4e5ee;
    --white: #ffffff;
    --focus: #51448f;
    --on-accent: #ffffff;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

button,input,select {
  font: inherit;
}

button,a,input,select {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: .55;
}

a {
  color: inherit;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,.table-scroll:focus-visible,main:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

button {
  color: var(--ink);
}

[hidden] {
  display: none!important;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  background: var(--ink);
  color: var(--paper);
  padding: 14px;
  z-index: 10;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.masthead,main,footer {
  width: min(1440px,calc(100% - 96px));
  margin-inline: auto;
}

.masthead {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

#theme-toggle:hover {
  color: var(--ink);
}

#theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 16px;
}

.brand>div {
  min-width: 0;
}

.brand img {
  flex: none;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
}

h1,h2 {
  font-family: 'Cinzel',Georgia,serif;
  font-weight: 400;
}

h1 {
  font-size: 32px;
  margin: 0;
  letter-spacing: -.04em;
}

main {
  padding-block: 20px 48px;
}

.intro {
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(24px,2.4vw,32px);
  line-height: 1.1;
  letter-spacing: -.045em;
  margin: 0;
}

.filters {
  border-block: 1px solid var(--line);
  padding-block: 18px 20px;
  scroll-margin-top: 20px;
}

.section-line,.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.section-line {
  margin-bottom: 22px;
}

h3 {
  font-size: 12px;
  letter-spacing: .015em;
  margin: 0;
  font-weight: 700;
}

#reset-filters {
  border: 0;
  background: var(--accent);
  font-size: 12px;
  color: var(--on-accent);
  border-radius: var(--control-radius);
  min-height: 44px;
  padding: 10px 14px;
  transition: background .15s;
}

#reset-filters:not(:disabled):hover,.error-state button:hover {
  background: var(--focus);
}

#reset-filters span {
  margin-left: 10px;
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.search-field {
  max-width: 500px;
  margin-bottom: 18px;
}

input,select {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  background: var(--white);
  color: var(--ink);
  font-size: 12px;
  transition: border-color .15s,background .15s;
}

input::placeholder {
  color: var(--muted);
}

input:hover,select:hover {
  border-color: var(--accent);
}

.category-filters {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 16px;
}

select {
  padding-right: 26px;
  text-overflow: ellipsis;
}

.results {
  margin-top: 24px;
}

.results-bar {
  margin-bottom: 14px;
}

.results-bar p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.table-help {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.table-help span {
  display: none;
}

.table-scroll {
  position: relative;
  overflow: auto;
  max-width: 100%;
  border-radius: var(--table-radius);
  background: var(--white);
}

table {
  width: 100%;
  min-width: 1200px;
  border-collapse: collapse;
  text-align: left;
  font-size: 12px;
  line-height: 1.45;
}

thead {
  background: var(--soft);
}

th {
  font-size: 11px;
  letter-spacing: .035em;
  font-weight: 700;
  padding: 16px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}

th button {
  border: 0;
  background: transparent;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  min-height: 30px;
  text-align: left;
}

th button:hover {
  color: var(--accent);
}

th button span {
  color: var(--accent);
}

th:first-child {
  padding-left: 20px;
}

td {
  padding: 17px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

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

tbody tr:hover {
  background: var(--soft);
}

td:first-child {
  font-family: 'Roboto Flex',Arial,Helvetica,sans-serif;
  font-size: 15px;
  padding-left: 20px;
  min-width: 190px;
  max-width: 260px;
  overflow-wrap: anywhere;
}

td:nth-child(3) {
  max-width: 190px;
}

td:nth-child(4) {
  max-width: 150px;
}

td:nth-child(5) {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--accent);
}

td:nth-child(6) {
  white-space: nowrap;
  font-size: 11px;
}

td:nth-child(7) {
  max-width: 140px;
}

td:last-child {
  min-width: 180px;
  max-width: 250px;
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.empty-state,.error-state {
  text-align: center;
  padding: 44px 20px;
  border-bottom: 1px solid var(--line);
}

h4 {
  font-family: 'Cinzel',Georgia,serif;
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 12px;
}

.empty-state p,.error-state p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.error-state button {
  border: 1px solid var(--accent);
  border-radius: var(--control-radius);
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
}

footer {
  padding-block: 24px 30px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
}

footer span:first-child {
  font-weight: 700;
  letter-spacing: .06em;
}

noscript p {
  padding: 20px;
  text-align: center;
}

@media(max-width:1300px) {
  .table-help span {
    display: inline;
  }
}

@media(max-width:760px) {
  .masthead,main,footer {
    width: calc(100% - 40px);
  }
  .masthead {
    padding-top: 24px;
    flex-wrap: wrap;
    gap: 8px;
  }
  #theme-toggle {
    margin-left: auto;
  }
  .brand {
    gap: 13px;
    padding-bottom: 12px;
  }
  .brand img {
    width: 54px;
    height: 54px;
  }
  h1 {
    font-size: 24px;
  }
  .eyebrow {
    font-size: 9px;
  }
  nav a {
    font-size: 11px;
  }
  main {
    padding-top: 16px;
  }
  .intro {
    margin-bottom: 18px;
  }
  .registry-count span {
    max-width: 90px;
    font-size: 9px;
    line-height: 1.5;
  }
  .category-filters {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 18px 12px;
  }
  .category-filters>div:last-child {
    grid-column: 1/-1;
  }
  .search-field {
    max-width: none;
  }
  .results-bar {
    align-items: flex-start;
  }
  .results-bar p {
    text-align: right;
    max-width: 210px;
    line-height: 1.5;
  }
  .table-help {
    font-size: 10px;
  }
  footer {
    font-size: 9px;
    line-height: 1.6;
  }
  input,select {
    font-size: 16px;
  }
  th button {
    min-height: 44px;
  }
  .filters {
    padding-block: 20px;
  }
  .section-line {
    margin-bottom: 18px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none!important;
  }
}
