@font-face {
  font-family: "Berkeley Mono";
  src: url("/BerkeleyMonoTrial-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --pink: #ed2d6c;
  --teal: #00a092;
}

* { box-sizing: border-box; }

html { background: var(--black); }

body {
  min-height: 100svh;
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Berkeley Mono", monospace;
}

code { font: inherit; }

main {
  width: calc(100% - 2rem);
  max-width: 48rem;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 5rem) 0 2rem;
}

.masthead {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carton {
  width: 4rem;
  height: 4rem;
  image-rendering: pixelated;
}

.domain {
  margin: 0 0 .35rem;
  color: var(--pink);
  font-size: .75rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 5vw, 2.25rem);
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: clamp(1.2rem, 4vw, 1.65rem);
  line-height: 1.25;
}

.lede {
  margin: 2rem 0 1rem;
  font-weight: 700;
}

.editor {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 3px outset var(--white);
  background: var(--black);
}

.editor-bar,
.editor-status {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .55rem;
}

.editor-bar { border-bottom: 2px inset var(--white); }
.editor-status { justify-content: space-between; border-top: 2px inset var(--white); font-size: .75rem; }

.lamp,
.status-light {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border: 3px double var(--teal);
  background: var(--teal);
  vertical-align: -.1rem;
}

.editor-bar strong { color: var(--pink); }

button,
a {
  border: 2px outset var(--white);
  background: var(--black);
  color: var(--white);
  font: inherit;
  font-weight: 700;
}

button {
  margin-left: auto;
  padding: .25rem .6rem;
  cursor: pointer;
}

pre {
  max-width: 100%;
  margin: 0;
  padding: clamp(1rem, 4vw, 1.5rem);
  overflow-x: auto;
  color: var(--white);
  font: inherit;
  line-height: 1.8;
}

code span { display: block; }
.plain { color: var(--white); }
.added { border-left: .35rem solid var(--teal); padding-left: .65rem; }
.added b { color: var(--teal); margin-right: .5ch; }

.routes { margin: 1rem 0; }

.route {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: .6rem;
  text-align: center;
}

.route span {
  padding: .65rem .4rem;
  border: 2px outset var(--white);
  font-weight: 700;
}

.route .active { border-color: var(--pink); color: var(--pink); }
.route b,
.branch b { color: var(--teal); }

.branch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .65rem;
  padding-top: .75rem;
  font-size: .8rem;
}

.branch span { border-bottom: 2px inset var(--white); padding: .35rem; }

nav {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
}

.tour {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 3px double var(--white);
}

.tour-intro {
  max-width: 42rem;
  margin: 1rem 0 1.5rem;
  line-height: 1.6;
}

.checkpoint-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px inset var(--white); }
.checkpoint-flow > div { padding: 1rem; border-right: 1px solid var(--white); }
.checkpoint-flow > div:last-child { border: 0; }
.checkpoint-flow small { color: var(--teal); font-size: .875rem; }
.checkpoint-flow h3 { font-size: 1rem; margin: .65rem 0; }
.checkpoint-flow p { margin: 0; font-size: .875rem; line-height: 1.55; }
.milestone-example { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 1.5rem; border-top: 3px double var(--white); }
.milestone-example span { position: relative; padding: .75rem 0; text-align: center; font-size: .875rem; }
.milestone-example span::before { content: ""; position: absolute; width: 2px; height: .5rem; top: 0; left: 50%; background: var(--pink); }
.config-note { font-size: .875rem; line-height: 1.55; margin: .25rem 0 2rem; }
.config-note code { font: inherit; overflow-wrap: anywhere; }
.loop-heading { font-size: 1rem; margin: 2rem 0 1rem; }
.page-footer { display: flex; flex-wrap: wrap; gap: .75rem; border-top: 3px double var(--white); padding-top: 1.5rem; margin-top: 2rem; font-size: .875rem; }

.milk-loop {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.milk-loop li {
  position: relative;
  min-width: 0;
  padding: .75rem;
  border: 2px outset var(--white);
}

.milk-loop li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: calc(50% - .75rem);
  right: -.95rem;
  color: var(--teal);
  z-index: 1;
}

