/* SendComedy. Layout: a sunlit brick-wall "stage" header holds the finder; below it, set chips and a card grid.
   Bit pages swap the stage for a slim bar, with the player beside the share actions.
   Light only, on purpose: a club with the house lights up. Ink outlines and hard offset shadows are the house style. */
:root {
  --paper: #FFF8EC;
  --surface: #FFFFFF;
  --ink: #1D1A16;
  --muted: #6A6159;
  --line: #E9DBC4;
  --brick: #E2462C;
  --brick-text: #B8321B;
  --spot: #FFC531;
  --spot-soft: #FFEDB5;
  --spot-ink: #1D1A16;
  --wall: #FFC94A;
  --wall-hi: #FFCF5C;
  --mortar: #F6B92E;
  --stage: #1D1A16;
  --placeholder: #F1E4CE;

  --f-mark: "Bungee", "Arial Black", Impact, sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --radius: 12px;
  --pop: 4px 4px 0 var(--ink);
  --pop-sm: 3px 3px 0 var(--ink);
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brick); outline-offset: 2px; }
.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;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brick-text);
}

/* ---------- Stage (home header) ---------- */
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--wall);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  padding-top: env(safe-area-inset-top, 0px);
}
.wall { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.wall .mortar { fill: var(--mortar); }
.wall .brick { fill: var(--wall); }
.wall .brick.alt { fill: var(--wall-hi); }
/* The spotlight: a white wash from the top, fading out before the edges of the wall. */
.stage::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 42% 95% at 50% -10%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.35) 45%, transparent 75%),
    radial-gradient(ellipse 85% 120% at 50% 20%, transparent 55%, color-mix(in srgb, var(--brick) 16%, transparent)),
    linear-gradient(to bottom, transparent 60%, color-mix(in srgb, var(--brick) 10%, transparent));
}
.stage-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 76px) var(--gutter) clamp(32px, 5vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
.wordmark {
  font-family: var(--f-mark);
  font-weight: 400;
  font-size: clamp(2.4rem, 1rem + 7.5vw, 5.2rem);
  line-height: 0.95;
  color: var(--brick);
  text-shadow: 0.05em 0.05em 0 var(--ink);
  overflow-wrap: anywhere;
}
.wordmark a { text-decoration: none; }
.tagline {
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(1.2rem, 0.9rem + 1.4vw, 1.7rem);
}

.modes {
  display: inline-flex;
  gap: 2px;
  margin-top: 16px;
  padding: 3px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--pop-sm);
}
.mode {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
}
.mode[aria-selected="true"] { background: var(--ink); color: var(--spot); }

.finder { width: 100%; margin-top: 10px; }
.finder input,
.finder textarea {
  width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
  font: inherit;
  font-size: 1.05rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: box-shadow 0.15s ease;
}
.finder input:focus,
.finder textarea:focus { outline: none; box-shadow: 5px 5px 0 var(--brick); }
.finder textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
.finder input::placeholder,
.finder textarea::placeholder { color: var(--muted); }

/* ---------- Set chips ---------- */
.sets {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.chips {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter) 14px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 2px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.9rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--spot); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }

/* ---------- Results ---------- */
.results {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.row { display: flex; flex-direction: column; gap: 18px; }
/* Section titles get a highlighter stroke in spotlight yellow. */
.row-title,
.more h2 {
  align-self: flex-start;
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1.2;
  padding: 0 4px;
  margin-left: -4px;
  background: linear-gradient(transparent 55%, color-mix(in srgb, var(--spot) 70%, transparent) 55%, color-mix(in srgb, var(--spot) 70%, transparent) 92%, transparent 92%);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 26px 20px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}
.card:focus-visible { outline: none; }
.thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--placeholder);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .thumb,
.card:focus-visible .thumb { transform: translate(-2px, -2px); box-shadow: var(--pop); }
.card:focus-visible .thumb { box-shadow: 4px 4px 0 var(--brick); }
.thumb-tag {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500;
  background: var(--spot); color: var(--spot-ink);
  border: 1.5px solid var(--ink);
  padding: 1px 7px; border-radius: 6px;
}
.card-title {
  font-weight: 650;
  font-size: 0.98rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--spot); text-underline-offset: 3px; }
.card-meta { font-size: 0.82rem; color: var(--muted); }
.empty { color: var(--muted); padding: 24px 0; }

