:root {
  --bg: #f8f4ea;
  --card: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --line: #e0d8c4;

  --accent-a: #ff3d8b;
  --accent-b: #ff7a1a;
  --accent-c: #d4ff00;

  --past: #c1311f;
  --grain: rgba(0, 0, 0, 0.03);

  --urgent: #ff3d3d;
  --soon: #ff7a1a;
  --planned: #ffd84d;
  --horizon: #6b8cff;
  --far: #b8b3a3;

  --tag-grant-bg: #ff7a1a;             --tag-grant-fg: #0a0a0a;
  --tag-foundation-bg: #0a0a0a;        --tag-foundation-fg: #ffffff;
  --tag-residency-bg: #ff3d8b;         --tag-residency-fg: #0a0a0a;
  --tag-lab-bg: #d4ff00; --tag-lab-fg: #0a0a0a;
  --tag-festival_open_call-bg: #ffd84d; --tag-festival_open_call-fg: #0a0a0a;
  --tag-pitching-bg: #1d4ed8;          --tag-pitching-fg: #ffffff;
  --tag-producer-bg: #f8f4ea;          --tag-producer-fg: #0a0a0a;
}

* { box-sizing: border-box; }

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", sans-serif;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    radial-gradient(var(--grain) 1px, transparent 1px),
    radial-gradient(var(--grain) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
  margin: 0;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  padding: 2rem 1rem 3rem;
}

/* ------------- site header ------------- */

.site-header {
  background: var(--fg);
  color: var(--card);
  border-bottom: 3px solid var(--accent-a);
  padding: .9rem 1rem;
}
.site-header-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: .45rem;
  color: var(--card);
  text-decoration: none;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.wordmark-mark {
  display: inline-block;
  color: var(--accent-a);
  font-size: 1rem;
  transform: translateY(-1px);
}
.wordmark:hover .wordmark-text {
  text-decoration: underline;
  text-decoration-color: var(--accent-c);
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
}
.wordmark-tagline {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent-c);
}

/* nav: login / register / language */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-link {
  color: var(--card);
  text-decoration: none;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: .92rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav-link:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent-c);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.nav-link-cta {
  background: var(--accent-c);
  color: var(--fg);
  font-weight: 700;
  padding: .4rem .8rem;
  border: 1.5px solid var(--accent-c);
  box-shadow: 3px 3px 0 0 var(--accent-a);
  transition: box-shadow .1s ease, transform .1s ease;
}
.nav-link-cta:hover {
  text-decoration: none;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--accent-a);
}

/* language selector — styled mock, hover-revealed dropdown */
.lang-select {
  position: relative;
}
.lang-current {
  background: transparent;
  color: var(--card);
  border: 1.5px solid #3a3a3a;
  padding: .35rem .6rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  cursor: default;
}
.lang-menu {
  position: absolute;
  top: calc(100% + .4rem);
  right: 0;
  min-width: 9rem;
  margin: 0;
  padding: .25rem;
  list-style: none;
  background: var(--fg);
  border: 1.5px solid #3a3a3a;
  box-shadow: 4px 4px 0 0 var(--accent-a);
  display: none;
  z-index: 20;
}
.lang-select:hover .lang-menu,
.lang-select:focus-within .lang-menu {
  display: block;
}
.lang-menu a {
  display: block;
  padding: .35rem .5rem;
  color: var(--card);
  text-decoration: none;
  font-size: .85rem;
}
.lang-menu a:hover {
  background: #1c1c1c;
  color: var(--accent-c);
}

/* hamburger — hidden on desktop, shown via the nav breakpoint below */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 6px;
  background: transparent;
  border: 1.5px solid #3a3a3a;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--card);
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid #2a2a2a;
  }
  .site-header.nav-open .site-nav {
    display: flex;
  }
  .site-nav .nav-link {
    font-size: 1.05rem;
    padding: .35rem 0;
  }
  .nav-link-cta {
    text-align: center;
    padding: .6rem .8rem;
  }
  .lang-select {
    align-self: flex-start;
  }
  .lang-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0 0 0 .25rem;
    display: block;
  }
}