.milk-loop small,
.milk-loop strong,
.milk-loop span { display: block; }
.milk-loop small { color: var(--pink); }
.milk-loop strong { margin: .3rem 0 .55rem; }
.milk-loop span { font-size: .75rem; line-height: 1.45; }
.overview { margin-top: 1.5rem; }
summary { cursor: pointer; line-height: 1.5; }
summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.milk-loop summary { list-style: none; }
.milk-loop summary::-webkit-details-marker { display: none; }
.milk-loop summary::after { content: "+ details"; font-size: 14px; color: var(--teal); }
.milk-loop details[open] summary::after { content: "− close"; }
.milk-loop:has(details[open]) { grid-template-columns: 1fr; }
.milk-loop:has(details[open]) li:not(:last-child)::after { content: "↓"; top: auto; right: calc(50% - .3rem); bottom: -1.15rem; }
.milk-loop details p { font-size: 14px; line-height: 1.5; }
.explain { margin-top: .75rem; border: 2px outset var(--white); }
.explain summary, .shot summary { padding: .7rem; }
.explain p { padding: 0 .7rem .7rem; margin: 0; line-height: 1.55; }
.shot details > a { display: block; padding: 0; border: 0; }
.shot:has(details[open]) { grid-column: 1 / -1; }
.shot figcaption { border-top: 1px solid var(--white); }

.loop-note {
  margin: 1rem 0 0;
  padding: .75rem;
  border-left: .35rem solid var(--teal);
  line-height: 1.55;
}

.screens h2 { margin-bottom: 1.25rem; }

.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.shot {
  min-width: 0;
  margin: 0;
  border: 2px outset var(--white);
}

.shot.wide { grid-column: 1 / -1; }
.shot > a { display: block; padding: 0; border: 0; }
.shot > a:hover,
.shot > a:focus-visible { background: var(--black); outline: 2px solid var(--pink); outline-offset: 2px; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 2px inset var(--white);
}

.shot figcaption { padding: .65rem .75rem; line-height: 1.45; }
.shot figcaption b,
.shot figcaption span { display: block; }
.shot figcaption b { margin-bottom: .2rem; color: var(--teal); }
.shot figcaption span { font-size: .8rem; }

a {
  padding: .65rem .85rem;
  text-decoration: none;
}

a.primary { border-color: var(--teal); }

button:hover,
button:focus-visible,
a:hover,
a:focus-visible {
  border-color: var(--pink);
}
button:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

button:active,
a:active { border-style: inset; }

.docs { max-width: 56rem; }

.docs .masthead { margin-bottom: 1.5rem; }
.docs .masthead > div { min-width: 0; overflow-wrap: anywhere; }

.docs-nav {
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--white);
}

.intro {
  max-width: 44rem;
  margin: 0 0 2.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
}

.doc-section {
  padding: 1.5rem 0;
  border-top: 2px solid var(--white);
}

.doc-section h2 {
  margin: 0 0 1rem;
  color: var(--pink);
  font-size: 1.1rem;
}

.doc-section h3 { margin: 1.5rem 0 .5rem; font-size: 1rem; }
.doc-section p,
.doc-section li,
.terms dd { line-height: 1.55; }
.docs :not(pre) > code { overflow-wrap: anywhere; }

.programs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.program {
  padding: 1rem;
  border: 2px inset var(--white);
}

.program h3 { margin: 0 0 .5rem; }
.program p { margin: 0; }

