/* tryhooka.xyz. Deep-ink palette, one signal color, two typefaces. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/assets/fonts/bricolage-grotesque-latin.85f55a58a3.woff2) format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url(/assets/fonts/ibm-plex-mono-400-latin.c36f509c0a.woff2) format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url(/assets/fonts/ibm-plex-mono-500-latin.a76f53ca66.woff2) format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #0d1321;
  --ink-2: #121a2b;
  --ink-3: #1a2438;
  --ink-deep: #0a0f1a;
  --line: #27334b;
  --line-soft: #1d2739;
  --fog: #94a1b8;
  --mist: #c3cbda;
  --paper: #edf0f5;
  --signal: #ff6b35;
  --signal-hover: #ff8455;
  --signal-soft: rgb(255 107 53 / 0.13);
  --peach: #f7c6a6;

  --sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: 16px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 650;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-color: rgb(255 107 53 / 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: var(--signal);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 6px;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 0.08em 0.36em;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgb(237 240 245 / 0.05);
  color: var(--paper);
  overflow-wrap: anywhere;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1200px);
  margin-inline: auto;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 600 1rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button-primary {
  background: var(--signal);
  color: var(--ink);
}

.button-primary:hover {
  background: var(--signal-hover);
}

.button-ghost {
  border-color: var(--line);
  color: var(--paper);
}

.button-ghost:hover {
  border-color: var(--fog);
  background: var(--ink-2);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9375rem;
}

/* Header */

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  flex: none;
  color: var(--paper);
  border-radius: 8px;
}

.brand-logo {
  height: 24px;
  width: calc(24px * 4.8222);
}

.site-nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--mist);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--paper);
  background: rgb(237 240 245 / 0.05);
}

.nav-optional {
  display: none;
}

/* Hero */

.hero {
  padding-block: 40px 56px;
}

.hero-grid {
  display: grid;
  gap: 48px;
}

