:root {
  --demo-bg: #f4f7fb;
  --demo-surface: #ffffff;
  --demo-ink: #172033;
  --demo-muted: #5c687d;
  --demo-line: #dbe3ee;
  --demo-brand: #255d93;
  --demo-brand-dark: #173f68;
  --demo-accent: #e8f2fc;
  --demo-warm: #fff4d8;
  --demo-radius: 18px;
  --demo-shadow: 0 12px 32px rgba(27, 48, 77, 0.09);
}

* {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
}

body.demo-page {
  margin: 0;
  background: var(--demo-bg);
  color: var(--demo-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  transform: translateY(-160%);
  border-radius: 0.5rem;
  background: var(--demo-ink);
  color: white;
}

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

.demo-shell {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.demo-header {
  padding: 1rem 0 2.2rem;
  background: linear-gradient(135deg, #102e4c 0%, #225c90 68%, #337bad 100%);
  color: white;
}

.demo-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.demo-brand {
  color: white;
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

.demo-header-row h1 {
  margin: 0;
  color: white;
  font-size: clamp(1.45rem, 4vw, 2rem);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.demo-eyebrow {
  margin: 0 0 0.65rem;
  color: var(--demo-brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.demo-main {
  padding: 0 0 5rem;
}

.demo-controls {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-top: -1.2rem;
  padding: 1rem;
  border: 1px solid rgba(219, 227, 238, 0.8);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--demo-shadow);
}

.demo-search {
  position: relative;
}

.demo-search svg {
  position: absolute;
  top: 50%;
  left: 0.9rem;
  width: 1.15rem;
  transform: translateY(-50%);
  color: var(--demo-muted);
  pointer-events: none;
}

.demo-search input {
  width: 100%;
  min-height: 2.85rem;
  padding: 0.7rem 0.9rem 0.7rem 2.75rem;
  border: 1px solid var(--demo-line);
  border-radius: 10px;
  background: #f9fbfd;
  color: var(--demo-ink);
  font: inherit;
}

.demo-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  border: 0;
  margin: 0;
  padding: 0;
}

.demo-filter {
  min-height: 2.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--demo-line);
  border-radius: 999px;
  background: white;
  color: var(--demo-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
}

.demo-filter:hover,
.demo-filter[aria-pressed="true"] {
  border-color: var(--demo-brand);
  background: var(--demo-accent);
  color: var(--demo-brand-dark);
}

.demo-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0 1.25rem;
  color: var(--demo-muted);
  font-size: 0.92rem;
}

.demo-summary p {
  margin: 0;
}

.demo-year {
  margin: 2.6rem 0 1.1rem;
  color: var(--demo-ink);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.demo-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--demo-line);
  border-radius: var(--demo-radius);
  background: var(--demo-surface);
  box-shadow: 0 3px 12px rgba(27, 48, 77, 0.04);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.demo-card:hover {
  transform: translateY(-3px);
  border-color: #b8c9dd;
  box-shadow: var(--demo-shadow);
}

.demo-card[hidden],
.demo-year-section[hidden] {
  display: none;
}

.demo-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #dfe8f2;
}

.demo-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.demo-card:hover .demo-media img {
  transform: scale(1.025);
}

.demo-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(17, 35, 56, 0.82);
  color: white;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.demo-play svg {
  width: 1.2rem;
  margin-left: 0.12rem;
}

.demo-deck {
  display: grid;
  height: 100%;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, #d38123, #f1ae3d);
  color: white;
}

.demo-deck svg {
  width: 4.2rem;
  filter: drop-shadow(0 5px 12px rgba(100, 51, 3, 0.22));
}

.demo-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.1rem 1.15rem 1.2rem;
}

.demo-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.demo-type,
.demo-status {
  color: var(--demo-brand);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.demo-status {
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  background: var(--demo-warm);
  color: #7a5200;
  letter-spacing: 0.025em;
  text-transform: none;
}

.demo-card h3 {
  margin: 0;
  color: var(--demo-ink);
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.demo-card h3 a {
  color: inherit;
  text-decoration: none;
}

.demo-notes {
  margin: 0.6rem 0 1rem;
  color: var(--demo-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.demo-meta {
  display: grid;
  gap: 0.4rem;
  margin: auto 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--demo-line);
  color: var(--demo-muted);
  font-size: 0.82rem;
}

.demo-meta div {
  display: grid;
  grid-template-columns: 5.2rem 1fr;
  gap: 0.4rem;
}

.demo-meta dt {
  font-weight: 750;
}

.demo-meta dd {
  margin: 0;
}

.demo-empty {
  margin: 3rem 0;
  padding: 2.5rem;
  border: 1px dashed #aebfd2;
  border-radius: var(--demo-radius);
  text-align: center;
}

.demo-empty h2,
.demo-empty p {
  margin: 0;
}

.demo-empty p {
  margin-top: 0.4rem;
  color: var(--demo-muted);
}

.demo-resources {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3.5rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--demo-line);
  border-radius: var(--demo-radius);
  background: var(--demo-surface);
  box-shadow: 0 3px 12px rgba(27, 48, 77, 0.04);
}

.demo-resources h2,
.demo-resources p {
  margin: 0;
}

.demo-resources h2 {
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.demo-resources h2 + p {
  margin-top: 0.25rem;
  color: var(--demo-muted);
  font-size: 0.9rem;
}

.demo-resources .demo-eyebrow {
  margin-bottom: 0.2rem;
}

.demo-resource-links {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.demo-resource-links a {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--demo-line);
  border-radius: 9px;
  color: var(--demo-brand-dark);
  font-size: 0.86rem;
  font-weight: 720;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.demo-resource-links a:hover {
  border-color: var(--demo-brand);
  background: var(--demo-accent);
}

.demo-footer {
  padding: 2.2rem 0;
  border-top: 1px solid var(--demo-line);
  background: var(--demo-surface);
  color: var(--demo-muted);
  font-size: 0.9rem;
}

.demo-footer .demo-shell {
  text-align: center;
}

.demo-footer p {
  margin: 0;
}

.demo-footer p + p {
  margin-top: 0.35rem;
}

.demo-footer a {
  color: var(--demo-brand-dark);
  font-weight: 700;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #f7b84b;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .demo-controls {
    grid-template-columns: 1fr;
  }

  .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .demo-shell {
    width: min(100% - 1.25rem, 1180px);
  }

  .demo-summary,
  .demo-resources {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .demo-controls {
    margin-top: -1rem;
  }

  .demo-resource-links {
    width: 100%;
  }

  .demo-resource-links a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .demo-card,
  .demo-media img {
    transition: none;
  }
}