/* ------------- hero (dark full-bleed, photo carousel) ------------- */

.hero {
  /* Break out of .site-main's 1rem side padding to span full width. */
  position: relative;
  margin: -2rem -1rem 2rem;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #14110d; /* fallback before the image paints */
}

/* layered crossfade images */
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.1s ease-in-out;
}
.hero-slide.is-active {
  opacity: 1;
}

/* legibility scrim: darkest on the left where the text column sits, fading right */
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 8, 6, 0.86) 0%, rgba(10, 8, 6, 0.55) 42%, rgba(10, 8, 6, 0.12) 80%),
    linear-gradient(0deg, rgba(10, 8, 6, 0.45) 0%, rgba(10, 8, 6, 0) 45%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 1rem;
}
.hero-title {
  margin: 0 0 1.4rem;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #fdfbf6;
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.4);
}
.hero-points {
  list-style: none;
  margin: 0 0 1.8rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  max-width: 32rem;
}
.hero-points li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 1.05rem;
  color: #f3eee4;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}
.hero-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  font-weight: 700;
  color: var(--accent-a);
}
.hero-cta {
  display: inline-block;
  font-weight: 700;
  padding: .7rem 1.4rem;
  background: var(--accent-c);
  color: var(--fg);
  border: 1.5px solid var(--accent-c);
  text-decoration: none;
  letter-spacing: .02em;
  box-shadow: 3px 3px 0 0 var(--accent-a);
  transition: transform .1s, box-shadow .1s;
}
.hero-cta:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--accent-a);
}
.hero-cta:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--accent-a);
}
.hero-note {
  margin: 1.2rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .03em;
  color: #cfc7b8;
}
.hero-note strong {
  color: #fdfbf6;
  font-weight: 700;
}

/* carousel dots */
.hero-dots {
  position: absolute;
  z-index: 2;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
}
.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.hero-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}
.hero-dot.is-active {
  background: var(--accent-c);
  border-color: var(--accent-c);
}

@media (max-width: 720px) {
  .hero {
    min-height: 78vh;
  }
  .hero-scrim {
    /* on narrow screens the text spans full width: scrim bottom-heavy, not left-heavy */
    background:
      linear-gradient(0deg, rgba(10, 8, 6, 0.9) 0%, rgba(10, 8, 6, 0.45) 55%, rgba(10, 8, 6, 0.2) 100%);
  }
}

/* ------------- page header (inside main) ------------- */

.page-header {
  max-width: 880px;
  margin: 0 auto 1.5rem;
}
.page-header .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .8rem;
  letter-spacing: .03em;
}
.page-header .subtitle strong {
  color: var(--fg);
  font-weight: 700;
}

/* ------------- timeline strip ------------- */

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

.timeline {
  max-width: 880px;
  margin: 0 auto 1.5rem;
  padding: .9rem 1.1rem 1rem;
  background: var(--card);
  border: 1.5px solid var(--fg);
  border-radius: 6px;
  box-shadow: 4px 4px 0 0 var(--accent-c);
}
.timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .85rem;
}
.timeline-title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--fg);
  font-weight: 700;
}
.timeline-legend {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .62rem;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.legend-swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border: 1px solid var(--fg);
  margin-right: .15rem;
  vertical-align: middle;
}
.legend-swatch.urgent  { background: var(--urgent); }
.legend-swatch.soon    { background: var(--soon); }
.legend-swatch.planned { background: var(--planned); }
.legend-swatch.horizon { background: var(--horizon); }

