:root {
  --bg: #070707;
  --fg: #ecece8;
  --muted: #8d8d88;
  --faint: #5a5a56;
  --line: rgba(255, 255, 255, 0.12);
  --panel: rgba(255, 255, 255, 0.03);
  --coral: #ff5c39;
  --page: 44rem;
  --sans: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --display: "Michroma", "Outfit", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  max-width: 100%;
  background: var(--bg);
  color: var(--fg);
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-wrap: break-word;
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(255, 92, 57, 0.09), transparent 58%),
    radial-gradient(ellipse 55% 35% at 100% 110%, rgba(255, 255, 255, 0.035), transparent 55%);
}

.code-spark {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--coral);
}

a:focus-visible {
  outline: none;
}

::selection {
  background: var(--coral);
  color: #070707;
}

.page {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  max-width: var(--page);
  min-width: 0;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1rem calc(1.5rem + 3.5rem);
  text-align: center;
}

.brand {
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coral);
  text-shadow:
    0 0 4px rgba(255, 92, 57, 0.7),
    0 0 12px rgba(255, 92, 57, 0.28);
  animation: brand-pulse 5.5s ease-in-out infinite;
}

@keyframes brand-pulse {
  0%,
  100% {
    text-shadow:
      0 0 3px rgba(255, 92, 57, 0.45),
      0 0 10px rgba(255, 92, 57, 0.16);
  }
  50% {
    text-shadow:
      0 0 6px rgba(255, 92, 57, 0.95),
      0 0 16px rgba(255, 92, 57, 0.4),
      0 0 28px rgba(255, 92, 57, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand,
  .section-head h2 {
    animation: none;
  }
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  gap: 0.85rem 1.15rem;
  font-family: var(--display);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

a[target="_blank"]::after {
  content: "\00a0\2197";
  font-size: 0.85em;
}

.page {
  width: 100%;
  max-width: var(--page);
  min-width: 0;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

.site-footer {
  margin: 2.75rem 0 0 3.5rem;
  font-size: 0.75rem;
  font-weight: 200;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.lede {
  margin: 2.75rem 0 0 3.5rem;
  width: auto;
  max-width: none;
  box-sizing: border-box;
  padding: 1.25rem 1.35rem 1.15rem;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--panel);
}

.lede-mark {
  display: block;
  width: 2rem;
  height: auto;
  margin: 0 auto 0.85rem;
  color: var(--coral);
}

.lede-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

.purpose {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.8415rem;
  font-weight: 300;
  color: var(--muted);
}

.purpose a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.purpose a:hover,
.purpose a:focus-visible {
  border-color: var(--coral);
}

.lede + .section {
  border-top: 0;
  padding-top: 2.25rem;
}

.hero {
  padding: 3rem 0;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
}

.section {
  position: relative;
  padding: 4.75rem 0 1rem;
}

.section::before {
  content: "";
  position: absolute;
  left: -0.4rem;
  right: -0.4rem;
  top: 0;
  height: 1px;
  background: var(--line);
  box-shadow: 0 0 6px rgba(236, 236, 232, 0.22), 0 0 14px rgba(236, 236, 232, 0.12);
  pointer-events: none;
}

.section::after {
  content: "";
  position: absolute;
  left: -0.4rem;
  right: -0.4rem;
  top: -14px;
  height: 14px;
  pointer-events: none;
  background: linear-gradient(var(--line), var(--line)) right top / 1px 14px no-repeat;
  filter: drop-shadow(0 0 4px rgba(236, 236, 232, 0.4));
}

.lede + .section::before,
.lede + .section::after {
  content: none;
}



.section-head {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.75rem 1rem;
  margin-bottom: 2.25rem;
}

.section-n {
  font-size: 0.6875rem;
  color: var(--coral);
  padding-top: 0.35rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  text-shadow:
    0 0 4px rgba(255, 92, 57, 0.7),
    0 0 12px rgba(255, 92, 57, 0.28);
  animation: brand-pulse 5.5s ease-in-out infinite;
}

.section-head h2:last-child {
  margin-bottom: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.section-body {
  padding-left: 3.5rem;
  min-width: 0;
}

#library .section-body {
  padding-bottom: 1.5rem;
}

.steps {
  margin: 0;
  padding: 0 0 0 1.15rem;
  color: var(--muted);
}

.steps li + li {
  margin-top: 0.65rem;
}

.steps a {
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.steps a:hover,
.steps a:focus-visible {
  border-color: var(--coral);
}

.step-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 300;
}

.step-note code,
.prompt-note code {
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: 0;
  color: var(--fg);
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1.1rem;
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  font-weight: 300;
}

.link-row a {
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.link-row a:hover,
.link-row a:focus-visible {
  border-color: var(--coral);
}

.prompt-label {
  margin: 0.85rem 0 0.45rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.prompt-label:first-child {
  margin-top: 0;
}

.tool-group {
  margin: 1.5rem 0 0.35rem;
  font-family: var(--display);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
}

.section-body > .step-note + .tool-group {
  margin-top: 0.85rem;
}

.prompt {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 0.9rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.prompt pre {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
  line-height: 1.55;
  min-height: 4.65em;
  max-height: 4.65em;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--fg);
}

.prompt.is-open pre {
  max-height: none;
}

.prompt.is-long pre {
  cursor: pointer;
  mask-image: linear-gradient(to bottom, #000 50%, transparent);
}

.prompt.is-long.is-open pre {
  mask-image: none;
}

.copy-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0;
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}

.copy-btn:hover,
.copy-btn:focus-visible,
.copy-btn.is-copied {
  color: var(--coral);
  border-color: var(--coral);
}

.copy-btn:focus-visible {
  outline: none;
}

.prompt-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.concept,
.build,
.tool {
  border-top: 1px solid var(--line);
}

.concept summary,
.build summary {
  list-style: none;
  display: grid;
  grid-template-columns: 2.5rem 1fr auto;
  gap: 0.75rem 1rem;
  padding: 1rem 0;
  cursor: pointer;
  background: transparent;
}

.concept summary::-webkit-details-marker,
.build summary::-webkit-details-marker {
  display: none;
}

.concept summary:hover .concept-mark,
.concept summary:focus-visible .concept-mark,
.build summary:hover .build-mark,
.build summary:focus-visible .build-mark,
.tool summary:hover .tool-mark,
.tool summary:focus-visible .tool-mark {
  color: var(--coral);
}

.concept summary:focus-visible,
.build summary:focus-visible,
.tool summary:focus-visible {
  outline: none;
}

.concept-n,
.build-n {
  font-size: 0.6875rem;
  color: var(--faint);
  padding-top: 0.3rem;
}

.concept-title,
.build-title {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.concept-promise,
.build-lede {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.concept-mark,
.build-mark,
.tool-mark {
  display: inline-block;
  color: var(--faint);
  font-size: 1rem;
  line-height: 1;
  padding-top: 0.25rem;
}

.concept-mark::before,
.build-mark::before,
.tool-mark::before {
  content: "+";
}

.concept[open] .concept-n,
.concept[open] .concept-mark,
.build[open] .build-n,
.build[open] .build-mark,
.tool[open] .tool-mark {
  color: var(--coral);
}

.concept[open] .concept-mark,
.build[open] .build-mark,
.tool[open] .tool-mark {
  transform: rotate(45deg);
}

.tool summary {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: 1rem 0;
  cursor: pointer;
  background: transparent;
}

.tool summary::-webkit-details-marker {
  display: none;
}

.tool-title {
  display: block;
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.tool-note {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.tool-body {
  padding: 0 0 1.25rem;
}

.concept-body,
.build-body {
  padding: 0 0 1.4rem 3.5rem;
}

.concept-body p,
.build-body > p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.video {
  position: relative;
  border: 1px solid var(--line);
  background: transparent;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0 0 0.85rem;
}

.video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.play-glyph {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--fg);
  display: grid;
  place-items: center;
}

.play-glyph::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent var(--fg);
  margin-left: 2px;
}

.play:hover .play-glyph,
.play:focus-visible .play-glyph {
  border-color: var(--coral);
}

.play:hover .play-glyph::after,
.play:focus-visible .play-glyph::after {
  border-color: transparent transparent transparent var(--coral);
}

.play:focus-visible {
  outline: none;
}

.video.is-playing .play {
  display: none;
}

.build-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.1rem;
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
}

.build-links a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.05rem;
}

.build-links a:hover,
.build-links a:focus-visible {
  border-color: var(--coral);
}

.build-links .soon {
  color: var(--faint);
  border-bottom: 1px dashed var(--line);
}

.build-script {
  margin-left: auto;
}

.build-script summary {
  display: block;
  padding: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 300;
  cursor: pointer;
  list-style: none;
}

.build-script summary::-webkit-details-marker {
  display: none;
}

.build-script[open] {
  flex: 1 0 100%;
  margin-left: 0;
}

.build-script[open] summary {
  color: var(--coral);
  text-align: right;
}

.build-script ol {
  margin: 0.25rem 0 0;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.build-script li + li {
  margin-top: 0.3rem;
}

body.flow {
  --page: 58rem;
}

body.flow .site-header-inner {
  padding: 1.25rem 1.5rem 1rem;
}

.nav a.is-on {
  color: var(--coral);
}

.step-card {
  margin: 1.15rem 0 0;
  padding: 1.25rem 1.35rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.step-card-head {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  margin: 0 0 1rem;
}

.step-badge {
  flex: 0 0 1.65rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 4px;
  background: var(--coral);
  color: #1a0906;
  font-family: var(--display);
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-card-head h2 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral);
  animation: none;
  text-shadow: none;
}

.step-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.tabs {
  display: flex;
  gap: 1.25rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.45rem 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.tabs button.is-on {
  color: var(--coral);
  border-bottom-color: var(--coral);
}

.warn,
.expect {
  margin: 0.75rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 300;
}

.warn {
  border: 1px solid rgba(255, 92, 57, 0.45);
  background: rgba(255, 92, 57, 0.08);
  color: var(--fg);
}

.expect {
  border: 1px solid rgba(90, 160, 110, 0.45);
  background: rgba(90, 160, 110, 0.1);
  color: var(--fg);
}

.expect strong,
.warn strong {
  display: block;
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--muted);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.recipe {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.05rem 1.1rem;
  background: rgba(0, 0, 0, 0.2);
}

.recipe h3 {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.recipe-promise,
.recipe-body {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 300;
}

.more {
  display: inline-block;
  margin: 0.9rem 0 0;
  color: var(--coral);
  font-size: 0.8125rem;
}

.ref-list .build {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin: 0 0 0.85rem;
}

.ref-list .build summary {
  grid-template-columns: auto 1fr auto;
}

.ref-list .build-body {
  padding-left: 0;
}

.page-kicker {
  margin: 2rem 0 0.35rem;
  text-align: center;
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

.page-sub {
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 300;
}

body.flow .lede {
  margin-left: auto;
  margin-right: auto;
  width: auto;
  max-width: none;
}

body.flow .site-footer {
  margin-left: 0;
}

@media (max-width: 720px) {
  .recipe-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    padding: 1.15rem 1.15rem 0.85rem;
  }

  .nav {
    gap: 0.4rem 0.5rem;
    letter-spacing: 0.08em;
    font-size: 0.5625rem;
  }

  .lede + .section {
    border-top: 0;
    padding-top: 1.75rem;
  }

  .page {
    padding: 0 1.15rem 3rem;
  }

  .section {
    padding-top: 3.25rem;
  }

  .section-head,
  .concept summary,
  .build summary {
    grid-template-columns: 2rem 1fr auto;
  }

  .section-body,
  .concept-body,
  .build-body {
    padding-left: 0;
  }



  .lede {
    margin-left: 0;
    width: 100%;
  }

  .site-footer {
    margin-left: 0;
  }

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

  .copy-btn {
    justify-self: end;
  }
}