.hero h1 {
  font-size: clamp(2.5rem, 1.35rem + 4.6vw, 4.75rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.028em;
  max-width: 12ch;
}

.lede {
  margin-top: 24px;
  max-width: 36rem;
  color: var(--mist);
  font-size: 1.125rem;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.actions .button {
  flex: 1 1 100%;
}

.source-note {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 22px;
  color: var(--fog);
  font-size: 0.9375rem;
}

.soon-dot {
  flex: none;
  align-self: flex-start;
  margin-top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

/* Hero figure: one publish, fanned out along a rail */

.dispatch {
  --rail: 19px;
  --branch: 22px;
  position: relative;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: var(--ink-2);
  background-image: radial-gradient(circle at 1px 1px, rgb(237 240 245 / 0.07) 1px, transparent 1.5px);
  background-size: 18px 18px;
  min-width: 0;
}

.dispatch-request {
  position: relative;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--ink);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.dispatch-call {
  color: var(--paper);
  padding-right: 96px;
}

.dispatch-verb {
  color: var(--signal);
  font-weight: 500;
}

.dispatch-body {
  margin-top: 4px;
  color: var(--peach);
  overflow-wrap: break-word;
}

.dispatch-replay {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-2);
  color: var(--mist);
  font: 500 0.8125rem/1.4 var(--sans);
  cursor: pointer;
}

.dispatch-replay:hover {
  color: var(--paper);
  border-color: var(--fog);
}

.dispatch-topic {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 26px;
}

.dispatch-topic::before {
  content: "";
  position: absolute;
  left: calc(var(--rail) - 1px);
  bottom: calc(100% - 2px);
  width: 2px;
  height: 28px;
  background: var(--signal);
  transform-origin: top;
}

.dispatch-node {
  flex: none;
  width: 14px;
  height: 14px;
  margin-left: calc(var(--rail) - 7px);
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 5px var(--signal-soft);
}

.dispatch-topic-name {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.9375rem;
}

.dispatch-stored {
  color: var(--fog);
  font-size: 0.875rem;
}

.dispatch-routes {
  position: relative;
  margin: 0;
  padding: 16px 0 0 calc(var(--rail) + var(--branch));
  list-style: none;
}

.dispatch-routes::before,
.route::before,
.route::after {
  content: "";
  position: absolute;
  background: var(--signal);
}

/* The rail: from the topic node down to the last branch. */
.dispatch-routes::before {
  left: calc(var(--rail) - 1px);
  top: 0;
  width: 2px;
  height: 16px;
  transform-origin: top;
}

.route {
  position: relative;
  padding-bottom: 12px;
}

.route:last-child {
  padding-bottom: 4px;
}

.route::after {
  left: calc(-1 * var(--branch) - 1px);
  top: 0;
  bottom: 0;
  width: 2px;
  transform-origin: top;
}

.route:last-child::after {
  bottom: auto;
  height: 21px;
}

.route::before {
  left: calc(-1 * var(--branch));
  top: 19px;
  width: calc(var(--branch) - 6px);
  height: 2px;
  transform-origin: left;
}

.route-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 2px 12px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
}

.route-chat .route-head {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.route-kind {
  font-size: 0.9375rem;
  font-weight: 600;
}

.route-target {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  color: var(--fog);
  font-family: var(--mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}

.route-status {
  grid-column: 2;
  grid-row: 1;
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
}

.route-sent {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.route-sent::before {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}

.route-body {
  display: grid;
  gap: 6px;
  padding: 10px 12px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--ink);
}

.bubble {
  display: grid;
  gap: 1px;
  max-width: 21rem;
  padding: 10px 14px 7px;
  border-radius: 14px 14px 14px 4px;
  background: #1e2a42;
  color: var(--paper);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.bubble-title {
  font-weight: 650;
}

.bubble-text b {
  font-weight: 650;
}

.bubble-tags {
  color: #9cc1ff;
  font-size: 0.875rem;
}

.bubble-time {
  justify-self: end;
  color: var(--fog);
  font-size: 0.6875rem;
}

.dispatch-ledger {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--mist);
  font-size: 0.8125rem;
}

.dispatch-ledger code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--mist);
  font-size: 1em;
}

@media (prefers-reduced-motion: no-preference) {
  .dispatch.is-live .dispatch-topic::before {
    animation: grow-y 0.3s 0.25s ease-out both;
  }

  .dispatch.is-live .dispatch-node {
    animation: ping 0.9s 0.5s ease-out both;
  }

  .dispatch.is-live .dispatch-routes::before {
    animation: grow-y 0.15s 0.7s linear both;
  }

  .dispatch.is-live .route::after {
    animation: grow-y 0.25s linear both;
  }

  .dispatch.is-live .route::before {
    animation: grow-x 0.18s ease-out both;
  }

  .dispatch.is-live .route-sent {
    animation: fade-in 0.3s ease-out both;
  }

  .dispatch.is-live .route-chat .route-body {
    animation: drop-in 0.35s ease-out both;
  }

  .dispatch.is-live .dispatch-ledger code {
    animation: fade-in 0.4s 1.9s ease-out both;
  }

  .dispatch.is-live .route:nth-child(1)::after { animation-delay: 0.85s; }
  .dispatch.is-live .route:nth-child(1)::before { animation-delay: 0.95s; }
  .dispatch.is-live .route:nth-child(1) .route-body { animation-delay: 1.05s; }
  .dispatch.is-live .route:nth-child(1) .route-sent { animation-delay: 1.2s; }
  .dispatch.is-live .route:nth-child(2)::after { animation-delay: 1.1s; }
  .dispatch.is-live .route:nth-child(2)::before { animation-delay: 1.3s; }
  .dispatch.is-live .route:nth-child(2) .route-sent { animation-delay: 1.45s; }
  .dispatch.is-live .route:nth-child(3)::after { animation-delay: 1.35s; }
  .dispatch.is-live .route:nth-child(3)::before { animation-delay: 1.5s; }
  .dispatch.is-live .route:nth-child(3) .route-sent { animation-delay: 1.65s; }
}

@keyframes grow-y {
  from {
    transform: scaleY(0);
  }
}

@keyframes grow-x {
  from {
    transform: scaleX(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes ping {
  0% {
    transform: scale(0.6);
    box-shadow: 0 0 0 0 rgb(255 107 53 / 0.6);
  }
  40% {
    transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 5px var(--signal-soft);
  }
}

/* Demo video: fixed 16:9 frame, so a missing or late file never shifts layout. */

.demo {
  padding-bottom: 24px;
}

.demo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
}

.demo-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-controls {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 8px;
}

.demo-toggle,
.demo-sound {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(13 19 33 / 0.86);
  color: var(--paper);
  font: 600 0.875rem/1 var(--sans);
  cursor: pointer;
}

.demo-toggle:hover,
.demo-sound:hover {
  border-color: var(--fog);
}

/* Speaker icon (muted or with waves); the words show from 640px up, and the
   button keeps its aria-label at every width. */
.demo-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 36px;
  padding: 0 9px;
}

.demo-sound[hidden] {
  display: none;
}

.demo-sound-icon {
  flex: none;
}

.demo-sound .sound-waves,
.demo-sound.is-on .sound-muted {
  display: none;
}

.demo-sound.is-on .sound-waves {
  display: inline;
}

.demo-sound-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.demo-sound.is-on {
  border-color: var(--signal);
}

@media (min-width: 640px) {
  .demo-sound {
    padding: 0 14px 0 11px;
  }

  .demo-sound-text {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
  }
}

/* Try it in 10 seconds: QR code, steps on the signal rail, one button.
   /try reuses .steps, .qr, and the when-* swaps at projector scale (try.css). */

.button-try {
  gap: 10px;
}

.live-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-soft);
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot {
    animation: live-pulse 2.4s ease-out infinite;
  }
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(255 107 53 / 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 8px rgb(255 107 53 / 0);
  }
}

