.admin-page {
  max-width: 1240px;
  margin: 30px auto;
  min-width: 0;
}
.admin-header,
.admin-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-header h1 {
  margin: 0;
}
.admin-header p {
  color: var(--secondary);
  font-size: 13px;
}
.admin-tabs {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.admin-layout {
  display: grid;
  grid-template-columns: minmax(200px, 270px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
.admin-list,
.admin-editor {
  min-width: 0;
  border: 2px solid var(--strong-line);
  padding: 22px;
  background: var(--surface);
}
.admin-list h2,
.admin-editor h2 {
  font-size: 17px;
  margin: 0 0 20px;
}
.admin-list-items {
  max-height: 620px;
  overflow: auto;
}
.admin-list-item {
  display: grid;
  gap: 8px;
  text-align: left;
  width: 100%;
  padding: 13px 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.admin-list-item[aria-pressed=true] {
  background: var(--surface2);
  border-left: 3px solid var(--accent);
}
.admin-list-item span {
  font-size: 11px;
  color: var(--secondary);
}
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.admin-field {
  display: grid;
  gap: 9px;
  font-size: 12px;
  line-height: 1.7;
  min-width: 0;
}
.admin-field input,
.admin-field textarea,
.admin-field select {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 11px;
  color: var(--text);
  background: var(--surface2);
  border: 2px solid var(--line);
  font: inherit;
  border-radius: 0;
}
.admin-field textarea {
  resize: vertical;
}
.admin-field :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.admin-wide {
  grid-column: 1/-1;
}
.admin-check,
.policy-acknowledgment label {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.9;
  margin: 20px 0;
}
.admin-check input,
.policy-acknowledgment input[type=checkbox] {
  flex: none;
  margin-top: 5px;
  width: 18px;
  height: 18px;
}
.admin-import {
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
}
.admin-import form {
  display: flex;
  align-items: end;
  gap: 16px;
}
.admin-import label {
  flex: 1;
}
.admin-feedback {
  padding: 12px;
  border-left: 3px solid var(--accent);
  line-height: 1.8;
}
.admin-slots {
  border: 1px solid var(--line);
  padding: 15px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
}
.admin-slots legend {
  padding: 0 8px;
}
.admin-help,
.admin-list p,
.admin-site p {
  font-size: 13px;
  line-height: 1.9;
  color: var(--secondary);
}
.admin-site {
  max-width: 850px;
}
.admin-audit > div {
  display: grid;
  grid-template-columns: 180px 200px minmax(0, 1fr);
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-page .form-actions {
  margin-top: 22px;
  flex-wrap: wrap;
}
.legal-page {
  max-width: 820px;
  margin: 40px auto 70px;
  line-height: 1.9;
  font-family: system-ui, sans-serif;
}
.legal-page h1 {
  font-family: inherit;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: -.02em;
  margin: 24px 0 10px;
}
.legal-page h2 {
  font: 700 21px/1.4 system-ui, sans-serif;
  margin: 32px 0 12px;
}
.legal-page p {
  font-size: 16px;
  color: var(--text);
  margin: 12px 0;
}
.legal-page a,
.policy-acknowledgment a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--accent);
}
.legal-date {
  color: var(--secondary) !important;
  font-size: 13px !important;
}
.legal-operator {
  border-left: 3px solid var(--accent);
  padding: 12px 18px;
  margin: 24px 0;
  overflow-wrap: anywhere;
}
.legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
}
.legal-independent {
  width: 100%;
  font-size: 11px;
  color: var(--secondary);
  line-height: 1.8;
  margin: 16px 0 0;
}
.site-footer {
  flex-wrap: wrap;
}
.policy-acknowledgment {
  border-top: 1px solid var(--line);
  margin-top: 20px;
}
.spotlight-section {
  margin: 28px 0 40px;
}
.spotlight-section h2 {
  font-size: 20px;
}
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.spotlight-grid .promo-card {
  width: auto;
}
.spotlight-grid .card-artwork {
  aspect-ratio: 21/9;
  max-height: 340px;
}
.spotlight-grid .promo-title {
  font-size: 23px;
}
.badge.featured {
  color: var(--text);
  background: var(--surface2);
}
[hidden] {
  display: none !important;
}
@media (max-width: 780px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-list-items {
    display: flex;
    max-height: none;
    overflow: auto;
    gap: 8px;
  }
  .admin-list-item {
    min-width: 160px;
    max-width: 230px;
    border: 1px solid var(--line);
  }
  .admin-import form {
    flex-wrap: wrap;
  }
  .admin-import label {
    flex-basis: 100%;
  }
  .admin-audit > div {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .legal-page {
    margin: 25px auto 45px;
  }
  .legal-page h1 {
    font-size: 27px;
  }
}
@media (max-width: 480px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
  .admin-editor,
  .admin-list {
    padding: 16px;
  }
  .admin-tabs .button {
    font-size: 11px;
    padding: 10px;
  }
  .admin-header .button {
    width: 100%;
  }
  .admin-page .button {
    white-space: normal;
  }
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  .legal-page p {
    font-size: 15px;
  }
  .legal-footer {
    gap: 12px;
  }
  .admin-slots {
    gap: 12px;
  }
}
.policy-links {
  display: flex;
  gap: 12px 22px;
  flex-wrap: wrap;
  width: 100%;
  font-size: 12px;
  line-height: 1.8;
}
.policy-links a:hover {
  text-decoration: underline;
}
.independence-note {
  width: 100%;
  font-size: 11px;
  color: var(--secondary);
  line-height: 1.8;
  margin: 8px 0 0;
}
.legal-header {
  max-width: 1392px;
  margin: auto;
  padding: 25px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.legal-header nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
}
.legal-page {
  width: 100%;
  overflow-wrap: anywhere;
}
.legal-page button {
  margin: 12px 0;
}
.legal-page h1,
.legal-page h2 {
  color: var(--text);
}
@media (max-width: 600px) {
  .legal-header {
    padding: 20px;
  }
  .legal-header nav {
    gap: 16px;
    font-size: 11px;
  }
  .policy-links {
    font-size: 11px;
    gap: 10px 16px;
  }
}
.discovery-workspace {
  min-width: 0;
}
.discovery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}
.discovery-header h2 {
  margin: 0;
}
.discovery-modes {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.discovery-search {
  display: flex;
  align-items: end;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}
.discovery-search .admin-field:first-child {
  flex: 1;
  min-width: 180px;
}
.discovery-research {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  line-height: 1.8;
}
.discovery-research span {
  color: var(--secondary);
}
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.discovery-card {
  background: var(--surface);
  border: 2px solid var(--strong-line);
  padding: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.discovery-card h3 {
  font-size: 16px;
  line-height: 1.6;
  margin: 12px 0;
}
.discovery-card p {
  font: 14px/1.8 system-ui, sans-serif;
}
.discovery-meta {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--secondary);
  font: 12px/1.8 system-ui, sans-serif;
}
.discovery-excerpt {
  white-space: pre-wrap;
  max-height: 190px;
  overflow: auto;
}
.discovery-project {
  color: var(--secondary);
}
.discovery-project-header {
  display: flex;
  gap: 14px;
  align-items: center;
}
.discovery-project-header img {
  flex: none;
  object-fit: contain;
}
.discovery-project-header h3,
.discovery-project-header p {
  margin: 0;
}
.discovery-card .form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.discovery-sources {
  font: 13px/1.8 system-ui, sans-serif;
  margin: 24px 0;
}
.discovery-sources > div {
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 15px;
}
.discovery-sources summary {
  cursor: pointer;
}
#discovery-announcement {
  margin-top: 24px;
  scroll-margin-top: 100px;
}
[data-discovery-status] {
  font: 13px/1.8 system-ui, sans-serif;
}
.discovery-empty {
  grid-column: 1/-1;
  padding: 24px 0;
  color: var(--secondary);
}
@media (max-width: 760px) {
  .discovery-grid {
    grid-template-columns: 1fr;
  }
  .discovery-search .admin-field {
    flex-basis: 100%;
  }
  .discovery-header .button {
    width: auto;
  }
  .discovery-card {
    padding: 16px;
  }
  .discovery-card .form-actions {
    gap: 16px;
  }
}
.site-footer.site-footer-compact {
  --footer-muted:var(--muted);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
  gap: 12px 32px;
  padding: 16px 0 18px;
}
.site-footer-compact .footer-rail {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
  min-height: 44px;
}
.site-footer-compact .footer-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  line-height: 1.5;
}
.site-footer-compact .footer-creator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--footer-muted);
  font: 11px/1.5 var(--font);
  white-space: nowrap;
}
.site-footer-compact .footer-creator:hover {
  color: var(--text);
}
.site-footer-compact .footer-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  min-width: 0;
}
.site-footer-compact .footer-group {
  min-width: 0;
}
.site-footer-compact .footer-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  list-style: none;
  cursor: pointer;
  color: var(--secondary);
  font: 11px/1.5 var(--font);
}
.site-footer-compact .footer-group > summary::-webkit-details-marker {
  display: none;
}
.site-footer-compact .footer-group > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.site-footer-compact .footer-group[open] > summary::after {
  transform: rotate(225deg);
}
.site-footer-compact .footer-group > summary:hover,
.site-footer-compact .footer-group[open] > summary {
  color: var(--text);
}
.site-footer-compact .footer-group > summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.site-footer-compact .footer-links,
.site-footer-compact .policy-links {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  width: auto;
  margin: 0;
  padding: 6px 0 2px;
  gap: 0;
  font-size: 11px;
}
.site-footer-compact .footer-group:not([open]) > .footer-links,
.site-footer-compact .footer-group:not([open]) > .policy-links {
  display: none;
}
.site-footer-compact .footer-links > *,
.site-footer-compact .policy-links > a {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  font: 11px/1.6 var(--font);
  color: var(--footer-muted);
}
.site-footer-compact .footer-links > *:hover,
.site-footer-compact .policy-links > a:hover {
  color: var(--text);
}
.site-footer-compact .independence-note {
  grid-column: 1/-1;
  width: auto;
  max-width: 72ch;
  margin: 0;
  color: var(--footer-muted);
  font:
    12px/1.55 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
@media (max-width: 760px) {
  .site-footer.site-footer-compact {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .site-footer-compact .footer-rail {
    justify-content: space-between;
    gap: 16px;
  }
}
html[data-theme=light] .site-footer-compact {
  --footer-muted:var(--secondary);
}
html[data-theme=light] .site-footer-compact .footer-group > summary:focus-visible {
  outline-color: #8b713b;
}
.stats-dashboard {
  min-width: 0;
  color: var(--text);
  font: 15px/1.5 system-ui, sans-serif;
}
.stats-header,
.stats-controls,
.stats-controls label,
.stats-period {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.stats-header {
  justify-content: space-between;
  gap: 12px 24px;
}
.stats-header h2 {
  font: inherit;
  font-family: var(--font);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.6;
  margin: 0;
}
.stats-controls {
  gap: 8px;
}
.stats-controls label {
  gap: 8px;
  font-size: 14px;
}
.stats-controls select,
.stats-controls .button {
  min-height: 44px;
}
.stats-controls select {
  border: 1px solid var(--strong-line);
  border-radius: 0;
  padding: 6px 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.stats-controls .button {
  padding: 8px 14px;
}
.stats-dashboard :is(select, button, summary, .stats-scroll):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.stats-period {
  gap: 2px 16px;
  color: var(--secondary);
  margin: 6px 0 16px;
  font-size: 13px;
}
.stats-status:not(:empty),
.stats-empty {
  margin: 12px 0;
  padding: 10px 14px;
  background: var(--surface2);
  border-left: 3px solid var(--strong-line);
}
.stats-status:empty {
  margin: 0;
}
.stats-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 14px;
  border: 1px solid var(--strong-line);
  background: var(--surface);
}
.stats-metrics > div {
  min-width: 0;
  padding: 12px clamp(12px, 2vw, 22px);
}
.stats-metrics > div + div {
  border-left: 1px solid var(--line);
}
.stats-metrics dt,
.stats-metrics .stats-metric-note {
  color: var(--secondary);
  font-size: 13px;
}
.stats-metrics dd {
  margin: 2px 0 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.3;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.stats-metrics .stats-metric-note {
  font-weight: 400;
}
.stats-box {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--strong-line);
}
.stats-box h3 {
  margin: 0 0 8px;
  font: 600 15px/1.5 system-ui, sans-serif;
}
.stats-note {
  color: var(--secondary);
  font-size: 14px;
  margin: 8px 0 0;
}
.stats-plot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 8px;
}
.stats-axis,
.stats-dates {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--secondary);
  font-variant-numeric: tabular-nums;
}
.stats-axis {
  flex-direction: column;
  text-align: right;
}
.stats-bars {
  height: 112px;
  display: flex;
  align-items: end;
  gap: 1px;
  border-block: 1px solid var(--line);
  background:
    linear-gradient(
      to top,
      transparent calc(50% - .5px),
      var(--line) 50%,
      transparent calc(50% + .5px));
}
.stats-bars > span {
  flex: 1;
  min-width: 0;
  background: var(--accent);
  box-shadow: inset 0 1px var(--strong-line);
}
html[data-theme=light] .stats-bars > span {
  background: #806127;
}
.stats-dates {
  grid-column: 2;
}
.stats-dashboard summary {
  width: fit-content;
  max-width: 100%;
  padding: 10px 0;
  cursor: pointer;
  font-size: 14px;
}
.stats-trend details {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.stats-trend {
  padding-bottom: 4px;
}
.stats-breakdowns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
.stats-scroll {
  overflow: auto;
  max-height: 18rem;
  scrollbar-width: thin;
}
.stats-dashboard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
.stats-dashboard caption {
  text-align: left;
  color: var(--secondary);
  padding: 4px 0 8px;
  font-size: 13px;
}
.stats-dashboard :is(th, td) {
  text-align: left;
  padding: 6px 2px;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.stats-dashboard thead th {
  position: sticky;
  top: 0;
  background: var(--surface);
  color: var(--secondary);
  font-size: 12px;
  font-weight: 600;
}
.stats-dashboard tbody tr {
  border-top: 1px solid var(--line);
}
.stats-dashboard tr > :last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats-definitions {
  margin-top: 8px;
  color: var(--secondary);
}
.stats-definitions p {
  max-width: 78ch;
  margin: 4px 0 12px;
  font-size: 14px;
}
@media (max-width: 800px) {
  .stats-breakdowns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .stats-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-metrics > div:nth-child(3) {
    border-left: 0;
  }
  .stats-metrics > div:nth-child(n+3) {
    border-top: 1px solid var(--line);
  }
  .stats-period span {
    width: 100%;
  }
  .stats-breakdowns {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .stats-box {
    padding-inline: 12px;
  }
}
