/* AI Prompts — static site styles. No framework. No tracking. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-sans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/instrument-sans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/instrument-sans-600.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/instrument-sans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500.woff2") format("woff2");
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  background: #08090c;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0;
  color: #f4f1ea;
  background: #08090c;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input { font: inherit; letter-spacing: 0; }
pre, code { font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

:root {
  --bg: #08090c;
  --bg-soft: #0e0f14;
  --bg-card: #12131a;
  --bg-code: #0b0c11;
  --text: #f4f1ea;
  --text-dim: #b4afa4;
  --text-faint: #9e998f;
  --line: rgba(244, 241, 234, 0.10);
  --line-strong: rgba(244, 241, 234, 0.16);
  --lime: #d8f651;
  --aqua: #5eead4;
  --ink-on-lime: #14160a;
  --accent: linear-gradient(120deg, #d8f651 0%, #9af0b8 46%, #5eead4 100%);
  --header-h: 4.5rem;
  --max: 70rem;
  --radius: 1.25rem;
}

:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--lime);
  color: var(--ink-on-lime);
  padding: 0.6rem 0.9rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(60rem 32rem at 88% -8%, rgba(216, 246, 81, 0.16), transparent 58%),
    radial-gradient(46rem 30rem at -6% 18%, rgba(94, 234, 212, 0.13), transparent 54%),
    radial-gradient(50rem 36rem at 50% 120%, rgba(216, 246, 81, 0.06), transparent 55%),
    var(--bg);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(24rem 18rem at 30% 40%, rgba(94, 234, 212, 0.05), transparent 70%),
    radial-gradient(20rem 16rem at 70% 60%, rgba(216, 246, 81, 0.04), transparent 70%);
  animation: drift 28s ease-in-out infinite alternate;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.042;
  mix-blend-mode: overlay;
  background-image: url("assets/grain.png");
  background-size: 180px 180px;
  animation: grain-shift 1.1s steps(2) infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-2.5%, -1.5%, 0); }
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(1%, -1%); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  background: rgba(8, 9, 12, 0.96);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
}
.wordmark .brand { line-height: 1; }
.mark {
  width: 2rem;
  height: 2rem;
  display: block;
  flex: 0 0 auto;
  border-radius: 0.55rem;
  box-shadow:
    0 0 0 1px rgba(216, 246, 81, 0.18),
    0 0 18px rgba(94, 234, 212, 0.16);
  transition: box-shadow 0.35s ease;
}
.wordmark:hover .mark {
  box-shadow:
    0 0 0 1px rgba(216, 246, 81, 0.4),
    0 0 22px rgba(216, 246, 81, 0.28);
}
.header-search {
  margin-left: auto;
  position: relative;
  width: min(22rem, 52vw);
}
.header-search input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.95rem 0 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 19, 26, 0.85);
  color: var(--text);
  outline: none;
}
.header-search input::placeholder { color: var(--text-faint); }
.header-search input:focus {
  border-color: rgba(94, 234, 212, 0.55);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.16);
}
.header-search svg {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.05rem;
  height: 1.05rem;
  color: var(--text-faint);
  pointer-events: none;
}

/* Layout */
.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}
.hero {
  padding: 2.55rem 0 1.7rem;
}
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 500;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.5rem;
  height: 2px;
  margin-right: 0.65rem;
  margin-bottom: 0.22rem;
  vertical-align: middle;
  background: var(--accent);
  border-radius: 2px;
}
.hero h1 {
  margin: 0;
  font-family: "Instrument Serif", "Iowan Old Style", Palatino, serif;
  font-weight: 400;
  font-size: clamp(2.45rem, 6.2vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0;
  max-width: 16ch;
}
.hero h1 em {
  font-style: italic;
  position: relative;
  display: inline-block;
  padding-bottom: 0.28em;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.08em;
  height: 2px;
  border-radius: 99px;
  background-image: linear-gradient(90deg, #d8f651, #9af0b8, #5eead4, #9af0b8, #d8f651);
  background-size: 200% 100%;
  animation: underline-shimmer 7s linear infinite;
  box-shadow: 0 0 8px rgba(216, 246, 81, 0.32), 0 0 14px rgba(94, 234, 212, 0.18);
}
@keyframes underline-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
.lede {
  margin: 1.15rem 0 0;
  max-width: 32rem;
  color: var(--text-dim);
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* Video cards */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}
.section-head h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dim);
}
.video-list {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 5rem;
}
.video-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  text-decoration: none;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(216, 246, 81, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 28px 52px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(216, 246, 81, 0.18),
    0 14px 40px rgba(94, 234, 212, 0.12);
}
.thumb {
  aspect-ratio: 16 / 9;
  background: #181920;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.video-card:hover .thumb img { transform: scale(1.03); }
.video-body {
  padding: 1.3rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 0;
}
.video-meta {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.video-body h3 {
  margin: 0;
  font-family: "Instrument Serif", "Iowan Old Style", Palatino, serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: 0;
}
.video-hook {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 38ch;
}
.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 1.6rem;
  padding: 0 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(244, 241, 234, 0.04);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
}
.video-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.35rem;
}
.video-foot .badges {
  margin: 0;
  padding: 0;
}
.view-cta {
  color: var(--lime);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.25s ease, transform 0.25s ease;
}
.video-card:hover .view-cta,
.video-card:focus-visible .view-cta {
  color: var(--aqua);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 1.55rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  border: 1px solid;
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-haiku { color: #ffd2bc; background: rgba(255, 176, 140, 0.12); border-color: rgba(255, 176, 140, 0.3); }
.badge-sonnet { color: #ddd0ff; background: rgba(180, 150, 255, 0.12); border-color: rgba(180, 150, 255, 0.3); }
.badge-opus { color: #ffe39d; background: rgba(255, 205, 100, 0.12); border-color: rgba(255, 205, 100, 0.3); }
.badge-fable { color: #d8f651; background: rgba(216, 246, 81, 0.1); border-color: rgba(216, 246, 81, 0.3); }

.empty {
  display: none;
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.video-list.is-empty .empty { display: block; }
.video-card.is-hidden { display: none; }

/* Video page */
.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1.6rem 0 0;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.back:hover { color: var(--text); }
.video-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2rem;
  align-items: center;
  padding: 1.4rem 0 2.4rem;
}
.video-hero .thumb {
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}
.video-hero h1 {
  margin: 0 0 0.85rem;
  font-family: "Instrument Serif", "Iowan Old Style", Palatino, serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: 0;
}
.watch {
  margin: 1.1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.9rem;
}
.watch-link,
.watch-pending {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.55rem;
  padding: 0 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.watch-link {
  background: var(--accent);
  color: var(--ink-on-lime);
}
.watch-pending {
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  background: rgba(18, 19, 26, 0.6);
  cursor: default;
}
.intro, .run-note {
  color: var(--text-dim);
  max-width: 46rem;
}
.intro p { margin: 0 0 0.9rem; }
.numbers {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0 2.4rem;
  font-size: 0.92rem;
}
.numbers th,
.numbers td {
  text-align: left;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.numbers th {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.75rem;
}
.numbers td:nth-child(n+2) {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.85rem;
}
.numbers .group {
  color: var(--text);
  font-weight: 600;
  padding-top: 1rem;
}

.prompt-block {
  margin: 0 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-card);
  overflow: visible;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.prompt-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas:
    "title words copy"
    "badges badges copy"
    "note note note";
  align-items: center;
  column-gap: 0.8rem;
  row-gap: 0.45rem;
  padding: 0.9rem 1rem 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background-color: #12131a;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  position: sticky;
  top: var(--header-h);
  z-index: 6;
  border-radius: calc(var(--radius) + 4px) calc(var(--radius) + 4px) 0 0;
}
.prompt-toolbar > div:first-child { grid-area: title; min-width: 0; }
.prompt-toolbar .badges { grid-area: badges; padding-top: 0; margin-top: 0; }
.prompt-toolbar .prompt-words { grid-area: words; justify-self: end; white-space: nowrap; }
.prompt-toolbar .copy-btn { grid-area: copy; margin-left: 0; align-self: center; }

.prompt-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-faint);
}
.prompt-toolbar h2 {
  margin: 0;
  font-family: "Instrument Serif", Palatino, serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0;
  flex: 1 1 auto;
}
.prompt-words {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 6.6rem;
  height: 2.4rem;
  padding: 0 0.9rem;
  margin-left: auto;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #1a1b24;
  color: var(--text);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.25s ease;
}
.copy-btn svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.copy-btn .icon-check { display: none; }
.copy-btn:hover { border-color: rgba(216, 246, 81, 0.5); }
.copy-btn.is-copied {
  background: var(--lime);
  color: var(--ink-on-lime);
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(216, 246, 81, 0.2), 0 8px 22px rgba(216, 246, 81, 0.22);
}
.copy-btn.is-copied .icon-copy { display: none; }
.copy-btn.is-copied .icon-check { display: block; }
.copy-btn.is-copied .btn-label,
.copy-btn.is-copied .icon-check { animation: copied-pop 0.45s ease; }

@keyframes copied-pop {
  0% { transform: scale(0.82); opacity: 0; }
  55% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.prompt-toolbar .prompt-note {
  grid-area: note;
  justify-self: start;
  margin: 0;
  padding: 0.15rem 0 0.1rem;
  color: var(--text-faint);
  font-size: 0.8rem;
  border: 0;
  max-width: 52rem;
}
.prompt-block { scroll-margin-top: calc(var(--header-h) + 0.6rem); }
.prompt-body {
  margin: 0;
  padding: 1.15rem 1.2rem 1.4rem 1.3rem;
  max-height: min(70vh, 52rem);
  overflow: auto;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: #e8e4da;
  tab-size: 2;
  background:
    linear-gradient(90deg, rgba(216, 246, 81, 0.11) 0 3px, transparent 3px),
    var(--bg-code);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tok-head {
  color: var(--lime);
  font-weight: 500;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.4rem;
  color: var(--text-faint);
  font-size: 0.88rem;
}
.site-footer p { margin: 0 0 0.4rem; }

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

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-in,
.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (max-width: 780px) {
  :root { --header-h: 4.5rem; }
  body:has(.header-search) { --header-h: 6.85rem; }
  .wrap, .header-inner { width: min(var(--max), calc(100% - 2rem)); }
  .header-search { width: 100%; }
  .header-inner { flex-wrap: wrap; padding: 0.65rem 0 0.75rem; }
  .site-header { height: auto; min-height: var(--header-h); }
  .hero { padding: 1.7rem 0 1.25rem; }
  .video-card,
  .video-hero { grid-template-columns: 1fr; }
  .video-body { padding: 1.1rem 1.1rem 1.15rem; gap: 0.55rem; }
  .video-hook { max-width: none; }
  .view-cta { margin-left: auto; }
  .prompt-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.7rem;
    padding: 0.8rem 0.9rem;
  }
  .prompt-toolbar > div:first-child {
    flex: 1 1 calc(100% - 7.5rem);
    min-width: 0;
    order: 1;
  }
  .prompt-toolbar h2 { font-size: 1.25rem; }
  .prompt-toolbar .copy-btn { flex: 0 0 auto; margin-left: auto; order: 2; }
  .prompt-toolbar .badges { flex: 1 1 100%; order: 3; }
  .prompt-toolbar .prompt-words { flex: 1 1 100%; order: 4; }
  .prompt-toolbar .prompt-note { flex: 1 1 100%; order: 5; }
  .copy-btn { margin-left: 0; }
  .prompt-body { padding: 1rem 0.95rem 1.2rem 1.05rem; }
  .numbers td:nth-child(n+2) { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .atmosphere::after,
  .grain,
  .video-card,
  .thumb img,
  .copy-btn,
  .reveal,
  .copy-btn.is-copied .btn-label,
  .copy-btn.is-copied .icon-check,
  .hero h1 em::after {
    animation: none !important;
    transition: none !important;
  }
  .hero h1 em::after { box-shadow: none; }
  .video-card:hover,
  .video-card:focus-visible { transform: none; }
  .video-card:hover .thumb img { transform: none; }
  .reveal { opacity: 1; transform: none; }
}