.when-wide {
  display: none;
}

.nowrap {
  white-space: nowrap;
}

.try-section {
  padding-block: 40px 16px;
}

.try-band {
  display: grid;
  gap: 32px;
  padding: 28px 22px;
  border: 1px solid rgb(255 107 53 / 0.55);
  border-radius: var(--radius-lg);
  background-color: var(--ink-2);
  background-image: radial-gradient(circle at 1px 1px, rgb(237 240 245 / 0.06) 1px, transparent 1.5px);
  background-size: 18px 18px;
}

.try-band h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.3vw, 2.75rem);
  font-weight: 680;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.try-band-lede {
  margin-top: 12px;
  color: var(--mist);
  font-size: 1.125rem;
}

.try-band .steps {
  margin-top: 28px;
}

.try-band-actions {
  margin-top: 28px;
}

.try-band-qr {
  display: none;
  margin: 0;
}

.qr {
  display: block;
  background: #fff;
  border-radius: 12px;
}

.try-band-qr .qr {
  /* A whole number of pixels per module (41 with the quiet zone) keeps it crisp. */
  width: 246px;
  height: 246px;
}

.try-band-qr figcaption {
  margin-top: 12px;
  color: var(--mist);
  font-size: 0.9375rem;
  text-align: center;
}

.steps {
  --n: 34px;
  --step-gap: 20px;
  display: grid;
  gap: var(--step-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: var(--n) minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 14px;
}

/* The rail between numbers, as on the hero figure. */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(var(--n) / 2 - 1px);
  top: calc(var(--n) + 6px);
  bottom: calc(6px - var(--step-gap));
  width: 2px;
  border-radius: 1px;
  background: rgb(255 107 53 / 0.5);
}

.step-n {
  display: grid;
  place-items: center;
  width: var(--n);
  height: var(--n);
  border-radius: 50%;
  background: var(--signal);
  color: var(--ink);
  font-size: calc(var(--n) * 0.5);
  font-weight: 700;
  line-height: 1;
}

