* {
  box-sizing: border-box;
}

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-y: scroll;
  overscroll-behavior-y: none;
  min-height: 100%;
  background-color: #fff;
  background-image:
    repeating-linear-gradient(45deg, #000 0 1px, transparent 1px 30px),
    repeating-linear-gradient(-45deg, #000 0 1px, transparent 1px 30px);
  background-attachment: fixed;
}

html.admin-shell {
  background: #fff;
}

body {
  position: relative;
  min-height: 100svh;
  margin: 0;
  line-height: 1.65;
  background: transparent;
  isolation: isolate;
}

.grid-canvas {
  position: fixed;
  top: -24px;
  left: -24px;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  filter: blur(8px);
}

img {
  max-width: 100%;
  height: auto;
}

input,
textarea,
select,
button {
  font: inherit;
}

a,
a:visited,
a:hover,
a:focus,
a:active {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-header,
.home-hero,
.page,
.site-footer,
.flash,
.notice,
.preview-banner {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: block;
  width: min(160px, 42vw);
  flex: 0 0 auto;
}

.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.home-hero h1,
.lead,
.page h1,
.page h2,
.page h3,
.page p,
.site-footer p {
  display: inline;
}

.home-hero h1::after,
.lead::after,
.page h1::after,
.page h2::after,
.page h3::after,
.page p::after,
.site-footer p::after {
  content: "";
  display: block;
  margin-bottom: 1rem;
}

.page li,
.page dt,
.page dd {
  display: table;
}

.prose ol li {
  display: list-item;
}

.nav,
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.nav a {
  padding: 0 0.2rem;
}

.nav a.active {
  background: #111;
  color: #fff !important;
  text-decoration-color: #fff;
}

.meta,
.field-help,
.back-link {
  color: #666;
  font-size: 0.92rem;
}

.home-hero {
  width: 100%;
}

.home-logo {
  display: block;
  width: min(536px, 100%);
  height: auto;
  margin: 0 auto;
}

.home {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.home .main {
  flex: 1;
  display: grid;
  place-items: center;
}

.home-stage {
  width: min(1080px, calc(100% - 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.home-nav {
  flex-wrap: nowrap;
  gap: 0.8rem;
  white-space: nowrap;
}

p {
  margin-top: 0;
}

.page {
  padding: 3rem 0 5rem;
}

.list,
.rule-list,
.info-list,
.admin-nav {
  border-top: 1px solid #ccc;
}

.admin-nav {
  padding-top: 1rem;
}

.admin-nav a.active {
  background: #111;
  color: #fff;
  text-decoration-color: #fff;
}

.list-item,
.rule-list > div,
.info-list > div {
  border-bottom: 1px solid #ccc;
}

.list-item {
  padding: 1.4rem 0;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
  margin: 2rem 0;
}

.year-filter {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  gap: 0.5rem 1rem;
  align-items: baseline;
  margin: 0 0 2rem;
}

.year-filter a.active {
  padding: 0 0.2rem;
  color: #fff;
  background: #111;
  text-decoration-color: #fff;
}

.tile-card,
.member-card {
  min-width: 0;
}

.tile-link {
  display: block;
}

.tile-card h2,
.member-card h3 {
  display: inline-block;
  margin: 0.65rem 0 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

.tile-card h2::after,
.member-card h3::after {
  content: none;
}

.tile-year {
  display: block;
  margin-top: 0.2rem;
  color: #666;
  font-size: 0.85rem;
}

.tile-image,
.tile-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eee;
}

.tile-image-logo {
  object-fit: contain;
  padding: clamp(1rem, 7%, 2rem);
  background: #fff;
}

.tile-placeholder {
  display: grid;
  place-items: center;
  border: 1px solid #111;
  color: #111;
  background:
    linear-gradient(
      135deg,
      hsl(var(--placeholder-hue) 74% var(--placeholder-lightness)) 0%,
      hsl(var(--placeholder-accent) 68% calc(var(--placeholder-lightness) - 7%)) 54%,
      hsl(var(--placeholder-highlight) 62% calc(var(--placeholder-lightness) + 2%)) 100%
    );
  text-shadow: 1px 1px 0 rgb(255 255 255 / 0.38);
  font-size: clamp(2rem, 7vw, 4.5rem);
  line-height: 1;
  text-transform: lowercase;
}

.thumb,
.current-image img,
.admin-thumb {
  width: 150px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #eee;
}

.hero-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  background: #eee;
}

.about-hero-image {
  display: block;
  width: 100%;
  max-height: min(70vh, 720px);
  margin: 0 0 2rem;
  object-fit: cover;
  object-position: center;
  background: #eee;
}

.media-embeds {
  margin: 2rem 0;
}

.sound-signature {
  display: inline-block;
  margin: 0.15rem 0 0;
}

.sound-notice-button,
.sound-notice-close {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.sound-notice-button {
  display: inline-block;
  font-size: 1.2em;
  line-height: 1;
  vertical-align: middle;
}

.sound-notice {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1rem 2.5rem 1rem 1rem;
  border: 1px solid #111;
  color: #111;
  background: #fff;
}

.sound-notice p {
  margin: 0;
}

.sound-notice p + p {
  margin-top: 0.5rem;
}

.sound-notice-close {
  position: absolute;
  top: 0.45rem;
  right: 0.65rem;
}

.sound-params {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  margin: 0.8rem 0;
  font-variant-numeric: tabular-nums;
}

.sound-params div {
  display: flex;
  gap: 0.4rem;
}

.sound-params dd {
  margin: 0;
}

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

.video-embed {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  margin: 1rem 0;
}

.admin-card,
.advanced-field,
.image-admin-field,
.media-append {
  border-top: 1px solid #ccc;
  padding-top: 1rem;
}

.admin-card {
  display: block;
}

.rule-list,
.info-list,
.card-grid {
  margin: 2rem 0;
}

.rule-list > div,
.info-list > div {
  padding: 0.9rem 0;
}

.info-list dt {
  font-weight: 700;
}

.info-list dd {
  margin: 0;
}

label {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.8rem;
}

input,
textarea,
select {
  width: 100%;
}

.back-link {
  display: table;
  margin-bottom: 1.4rem;
}

pre {
  overflow: auto;
}

.site-footer,
.flash,
.notice,
.preview-banner {
  padding: 1rem 0;
}

.flash,
.notice,
.preview-banner {
  border-top: 1px solid #ccc;
}

.edit-form {
  display: grid;
  gap: 1rem;
}

.admin {
  background: #fff;
}

.admin:not(.admin-preview) .page {
  padding-top: 1.5rem;
}

.admin:not(.admin-preview) .page h1,
.admin:not(.admin-preview) .page h2,
.admin:not(.admin-preview) .page h3,
.admin:not(.admin-preview) .page p {
  display: block;
}

.admin:not(.admin-preview) .page h1::after,
.admin:not(.admin-preview) .page h2::after,
.admin:not(.admin-preview) .page h3::after,
.admin:not(.admin-preview) .page p::after {
  content: none;
}

.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  background: #fff;
  border-bottom: 1px solid #ccc;
}

.edit-form .check {
  display: flex;
  gap: 0.5rem;
}

.edit-form .check input {
  width: auto;
}

.credit-picker {
  margin: 0;
  padding: 0.8rem;
  border: 1px solid #999;
}

.credit-items {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
}

.credit-items > .credit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #ddd;
}

.credit-person {
  min-width: 0;
}

.credit-person small {
  display: block;
  color: #555;
}

.credit-item-actions {
  display: flex;
  gap: 0.25rem;
}

.credit-item-actions button {
  width: 2rem;
  min-height: 2rem;
  padding: 0;
}

.credit-add {
  margin: 0;
}

.entry-management {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #999;
}

.entry-management h2 {
  margin-top: 0;
}

.link-button.danger {
  color: #a00;
}

.current-image code {
  overflow-wrap: anywhere;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.6rem;
  border-bottom: 1px solid #ccc;
  text-align: left;
  vertical-align: top;
}

.admin-head,
.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
}

.admin-head {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.admin-head h1 {
  margin: 0;
}

.admin-nav form,
.row-actions form {
  display: inline;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: #666;
}

@media (max-width: 820px) {
  html {
    overflow-y: auto;
    background-attachment: scroll;
    background-image:
      repeating-linear-gradient(
        45deg,
        rgb(0 0 0 / 0.05) 0 1px,
        rgb(0 0 0 / 0.04) 1px 3px,
        rgb(0 0 0 / 0.025) 3px 6px,
        rgb(0 0 0 / 0.01) 6px 10px,
        transparent 10px 21px,
        rgb(0 0 0 / 0.01) 21px 24px,
        rgb(0 0 0 / 0.025) 24px 27px,
        rgb(0 0 0 / 0.04) 27px 29px,
        rgb(0 0 0 / 0.05) 29px 30px
      ),
      repeating-linear-gradient(
        -45deg,
        rgb(0 0 0 / 0.05) 0 1px,
        rgb(0 0 0 / 0.04) 1px 3px,
        rgb(0 0 0 / 0.025) 3px 6px,
        rgb(0 0 0 / 0.01) 6px 10px,
        transparent 10px 21px,
        rgb(0 0 0 / 0.01) 21px 24px,
        rgb(0 0 0 / 0.025) 24px 27px,
        rgb(0 0 0 / 0.04) 27px 29px,
        rgb(0 0 0 / 0.05) 29px 30px
      );
  }

  .grid-canvas {
    display: none;
  }

  .site-header {
    display: block;
  }

  .nav {
    margin-top: 0.7rem;
  }

  .thumb,
  .current-image img {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  .home-hero,
  .home-stage,
  .page,
  .site-footer,
  .flash,
  .notice,
  .preview-banner,
  .preview-toolbar {
    width: calc(100% - 28px);
  }
}