.timeline-track {
  position: relative;
  height: 64px;
  margin: 0 .25rem;
}
.timeline-axis {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: var(--fg);
  transform: translateY(-50%);
}
.timeline-today {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-a);
}
.timeline-today-label {
  position: absolute;
  top: -2px;
  left: 4px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--accent-a);
  white-space: nowrap;
}
.timeline-tick {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
}
.timeline-tick::before {
  content: "";
  position: absolute;
  left: -2px;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--muted);
  transform: translateY(-50%);
}
.timeline-tick-label {
  position: absolute;
  bottom: 0;
  left: 4px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .58rem;
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
}
.timeline-dot {
  position: absolute;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-left: -7px;
  border: 2px solid var(--fg);
  background: var(--accent-c);
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 2;
  transition: transform .12s, box-shadow .12s;
}
.timeline-dot:hover {
  transform: translateY(-50%) scale(1.5);
  z-index: 3;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--fg);
}
.timeline-dot.urgency-urgent  { background: var(--urgent); }
.timeline-dot.urgency-soon    { background: var(--soon); }
.timeline-dot.urgency-planned { background: var(--planned); }
.timeline-dot.urgency-horizon { background: var(--horizon); }
.timeline-dot.urgency-far     { background: var(--far); }

/* Pulse for the next-up urgent deadlines */
.timeline-dot.urgency-urgent {
  animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 61, 61, 0.45); }
  50%      { box-shadow: 0 0 0 5px rgba(255, 61, 61, 0); }
}

.timeline-foot {
  margin-top: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .05em;
  color: var(--muted);
}
.timeline-foot strong {
  color: var(--fg);
  font-weight: 700;
}
.timeline-foot .dot { color: var(--line); }
.timeline-foot .past-count strong { color: var(--past); }

/* ------------- per-card runway bar ------------- */

.runway {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin: .35rem 0 .15rem;
}
.runway-bar {
  flex: 1;
  height: 8px;
  background: var(--bg);
  border: 1.5px solid var(--fg);
  position: relative;
  overflow: hidden;
}
.runway-fill {
  display: block;
  height: 100%;
  background: var(--horizon);
  transition: width .3s ease;
}
.runway.urgency-urgent  .runway-fill { background: var(--urgent); }
.runway.urgency-soon    .runway-fill { background: var(--soon); }
.runway.urgency-planned .runway-fill { background: var(--planned); }
.runway.urgency-horizon .runway-fill { background: var(--horizon); }
.runway.urgency-far     .runway-fill { background: var(--far); }

.runway-past .runway-fill {
  background: repeating-linear-gradient(
    45deg,
    var(--line),
    var(--line) 4px,
    var(--bg) 4px,
    var(--bg) 8px
  );
}
.runway-tbd .runway-bar {
  border-style: dashed;
  border-color: var(--line);
}

.runway-label {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
}
.runway.urgency-urgent .runway-label { color: var(--urgent); }
.runway.urgency-soon   .runway-label { color: var(--soon); }
.runway-past .runway-label { color: var(--muted); font-weight: 500; }
.runway-tbd  .runway-label { color: var(--muted); font-weight: 500; }
.runway-date { color: var(--muted); font-weight: 500; }

/* ------------- filters ------------- */

.filters {
  max-width: 880px;
  margin: 0 auto 1.75rem;
  background: var(--card);
  border: 1.5px solid var(--fg);
  border-radius: 0; /* sharp corners to match cards/CTAs (the 6px was the outlier) */
  box-shadow: 4px 4px 0 0 var(--accent-a);
}

/* Count header band — the live result count is the hero of the box. */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .75rem 1.1rem;
  border-bottom: 1.5px solid var(--fg);
}
.filter-count {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
}
.filter-count-num {
  display: inline-block;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  padding: .15rem .5rem;
  background: var(--accent-c);
  color: var(--fg);
  box-shadow: 3px 3px 0 0 var(--accent-a);
}
.filter-count-word {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}
.filter-bar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.is-updating .filter-count-num {
  opacity: .55;
  transition: opacity .1s ease;
}

/* Two-column grid so 6 filter groups don't stack into a tall column.
   Collapses to one column on narrow screens (below). */
.filter-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  padding: 1rem 1.1rem 1.1rem;
}
.filters fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0; /* let long checkbox rows wrap inside the grid cell */
}
/* The single-checkbox eligibility group spans both columns so it reads as a
   full-width band, not a lopsided half-cell. */