.command {
  margin: .75rem 0 1rem;
  border: 2px inset var(--white);
  font-size: .9rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.steps { padding-left: 1.4rem; }
.steps li { margin: 1rem 0; padding-left: .35rem; }

.milk-path {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 1rem 0;
  border: 2px inset var(--white);
}

.milk-path span {
  padding: .8rem .5rem;
  border-right: 1px solid var(--white);
  text-align: center;
  font-weight: 700;
}

.milk-path span:last-child { border-right: 0; }
.milk-path .active { color: var(--pink); }
.milk-path .done { color: var(--teal); }

.terms {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .5rem 1rem;
  margin: 1rem 0;
}

.terms dt { color: var(--teal); font-weight: 700; }
.terms dd { margin: 0; }

.tree { color: var(--teal); }
.fine { font-size: .85rem; }

/* The public broadcast uses the same four inks and hard edges as the console. */
.broadcast main { max-width: 70rem; padding-top: 1.25rem; }
.broadcast h2 { font-size: clamp(1.5rem, 3.5vw, 2.3rem); }
.broadcast p { line-height: 1.55; }
.station-bar, .station-bar nav, .station, .broadcast-label, .lower-third { display: flex; align-items: center; }
.station-bar { justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.station { border: 0; padding: 0; gap: .5rem; font-size: .875rem; min-width: 0; overflow-wrap: anywhere; }
.station .carton { width: 2.5rem; height: 2.5rem; }
.station-bar nav { margin: 0; gap: .5rem; }
.station-bar nav a { padding: .45rem .7rem; font-size: .875rem; }
.transmission { border: 4px outset var(--white); }
.broadcast-label { justify-content: space-between; gap: 1rem; padding: .65rem 1rem; border-bottom: 3px double var(--white); font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.broadcast-label span:first-child { color: var(--pink); }
.pitch { display: grid; grid-template-columns: 1.1fr 1fr; }
.pitch-copy { padding: clamp(1.5rem, 4vw, 3rem); }
.pitch h1 { font-size: clamp(3.5rem, 7.8vw, 6.25rem); line-height: .95; letter-spacing: -.07em; text-transform: uppercase; }
.pitch h1 span { color: var(--pink); }
.pitch-copy > p { margin: 1.75rem 0; font-size: 1rem; }
.order-button { display: inline-flex; gap: 1.5rem; align-items: center; justify-content: space-between; background: var(--pink); border: 3px outset var(--white); padding: .85rem 1rem; font-size: 1rem; color: var(--black); }
.order-button:hover { background: var(--white); border-color: var(--white); }
.order-button span { font-size: 1.4rem; }
.pitch-copy .offer-note { margin: .75rem 0 0; font-size: .875rem; }
.product-stage { display: grid; grid-template-rows: auto 1fr auto; position: relative; min-width: 0; margin: 1.5rem 1.5rem 1.5rem 0; border: 3px double var(--teal); }
.product-label { padding: .65rem 1rem; border-bottom: 1px solid var(--teal); color: var(--teal); font-size: .875rem; font-weight: 700; text-align: center; letter-spacing: .05em; }
.hero-carton { align-self: center; justify-self: center; display: block; width: 100%; height: auto; max-width: 27rem; margin: .65rem 0; image-rendering: pixelated; }
.motion-ready .hero-carton { animation: carton-bob 3s steps(3, end) infinite; }
.product-stamp { display: flex; align-items: center; gap: .5rem; position: absolute; right: -.7rem; top: 20%; padding: .75rem; background: var(--pink); color: var(--black); border: 3px outset var(--white); transform: rotate(6deg); }
.product-stamp strong { font-size: 2rem; letter-spacing: -.06em; }
.product-stamp span { font-size: .75rem; line-height: 1.2; font-weight: 700; }
.product-caption { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem; border-top: 1px solid var(--teal); font-size: .75rem; font-weight: 700; line-height: 1.5; }
.product-caption b { color: var(--pink); font-size: 1.5rem; }
.lower-third { flex-wrap: wrap; gap: .5rem 1rem; padding: .85rem 1rem; background: var(--teal); color: var(--black); border-top: 3px double var(--black); }
.lower-third strong, .lower-third > span { font-size: .875rem; }
.lower-third button { background: var(--black); color: var(--white); font-size: .75rem; padding: .3rem .5rem; }
.program-guide { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1rem; gap: .75rem; }
.program-guide a { display: flex; gap: 1rem; align-items: center; font-size: .875rem; }
.program-guide small { color: var(--teal); font-size: 1rem; }
.connection { margin-top: 4rem; scroll-margin-top: 1rem; }
.segment-title { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.segment-number { display: grid; place-items: center; flex: 0 0 3.5rem; height: 3.5rem; border: 3px outset var(--white); color: var(--pink); font-size: 1.5rem; font-weight: 700; }
.segment-title .domain { font-size: .75rem; letter-spacing: .06em; }
.segment-title h2 { scroll-margin-top: 2rem; }
.broadcast .lede { margin: 0 0 1rem; font-weight: 400; }
.broadcast .editor pre { padding: 1rem 1.5rem; font-size: .875rem; }
.broadcast .source-links { margin-top: 1.25rem; font-size: .875rem; }
.broadcast .branch { flex-wrap: wrap; justify-content: center; }
.broadcast .tour { margin-top: 3.5rem; border-top: 4px double var(--white); }
.broadcast .overview { gap: 0; }
.broadcast .program { padding: 1.25rem; }
.broadcast .program h3 { color: var(--teal); font-size: 1rem; }
.broadcast .program p { font-size: .9375rem; }
.broadcast .checkpoint-flow h3 { font-size: 1.15rem; }
.broadcast .checkpoint-flow p { font-size: .9375rem; }
.broadcast .milestone-example { margin-top: 1rem; border: 0; gap: .5rem; }
.broadcast .milestone-example span { border: 3px inset var(--white); font-size: clamp(.875rem, 2.5vw, 1.5rem); font-weight: 700; padding: 1rem .25rem; }
.broadcast .milestone-example span::before { display: none; }
.broadcast .config-note { margin-top: .75rem; }
.broadcast .milk-loop { gap: .9rem; }
.broadcast .milk-loop strong { font-size: .875rem; }
.broadcast .screens h2 { margin-bottom: 0; }
.broadcast .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.broadcast .shot { align-self: start; }
.broadcast .shot figcaption { padding: 1rem; border-top: 0; }
.broadcast .shot figcaption b { font-size: .9375rem; }
.broadcast .shot figcaption span { font-size: .875rem; }
.broadcast .shot.wide { grid-column: auto; }
.broadcast .shot.wide:has(details[open]) { grid-column: 1 / -1; }
.end-card { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 1.25rem; border: 4px outset var(--white); padding: 2rem 1rem; margin-top: 3rem; }
.end-card h2 { text-transform: uppercase; }
.broadcast .page-footer { align-items: center; font-size: .75rem; border: 0; }
.page-footer > span { margin-left: auto; }
@keyframes carton-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.paused .hero-carton { animation-play-state: paused; }
@media (max-width: 48rem), (any-pointer: coarse) {
  button, a, summary { min-width: 44px; min-height: 44px; touch-action: manipulation; }
  .station-bar nav a, .lower-third button { font-size: .875rem; }
  .station-bar nav a { display: inline-flex; align-items: center; }
  .doc-section a { display: inline-flex; align-items: center; }
}
@media (max-width: 48rem) {
  .broadcast-label span:last-child { display: none; }
  .pitch { grid-template-columns: 1fr 1fr; }
  .pitch h1 { font-size: clamp(2.75rem, 8vw, 4rem); }
  .pitch-copy { padding: 1.25rem; }
  .product-stage { margin: 1.25rem 1.25rem 1.25rem 0; }
  .product-caption { flex-direction: column; text-align: center; }
  .product-caption > b { display: none; }
  .product-stamp { top: 25%; padding: .5rem; }
  .product-stamp strong { font-size: 1.5rem; }
  .program-guide a { gap: .5rem; padding: .6rem; }
  .broadcast .milk-loop { grid-template-columns: 1fr; }
  .broadcast .milk-loop li:not(:last-child)::after { content: "↓"; top: auto; right: calc(50% - .3rem); bottom: -1.15rem; }
}
@media (max-width: 34rem) {
  .station { font-size: .75rem; gap: .25rem; }
  .station-bar { gap: .5rem; }
  .station-bar nav { flex-direction: row; }
  .station-bar nav a { padding: .4rem; }
  .station-bar nav a:last-child { display: none; }
  .pitch { grid-template-columns: 1fr; }
  .pitch h1 { font-size: clamp(3rem, 16vw, 5rem); }
  .pitch-copy > p { margin: 1.25rem 0; }
  .product-stage { margin: 0 1.25rem 1.25rem; }
  .hero-carton { max-width: 17rem; }
  .product-caption { flex-direction: row; }
  .product-stamp { top: 20%; }
  .lower-third button { margin-left: 0; }
  .broadcast .program-guide { display: flex; flex-direction: column; gap: .5rem; }
  .program-guide a { text-align: left; }
  .connection { margin-top: 2.5rem; }
  .segment-title { gap: .75rem; }
  .segment-number { flex-basis: 2.5rem; height: 2.5rem; font-size: 1.125rem; }
  .broadcast .editor pre { padding: .75rem; font-size: .875rem; }
  .editor pre { white-space: normal; }
  .editor code span { white-space: pre-wrap; margin: .75rem 0; }
  .added { position: relative; padding-left: 1.35rem; }
  .added b { position: absolute; left: .4rem; }
  .broadcast .shots { grid-template-columns: 1fr; }
  .broadcast .milestone-example { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-footer > span { margin-left: 0; }
  pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
  .added { overflow-wrap: anywhere; }
  .editor-status { flex-wrap: wrap; }
  .route { grid-template-columns: 1fr; }
  .route b { transform: rotate(90deg); }
  .branch { align-items: stretch; flex-direction: column; text-align: center; }
  .branch b { transform: none; }
  .programs,
  .checkpoint-flow,
  .milk-path,
  .milk-loop,
  .shots { grid-template-columns: 1fr; }
  .milk-loop li:not(:last-child)::after { content: "↓"; top: auto; right: calc(50% - .3rem); bottom: -1.15rem; }
  .checkpoint-flow > div { border-right: 0; border-bottom: 1px solid var(--white); }
  .shot.wide { grid-column: auto; }
  .milk-path span { border-right: 0; border-bottom: 1px solid var(--white); }
  .milk-path span:last-child { border-bottom: 0; }
  .terms { grid-template-columns: 1fr; }
  .terms dd { margin-bottom: .75rem; }
  nav { align-items: stretch; flex-direction: column; }
  a { text-align: center; }
}