.step-title {
  display: block;
  margin-top: calc(var(--n) / 2 - 0.65em);
  font-size: 1.1875rem;
  font-weight: 640;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.step-text {
  display: block;
  margin-top: 2px;
  color: var(--mist);
}

/* Sections */

.section {
  padding-block: 64px;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 40px;
}

.section h2 {
  font-size: clamp(1.875rem, 1.3rem + 2.3vw, 3rem);
  font-weight: 680;
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.section-head p,
.publish-copy > p {
  margin-top: 16px;
  color: var(--mist);
  font-size: 1.125rem;
}

/* Publish */

.publish-grid {
  display: grid;
  gap: 36px;
}

.checklist {
  display: grid;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 26px;
  color: var(--mist);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 14px;
  height: 2px;
  background: var(--signal);
}

.code-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.code-block {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--ink-deep);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 6px 8px 6px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.code-label {
  color: var(--fog);
  font-size: 0.875rem;
  font-weight: 500;
}

.copy {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--mist);
  font: 500 0.8125rem/1 var(--sans);
  cursor: pointer;
}

.copy:hover {
  color: var(--paper);
  border-color: var(--fog);
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  tab-size: 2;
}

pre:focus-visible {
  outline-offset: -2px;
  border-radius: 0;
}

pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 1em;
  overflow-wrap: normal;
}

.t-cmd {
  color: var(--paper);
  font-weight: 500;
}

.t-flag,
.t-comment {
  color: var(--fog);
}

.t-str {
  color: var(--peach);
}

.t-key {
  color: #a9badb;
}

.t-lit {
  color: #ff9a73;
}

.code-note {
  color: var(--fog);
  font-size: 0.875rem;
}

/* Features */

.feature-group {
  display: grid;
  gap: 18px 48px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
}

.feature-group:last-child {
  padding-bottom: 0;
}

.feature-group-title {
  color: var(--signal);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.feature-list {
  display: grid;
  gap: 24px 40px;
  margin: 0;
}

.feature dt {
  margin-bottom: 6px;
  font-size: 1.125rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.feature dd {
  margin: 0;
  color: var(--mist);
}

/* Use cases */

.case-grid {
  display: grid;
  gap: 20px;
}

.case {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
}

.case-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 236px;
  margin-bottom: 22px;
  padding: 22px 18px;
  border-radius: var(--radius-md);
  background-color: var(--ink-deep);
  background-image: radial-gradient(circle at 1px 1px, rgb(237 240 245 / 0.06) 1px, transparent 1.5px);
  background-size: 18px 18px;
}

.case h3,
.case > p {
  padding-inline: 8px;
}

.case h3 {
  font-size: 1.375rem;
  letter-spacing: -0.015em;
}

.case > p {
  margin-top: 10px;
  color: var(--mist);
}

.chat {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 22rem;
}

.chat-where {
  color: var(--fog);
  font-size: 0.75rem;
  font-weight: 500;
}

.chat-buttons {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 6px;
}

.chat-button {
  padding: 8px;
  border-radius: 10px;
  background: rgb(237 240 245 / 0.08);
  color: var(--paper);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.chat-button:first-child:last-child {
  grid-column: span 2;
}

.chat-trace {
  margin-top: 6px;
  color: var(--fog);
  font-size: 0.75rem;
}

.chat-trace code {
  color: var(--peach);
}

.form-mock {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 20rem;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--ink-2);
}

.form-mock-title {
  margin-bottom: 6px;
  font-size: 1.0625rem;
  font-weight: 650;
}

.form-mock-label {
  margin-top: 4px;
  color: var(--mist);
  font-size: 0.8125rem;
  font-weight: 500;
}

.form-mock-input {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink-deep);
  color: var(--paper);
  font-size: 0.875rem;
}

.form-mock-area {
  min-height: 56px;
}

.form-mock-submit {
  justify-self: start;
  margin-top: 8px;
  padding: 7px 16px;
  border-radius: 8px;
  background: var(--signal);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}

/* Hosted vs self-host */

.run-stack {
  display: grid;
  gap: 20px;
}

.run-option {
  display: grid;
  gap: 28px;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--ink-2);
}