.filter-groups .filter-eligibility {
  grid-column: 1 / -1;
}
.filter-submit-row {
  padding: 0 1.1rem 1.1rem;
}
/* No-JS fallback only: hidden (display:none, never disabled) once the
   auto-submit controller connects, so live filtering replaces the button but
   requestSubmit() still has a valid default submit. */
.filters.js-live .filter-submit-row {
  display: none;
}
@media (max-width: 620px) {
  .filter-groups {
    grid-template-columns: 1fr;
  }
}
.filters legend {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--muted);
  margin-bottom: .55rem;
  padding: 0;
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

/* Pill-toggle look: hide native checkbox, style the label */
.checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 500;
  padding: .3rem .65rem;
  border: 1.5px solid var(--fg);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  border-radius: 0;
  user-select: none;
}
.checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}
.checkbox:has(input:checked) {
  background: var(--accent-a);
  border-color: var(--accent-a);
  color: var(--fg);
}
.checkbox:hover {
  background: var(--bg);
}
.checkbox:has(input:checked):hover {
  background: var(--accent-a);
}
.checkbox:has(input:focus-visible) {
  outline: 2px solid var(--accent-b);
  outline-offset: 2px;
}

.filter-submit {
  font: inherit;
  font-weight: 700;
  padding: .55rem 1.1rem;
  background: var(--fg);
  color: var(--card);
  border: 1.5px solid var(--fg);
  border-radius: 0;
  cursor: pointer;
  letter-spacing: .02em;
  box-shadow: 3px 3px 0 0 var(--accent-a);
  transition: transform .1s, box-shadow .1s;
}
.filter-submit:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--accent-a);
}
.filter-submit:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--accent-a);
}
.reset-link {
  font-size: .85rem;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.reset-link:hover { color: var(--fg); }

/* ------------- program list ------------- */

.program-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.program-item {
  /* wraps the <details>. No styling itself. */
}

.program {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  transition: transform .15s, box-shadow .15s, border-color .15s, opacity .15s;
  overflow: hidden;
}
.program:hover {
  border-color: var(--accent-a);
}
.program:not([open]):hover {
  box-shadow: 3px 3px 0 0 var(--accent-b), 6px 6px 0 0 var(--accent-a);
  transform: translate(-1px, -1px);
}
.program[open] {
  border-color: var(--fg);
  border-width: 1.5px;
  box-shadow: 3px 3px 0 0 var(--accent-b), 6px 6px 0 0 var(--accent-a);
}

/* Dim siblings when any card is open, focusing attention */
.program-list:has(.program[open]) .program-item:not(:has(.program[open])) .program {
  opacity: .6;
}
.program-list:has(.program[open]) .program-item:not(:has(.program[open])) .program:hover {
  opacity: 1;
}

/* ------------- summary (always-visible top of card) ------------- */

.program-summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem 1.25rem;
  position: relative;
}
.program-summary::-webkit-details-marker { display: none; }
.program-summary::marker { content: ""; }

.expand-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}
.program[open] .expand-hint { color: var(--accent-a); }
.program:not([open]) .expand-hint-open { display: none; }
.program[open] .expand-hint-closed { display: none; }

.program-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .65rem;
  flex-wrap: wrap;
}

/* ------------- dateblock ------------- */

.dateblock {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  min-height: 52px;
  padding: .3rem .25rem;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--tag-festival_open_call-bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  box-shadow: 3px 3px 0 0 var(--accent-a);
}
.dateblock .d {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
}
.dateblock .m {
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .2rem;
}
.dateblock.past {
  background: var(--accent-a);
  color: var(--fg);
  box-shadow: 3px 3px 0 0 var(--tag-pitching-bg);
}
.dateblock.tbd {
  background: var(--card);
  color: var(--muted);
  box-shadow: 3px 3px 0 0 var(--line);
}

/* ------------- pills (program type) ------------- */

