:root {
  --bg: #070707;
  --bg-elevated: #111111;
  --card: #141414;
  --card-border: #2a2a2a;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --accent: #ffffff;
  --danger: #c44;
  --ok: #6a6;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  --radius: 2px;
  --maxw: 40rem;
  --header-pad: clamp(1.25rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration: underline;
}

.public-body {
  position: relative;
}

.media-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.media-bg-video {
  position: absolute;
  inset: 50% auto auto 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.08) brightness(0.45);
}

.media-bg-scrim {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 70% at 50% 30%, transparent 0%, rgba(7, 7, 7, 0.75) 75%),
    linear-gradient(180deg, rgba(7, 7, 7, 0.55), rgba(7, 7, 7, 0.88));
}

.brand-stack {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--header-pad) var(--header-pad) 0.25rem;
}

.brand-stack--compact {
  padding-bottom: 0.5rem;
}

.brand-logo-img--docs {
  width: min(92vw, 28rem);
}

.brand-logo-img {
  display: block;
  width: min(92vw, 36rem);
  height: auto;
  margin: 0 auto;
}

.footer-logo-img {
  display: block;
  width: min(85vw, 14rem);
  height: auto;
  margin: 0 auto;
}

.scroll-cue {
  display: flex;
  justify-content: center;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: var(--muted);
}

.scroll-cue:hover {
  color: var(--text);
  text-decoration: none;
}

.chevron {
  width: 1.25rem;
  height: 1.25rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 0.35rem;
  animation: floaty 2.2s ease-in-out infinite;
}

@keyframes floaty {
  0%,
  100% {
    transform: rotate(45deg) translateY(0);
    opacity: 0.6;
  }
  50% {
    transform: rotate(45deg) translateY(0.35rem);
    opacity: 1;
  }
}

.main-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem var(--header-pad) 3rem;
  max-width: calc(var(--maxw) + 2 * var(--header-pad));
  margin: 0 auto;
}

.main-content.narrow {
  max-width: 28rem;
}

.main-content--docs {
  max-width: 48rem;
}

.page-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.25rem auto 0;
  max-width: 22rem;
  padding: 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
}

.page-switch-link {
  flex: 1 1 42%;
  min-width: 6.5rem;
  padding: 0.5rem 0.85rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  border-radius: 999px;
  border: 1px solid transparent;
}

.page-switch-link:hover {
  color: var(--text);
  text-decoration: none;
}

.page-switch-link.is-active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.empty-state,
.muted {
  color: var(--muted);
  text-align: center;
}

.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.accordion-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: rgba(20, 20, 20, 0.82);
  backdrop-filter: blur(10px);
}

.accordion-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
}

.accordion-summary::-webkit-details-marker {
  display: none;
}

.accordion-chevron {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.accordion-item[open] .accordion-chevron {
  transform: rotate(45deg);
  margin-top: -0.15rem;
}

.event-summary-text,
.doc-summary-text {
  flex: 1 1 12rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
}

.event-summary-title,
.doc-summary-title {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.event-summary-date,
.doc-summary-date {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.event-summary-actions {
  flex-shrink: 0;
  margin-left: auto;
}

.btn-store {
  padding: 0.4rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.btn-store:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}

.accordion-panel {
  padding: 0 1rem 1.1rem;
  border-top: 1px solid var(--card-border);
}

.event-hero-thumb {
  margin: 0.85rem 0 1rem;
  min-height: 6rem;
  border-radius: var(--radius);
  background-image: var(--thumb, none);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--card-border);
}

.event-detail-block {
  margin-top: 0.85rem;
}

.event-detail-block:first-of-type {
  margin-top: 0.75rem;
}

.event-detail-label {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.event-detail-value {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
}

.event-facts-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.event-footer-note {
  margin: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.doc-desc {
  margin: 0.75rem 0 1rem;
  font-size: 0.92rem;
}

.text-flow {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

.docs-page-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.docs-lead {
  text-align: center;
  color: var(--muted);
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
}

.doc-yt-widget {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.yt-slide-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  overflow: visible;
  padding: 0.2rem 0 0.5rem;
  margin: 0;
}

.yt-slide-pill {
  flex: 1 1 auto;
  min-width: min(100%, 7.5rem);
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.45);
  color: var(--muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.yt-slide-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.yt-slide-pill.is-active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.yt-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius);
}

.yt-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem var(--header-pad) 2.5rem;
  border-top: 1px solid var(--card-border);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  text-align: center;
}

.footer-docs {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-decoration: none;
  margin-bottom: 1rem;
}

.footer-docs:hover {
  text-decoration: none;
  opacity: 0.85;
}

.footer-docs-sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer-docs-caption {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.footer-docs--home:hover {
  opacity: 0.85;
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* —— Admin —— */
.admin-body {
  background: var(--bg-elevated);
  min-height: 100vh;
}

.admin-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-login {
  width: 100%;
  max-width: 22rem;
  padding: 2rem;
}

.admin-login-logo {
  display: block;
  width: min(88vw, 16rem);
  height: auto;
  margin: 0 auto;
}

.admin-login-sub {
  text-align: center;
  color: var(--muted);
  margin: 0.75rem 0 1.5rem;
  font-size: 0.9rem;
}

.admin-login-hint {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.admin-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.admin-brand:hover {
  text-decoration: none;
  opacity: 0.85;
}

.admin-bar-logo {
  display: block;
  height: 1.65rem;
  width: auto;
}

.admin-brand-text {
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  font-size: 0.9rem;
}

.admin-nav a {
  text-decoration: none;
  color: var(--muted);
}

.admin-nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.admin-main {
  padding: 1.5rem 1.25rem 3rem;
  max-width: 52rem;
  margin: 0 auto;
}

.admin-h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="password"],
.field input[type="url"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: #0c0c0c;
  color: var(--text);
  font: inherit;
}

.field textarea {
  resize: vertical;
  min-height: 4rem;
}

.checkbox-field {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-field .field-label {
  text-transform: none;
  letter-spacing: 0;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.btn.primary:hover {
  opacity: 0.9;
  text-decoration: none;
}

.btn.ghost:hover {
  border-color: var(--muted);
  text-decoration: none;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.inline-form {
  display: inline;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.link-button.danger {
  color: var(--danger);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--card-border);
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.data-table code {
  font-size: 0.8rem;
  color: var(--muted);
}

.flash {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  font-size: 0.9rem;
}

.flash-error {
  border-color: rgba(204, 68, 68, 0.5);
  color: #faa;
}

.flash-ok {
  border-color: rgba(102, 170, 102, 0.45);
  color: #aea;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--card-border);
  color: var(--muted);
}

.tag-ok {
  border-color: rgba(102, 170, 102, 0.4);
  color: #aea;
}

@media (max-width: 520px) {
  .event-summary-actions {
    width: 100%;
    margin-left: 0;
  }

  .btn-store {
    width: 100%;
    text-align: center;
  }
}