.run-hosted {
  border-color: rgb(255 107 53 / 0.55);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--signal-soft);
  color: var(--signal);
  font-size: 0.875rem;
  font-weight: 600;
}

.status-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-chip-quiet {
  background: rgb(237 240 245 / 0.06);
  color: var(--mist);
}

.status-chip-quiet::before {
  content: none;
}

.run-copy h3 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
}

.run-copy h3 + p {
  margin-top: 12px;
  max-width: 32rem;
  color: var(--mist);
}

.run-action {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.run-fineprint {
  max-width: 24rem;
  color: var(--fog);
  font-size: 0.9375rem;
}

.self-paths {
  display: grid;
  min-width: 0;
}

.self-path {
  min-width: 0;
}

.self-path + .self-path {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.self-path h4 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 620;
}

.self-path p {
  margin-top: 6px;
  color: var(--fog);
}

.self-path p:not(:last-child) {
  margin-bottom: 14px;
}

.self-path h4 + .code-block {
  margin-top: 12px;
}

.tag {
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mist);
  font-size: 0.8125rem;
  font-weight: 500;
}

.code-block-compact pre {
  font-size: 0.78rem;
}

/* Footer */

.site-footer {
  margin-top: 32px;
  padding-block: 40px 48px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

.footer-brand p {
  max-width: 26rem;
  margin-top: 14px;
  color: var(--fog);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--mist);
}

.footer-nav a:hover {
  color: var(--paper);
}

.footer-soon {
  color: var(--fog);
}

.footer-legal {
  color: var(--fog);
  font-size: 0.875rem;
}

/* 404 */

.not-found {
  padding-block: 72px 96px;
}

.not-found h1 {
  max-width: 14ch;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.028em;
}

.not-found .lede {
  margin-top: 20px;
}

/* Larger screens */

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }

  .brand-logo {
    height: 28px;
    width: calc(28px * 4.8222);
  }

  .dispatch {
    --rail: 21px;
    --branch: 26px;
    padding: 22px;
  }

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

  .route-target {
    grid-column: 2;
    grid-row: 1;
  }

  .route-status {
    grid-column: 3;
  }

  .feature-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case {
    padding: 16px 16px 28px;
  }

  .case h3,
  .case > p {
    padding-inline: 12px;
  }

  .run-option {
    padding: 32px;
  }

  .actions .button {
    flex: 0 0 auto;
  }

  .try-band {
    padding: 32px;
  }
}

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
  }

  .site-header-inner {
    gap: 24px;
    min-height: 80px;
  }

  .nav-optional {
    display: block;
  }

  .site-nav ul {
    gap: 4px;
  }

  .site-nav a {
    padding: 8px 12px;
  }

  .section {
    padding-block: 104px;
  }

  .section-head {
    margin-bottom: 56px;
  }

  .try-section {
    padding-block: 56px 8px;
  }

  /* The QR code joins the band once there is room for it beside the copy. */
  .try-band {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 56px;
    padding: 40px 48px;
  }

  .try-band-qr {
    display: block;
  }

  .try-band .when-wide {
    display: block;
  }

  .try-band .when-narrow {
    display: none;
  }

  .feature-group {
    grid-template-columns: 200px minmax(0, 1fr);
    padding-block: 40px;
  }

  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .case-art {
    height: 320px;
  }

  .run-option {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    padding: 40px;
  }

  .run-hosted {
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .footer-legal {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1080px) {
  .hero {
    padding-block: 72px 88px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 64px;
  }

  .publish-grid {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    align-items: start;
    gap: 64px;
  }

  .publish-copy {
    position: sticky;
    top: 32px;
  }

  .steps-row {
    --step-gap: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps-row .step {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .steps-row .step-title {
    margin-top: 0;
  }

  .steps-row .step:not(:last-child)::before {
    left: calc(var(--n) + 10px);
    right: calc(10px - var(--step-gap));
    top: calc(var(--n) / 2 - 1px);
    bottom: auto;
    width: auto;
    height: 2px;
  }
}