.pill {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .22rem .55rem;
  border: 1.5px solid var(--fg);
  border-radius: 0;
}
.pill-grant              { background: var(--tag-grant-bg);              color: var(--tag-grant-fg);              border-color: var(--tag-grant-bg); }
.pill-foundation         { background: var(--tag-foundation-bg);         color: var(--tag-foundation-fg);         border-color: var(--tag-foundation-bg); }
.pill-residency          { background: var(--tag-residency-bg);          color: var(--tag-residency-fg);          border-color: var(--tag-residency-bg); }
.pill-lab{ background: var(--tag-lab-bg); color: var(--tag-lab-fg); border-color: var(--tag-lab-bg); }
.pill-festival_open_call { background: var(--tag-festival_open_call-bg); color: var(--tag-festival_open_call-fg); border-color: var(--tag-festival_open_call-bg); }
.pill-pitching           { background: var(--tag-pitching-bg);           color: var(--tag-pitching-fg);           border-color: var(--tag-pitching-bg); }
.pill-producer           { background: var(--tag-producer-bg);           color: var(--tag-producer-fg);           border-color: var(--fg); }
/* Discipline shown only for non-film programs; one neutral accent covers all
   buckets (lime sits apart from the program-type tag palette). */
.pill-discipline         { background: var(--accent-c);                  color: var(--fg);                        border-color: var(--fg); }

/* ------------- program body ------------- */

.program-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.015em;
  margin: .25rem 0 .15rem;
  line-height: 1.2;
  color: var(--fg);
}
.program:hover .program-name {
  color: var(--accent-a);
}
.organization {
  margin: 0 0 .65rem;
  color: var(--muted);
  font-size: .88rem;
}

/* ------------- stages ------------- */

.stages {
  list-style: none;
  padding: 0;
  margin: 0 0 .65rem;
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}
.stage {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .15rem .5rem;
  border: 1.5px dashed var(--fg);
  border-radius: 0;
  color: var(--fg);
}

/* ------------- expanded detail (index card) ------------- */

.program-detail {
  border-top: 2px solid var(--fg);
  background: var(--card);
}

.detail-strip {
  background: var(--fg);
  color: var(--card);
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  border-bottom: 2px solid var(--accent-a);
}
.detail-strip .dateblock-big {
  background: var(--accent-c);
  color: var(--fg);
  border-color: var(--accent-c);
  box-shadow: 3px 3px 0 0 var(--accent-a);
}
.detail-strip .dateblock-big.past {
  background: var(--accent-a);
  color: var(--fg);
  border-color: var(--accent-a);
  box-shadow: 3px 3px 0 0 var(--accent-c);
}
.detail-strip .dateblock-big.tbd {
  background: var(--card);
  color: var(--muted);
  border-color: var(--card);
  box-shadow: 3px 3px 0 0 var(--line);
}
.detail-strip .strip-text { flex: 1; min-width: 0; }
.detail-strip .strip-org {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--accent-c);
  word-break: break-word;
}

.dateblock-big {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  min-height: 60px;
  padding: .4rem .35rem;
  border: 2px solid var(--fg);
  border-radius: 0;
  background: var(--tag-festival_open_call-bg);
  color: var(--fg);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  box-shadow: 3px 3px 0 0 var(--accent-a);
}
.dateblock-big .d {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}
.dateblock-big .m {
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: .2rem;
}

.detail-boxes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 0;
  border-bottom: 2px solid var(--fg);
}
.detail-boxes .box {
  padding: .8rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.detail-boxes .box:nth-child(2n) { border-right: none; }
.detail-boxes .box:last-child { border-bottom: none; }
.detail-boxes .box.full {
  grid-column: 1 / -1;
  border-right: none;
}
.detail-boxes .box dt {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--accent-a);
  font-weight: 700;
  margin-bottom: .3rem;
}
.detail-boxes .box dd {
  margin: 0;
  font-size: .88rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--fg);
}
.detail-boxes .box.numeric dd {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .95rem;
  font-weight: 700;
}
.stages-inline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
}

.detail-notes {
  margin: 0;
  padding: .9rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: .88rem;
  line-height: 1.55;
  color: var(--fg);
}
.detail-notes::before {
  content: "▸ Curator's note";
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--accent-b);
  font-weight: 700;
  margin-bottom: .3rem;
}