/* ---------- Bit page ---------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 12px;
  background: var(--spot);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
}
.wordmark-sm {
  font-family: var(--f-mark);
  font-size: 1.35rem;
  color: var(--brick);
  text-shadow: 2px 2px 0 var(--ink);
  text-decoration: none;
}
.bar-link {
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 14px;
  box-shadow: 2px 2px 0 var(--ink);
}
.bar-link:hover { box-shadow: var(--pop-sm); }

.bit {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.player {
  aspect-ratio: 16 / 9;
  max-width: 100%;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  background: var(--stage);
  box-shadow: 6px 6px 0 var(--ink);
}
.player.is-short { aspect-ratio: 9 / 16; max-height: 78vh; justify-self: center; width: auto; height: min(78vh, 720px); }
.player iframe { width: 100%; height: 100%; border: 0; display: block; }
.poster {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.play-btn {
  position: absolute; left: 50%; top: 50%;
  width: 76px; height: 76px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--spot);
  border: 3px solid var(--ink);
  box-shadow: var(--pop);
  transition: transform 0.15s ease;
}
.play-btn::after {
  content: "";
  position: absolute; left: 28px; top: 21px;
  border-left: 22px solid var(--spot-ink);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
}
.poster:hover .play-btn { transform: translate(-50%, -50%) scale(1.07); }
.timecode {
  position: absolute; right: 10px; bottom: 10px;
  font-family: var(--f-mono); font-size: 0.78rem;
  color: #fff; background: rgba(0, 0, 0, 0.65);
  padding: 2px 7px; border-radius: 4px;
}

.bit-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bit-title {
  font-stretch: 108%;
  font-weight: 800;
  font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem);
  line-height: 1.15;
}
.credit { color: var(--muted); }
.credit a { color: var(--brick-text); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: var(--pop-sm); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-primary { background: var(--spot); color: var(--spot-ink); box-shadow: var(--pop-sm); }
.btn-primary:hover { box-shadow: var(--pop); }
.btn-ghost { background: transparent; border-color: color-mix(in srgb, var(--ink) 30%, transparent); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost[aria-pressed="true"] { background: var(--spot-soft); border-color: var(--ink); }
.status { min-height: 1.5em; font-size: 0.9rem; color: var(--muted); overflow-wrap: anywhere; }
.reply {
  display: block;
  padding: 14px 16px;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--spot-soft);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.12s ease;
}
.reply:hover { box-shadow: var(--pop-sm); }
.reply strong { color: var(--brick-text); }
.fine { font-size: 0.85rem; color: var(--muted); }

.more {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px var(--gutter) 52px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.empty-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 80px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.empty-page h1 {
  font-family: var(--f-mark);
  font-weight: 400;
  font-size: 2.4rem;
  line-height: 1.05;
  color: var(--brick);
  text-shadow: 3px 3px 0 var(--ink);
}

.site-footer {
  border-top: 2px solid var(--ink);
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer a { color: var(--ink); text-underline-offset: 2px; }
.email { font-family: var(--f-mono); color: var(--ink); user-select: all; }

@media (max-width: 820px) {
  .bit { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .player.is-short { height: min(70vh, 640px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Info pages (/privacy, /remove) ---------- */
.prose-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px var(--gutter) 56px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.prose-page h1 { font-stretch: 112%; font-weight: 800; font-size: clamp(1.8rem, 1.2rem + 2vw, 2.4rem); line-height: 1.1; }
.prose-page h2 { font-stretch: 108%; font-weight: 750; font-size: 1.2rem; margin-top: 14px; }
.prose-page .lede { font-size: 1.1rem; color: var(--muted); }
.prose-page ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.prose-page a { color: var(--brick-text); }
.prose-page code { font-family: var(--f-mono); font-size: 0.9em; }
.remove-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.remove-form label { font-weight: 650; font-size: 0.92rem; margin-top: 8px; }
.remove-form input,
.remove-form select,
.remove-form textarea {
  font: inherit;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.remove-form input:focus,
.remove-form select:focus,
.remove-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: var(--pop-sm); }
.remove-form button { align-self: flex-start; margin-top: 14px; }
.remove-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 2px solid var(--brick-text);
  background: #FFF0EC;
  color: var(--brick-text);
}