.detail-actions {
  padding: 1rem 1.25rem;
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
}
.btn-primary, .btn-secondary {
  font: inherit;
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: .82rem;
  padding: .55rem 1rem;
  border-radius: 0;
  border: 1.5px solid var(--fg);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: .02em;
  transition: transform .1s, box-shadow .1s;
}
.btn-primary {
  background: var(--fg);
  color: var(--card);
  box-shadow: 3px 3px 0 0 var(--accent-a);
}
.btn-primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--accent-a);
}
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--accent-a);
}
.btn-secondary {
  background: var(--card);
  color: var(--fg);
  box-shadow: 3px 3px 0 0 var(--accent-c);
}
.btn-secondary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 0 var(--accent-c);
}
.btn-secondary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 0 var(--accent-c);
}
.btn-primary .arrow { color: var(--accent-c); }
.btn-secondary .arrow { color: var(--accent-a); }

.share-meta {
  margin-left: auto;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ------------- empty state ------------- */

.empty {
  max-width: 880px;
  margin: 2.5rem auto;
  text-align: center;
  color: var(--muted);
  font-family: "Fraunces", Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
}
.empty a {
  color: var(--accent-a);
  font-style: normal;
  font-family: "JetBrains Mono", monospace;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  text-decoration: underline;
  text-decoration-color: var(--tag-festival_open_call-bg);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}

/* ------------- site footer ------------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--card);
  padding: 1.5rem 1rem 2rem;
  margin-top: 2rem;
}
.site-footer-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .04em;
}
.site-footer-nav a {
  color: var(--fg);
  text-decoration: none;
}
.site-footer-nav a:hover {
  color: var(--accent-a);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.site-footer-nav .footer-lang {
  color: var(--muted);
}
.site-footer-meta,
.site-footer-credit {
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  color: var(--muted);
  letter-spacing: .04em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.site-footer-meta strong {
  color: var(--fg);
  font-weight: 700;
}
.site-footer-credit {
  font-family: Inter, sans-serif;
  font-size: .8rem;
  letter-spacing: 0;
}
.site-footer-credit a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent-a);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.site-footer-credit a:hover {
  color: var(--accent-a);
}
.site-footer .dot {
  color: var(--line);
}

/* ── Subscribe block ──────────────────────────────────────────────────── */
.subscribe {
  max-width: 880px;
  margin: 0 auto 1.75rem;
  padding: 1.25rem 1.3rem;
  background: var(--fg);
  color: var(--bg);
  border: 1.5px solid var(--fg);
  border-radius: 6px;
}
.subscribe-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 .4rem;
  color: var(--accent-c);
}
.subscribe-blurb {
  font-size: .9rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  color: var(--bg);
}
.subscribe-blurb strong { color: var(--accent-c); }
.subscribe-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.subscribe-email {
  flex: 1 1 240px;
  padding: .65rem .8rem;
  font-size: .95rem;
  font-family: inherit;
  border: 1.5px solid var(--bg);
  border-radius: 5px;
  background: var(--bg);
  color: var(--fg);
}
.subscribe-email:focus {
  outline: 2px solid var(--accent-c);
  outline-offset: 1px;
}
.subscribe-submit {
  padding: .65rem 1.3rem;
  font-size: .9rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid var(--accent-c);
  border-radius: 5px;
  background: var(--accent-c);
  color: var(--fg);
  transition: transform .08s ease;
}
.subscribe-submit:hover { transform: translateY(-1px); }
.subscribe-submit:active { transform: translateY(0); }
.subscribe-fineprint {
  margin: .7rem 0 0;
  font-size: .72rem;
  color: var(--far);
}
.subscribe-success .subscribe-title { color: var(--accent-c); }

/* ── Token pages (confirm / unsubscribe) ──────────────────────────────── */
.token-page {
  max-width: 620px;
  margin: 3rem auto;
  padding: 2rem;
  background: var(--card);
  border: 1.5px solid var(--fg);
  border-radius: 6px;
  text-align: center;
}
.token-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  margin: 0 0 .8rem;
}
.token-blurb {
  font-size: .95rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 1rem;
}
.token-blurb strong { color: var(--fg); }

/* ── Flash ────────────────────────────────────────────────────────────── */
.flash {
  max-width: 880px;
  margin: 0 auto 1.25rem;
  padding: .75rem 1rem;
  border-radius: 5px;
  font-size: .9rem;
  border: 1.5px solid var(--fg);
}
.flash-notice { background: var(--accent-c); color: var(--fg); }
.flash-alert { background: var(--past); color: #fff; border-color: var(--past); }

/* ══ A/B funnel capture surfaces ═══════════════════════════════════════════ */

/* Shared capture form (sticky bar, inline card, gate overlay). The main
   subscribe block keeps its own .subscribe-* styles above. */
.capture-form {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  flex: 1 1 240px;
  min-width: 0;
}
.capture-email {
  flex: 1 1 160px;
  min-width: 0;
  padding: .5rem .65rem;
  font: inherit;
  border: 1.5px solid var(--fg);
  border-radius: 6px;
  background: #fff;
  color: var(--fg);
}
.capture-email:focus { outline: 2px solid var(--accent-a); outline-offset: 1px; }
.capture-submit {
  flex: 1 0 auto;
  font-family: "JetBrains Mono", monospace;
  font-size: .76rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: .55rem .9rem;
  background: var(--fg);
  color: #fff;
  white-space: nowrap;
  transition: background .1s ease;
}
.capture-submit:hover { background: var(--accent-a); color: var(--fg); }

/* ── The rise-and-pin blur gate (Arttender mechanic) ──────────────────────── */
/* The real catalog past the preview is never in the HTML: gate_controller.js
   fills .mock-wall with blurred mock skeleton rows (a teaser, not the real
   count). The zone is a single grid cell -- the blurred column AND the CTA panel
   both occupy grid-area 1/1, so the COLUMN defines the zone height (the scroll
   runway) and the panel overlaps it without consuming extra flow height. The
   panel is position:sticky (top:22vh): as you scroll the real preview the blur
   column rises and the panel catches your eyeline and pins there while blur
   keeps scrolling underneath. No negative-margin / padding hacks -- the grid
   overlap is what keeps top:22vh pinning predictably. */
.gate-zone {
  position: relative;
  max-width: 880px;
  margin: .85rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
}
.gate-zone > .mock-wall,
.gate-zone > .gate-overlay { grid-area: 1 / 1; }
.mock-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  /* Heavy blur: the ghost cards must read as "there's content here" WITHOUT the
     fake names being legible (legible mock text both breaks the illusion and
     looks like scrapeable data). */
  filter: blur(11px);
  pointer-events: none;
  user-select: none;
  opacity: .6;
  /* Soft seam at the top edge with the real rows above; column stays present
     all the way down as the runway the sticky CTA rises through and pins over. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 9%, #000 100%);
}
.mock-row { list-style: none; margin: 0; }
.mock-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}
.mock-row .program-head { display: flex; gap: .6rem; align-items: center; margin-bottom: .7rem; }
/* Neutral grey skeletons — NOT the acid-green accent. */
.mock-cube { display: inline-block; width: 56px; height: 56px; border-radius: 6px; background: #e7e2d6; }
/* Subtle per-urgency cube tint so the date blocks aren't a uniform grey grid. */
.mock-cube.u1 { background: color-mix(in srgb, var(--soon) 28%, #e7e2d6); }
.mock-cube.u2 { background: color-mix(in srgb, var(--urgent) 28%, #e7e2d6); }
.mock-pill { display: inline-block; width: 84px; height: 18px; border-radius: 999px; background: #ece8de; }
/* Widths are set inline per row (gate_controller) for structural variability;
   these just carry height/colour. */
.mock-name { display: block; height: 1.1rem; background: #e2ddd0; border-radius: 3px; margin-bottom: .45rem; }
.mock-org  { display: block; height: .75rem; background: #ece8de; border-radius: 3px; margin-bottom: .55rem; }
.mock-meta { display: block; height: .6rem; background: #ece8de; border-radius: 3px; margin-bottom: .55rem; }
/* Runway track + a coloured fill of varying width, mirroring real cards'
   deadline-progress bars. Colours are muted (blended toward the card bg) so
   under heavy blur they read as plausible variety, not acid swatches. */
.mock-bar  { display: block; height: 8px; width: 100%; background: #ece8de; border-radius: 999px; overflow: hidden; }
.mock-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--far); }
.mock-bar-fill.u0 { background: color-mix(in srgb, var(--far) 70%, var(--card)); }
.mock-bar-fill.u1 { background: color-mix(in srgb, var(--soon) 55%, var(--card)); }
.mock-bar-fill.u2 { background: color-mix(in srgb, var(--urgent) 55%, var(--card)); }

/* "+N more" badge — a stamped scarcity cue pinned to the top of the wall. */
.gate-more-badge {
  position: absolute;
  top: .7rem;
  right: .9rem;
  z-index: 45;
  font-family: "JetBrains Mono", monospace;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--fg);
  background: var(--accent-a);
  border: 1.5px solid var(--fg);
  border-radius: 999px;
  padding: .25rem .6rem;
  box-shadow: 0 2px 0 var(--fg);
}

/* The CTA panel shares the zone's single grid cell with the blur column, so the
   column's height is the runway. align-self:start keeps the panel from
   stretching; position:sticky + top pins it at the eyeline as it rises. */
.gate-overlay {
  position: sticky;
  top: 22vh;
  align-self: start;
  justify-self: center;
  z-index: 40;
  /* Start the panel partway down the column so there's blur above it to "rise"
     before it reaches the pin line, and blur below it once pinned. */
  margin-top: 38vh;
  margin-bottom: 22vh;
  width: min(460px, 88%);
  background: var(--card);
  border: 2px solid var(--fg);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  padding: 1.4rem 1.5rem;
  text-align: center;
}
.gate-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-a);
}
.gate-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin: .3rem 0 .4rem;
}
.gate-blurb { color: var(--muted); font-size: .88rem; margin: 0 0 1rem; }
.gate-form { max-width: 380px; margin: 0 auto; }
.gate-fine { font-size: .7rem; color: var(--muted); margin: .7rem 0 0; }

/* Subscribe success banner (rendered into #capture-success on submit). */
.capture-success-note {
  max-width: 880px;
  margin: 0 auto 1.25rem;
  padding: .75rem 1rem;
  border-radius: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: .8rem;
  background: var(--accent-c);
  color: var(--fg);
  border: 1.5px solid var(--fg);
}
.capture-success-note strong { font-weight: 700; }

/* ── Alina feedback batch (2026-06) ───────────────────────────────────────── */

/* A1: tiny "deadline" caption above the date cube */
.dateblock-wrap {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}
.dateblock-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .56rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A2: compact Apply at the top of the expanded card, on the dark strip */
.btn-apply-top {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .45rem .8rem;
  background: var(--accent-c);
  color: var(--fg);
  border: 1.5px solid var(--accent-c);
  border-radius: 6px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn-apply-top:hover { background: var(--accent-a); border-color: var(--accent-a); color: var(--fg); }
.btn-apply-top .arrow { font-weight: 700; }

/* A4: filter↔subscribe echo chips */
.subscribe-watching {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
  margin: 0 0 .9rem;
}
.watching-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.watching-chip {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  padding: .1rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
}

/* D1: favorite star toggle */
.fav-toggle {
  margin-left: auto;
  flex: 0 0 auto;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
  padding: 0 .15rem;
}
.fav-toggle:hover { color: var(--accent-a); }
.fav-toggle.is-fav { color: var(--accent-a); }

/* D2: "Saved" filter mode — hide non-favorited real cards */
.saved-toggle {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-left: .5rem;
  padding: .35rem .7rem;
  border: 1.5px solid var(--fg);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .76rem;
  white-space: nowrap;
}
.saved-toggle.is-active { background: var(--accent-c); }
.program-list.saved-only .program-item:not(.is-fav) { display: none; }
