/*
 * GuestLens documentation: content styles (figures, callouts, steps, diagrams,
 * the lightbox). Shared by the offline guide and the online docs at
 * the online docs, so it uses literal colors, never page variables.
 */
main .callout.warn {
  border-inline-start-color: #d4962e;
  background: #fbf0da;
  color: #6b460e;
}
main .callout.info {
  border-inline-start-color: #3b82f6;
  background: #eff6ff;
  color: #1e3a8a;
}
main figure.shot,
main figure.diagram {
  margin: 22px 0;
}
main figure.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #eae3d9;
  border-radius: 10px;
  box-shadow: 0 8px 24px -16px rgba(36, 28, 53, 0.35);
  background: #fff;
  cursor: zoom-in;
}
main figure.shot.narrow {
  max-width: 640px;
}
main figure.shot.tall {
  max-width: 460px;
}
main figure figcaption {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #756e85;
}
/* A screenshot with an SVG layer of numbered callouts on top. */
:is(main, .lightbox) .annot {
  position: relative;
}
:is(main, .lightbox) .annot > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
:is(main, .lightbox) .annot .hl {
  fill: rgba(36, 89, 214, 0.05);
  stroke: #2459d6;
  stroke-width: 4;
}
:is(main, .lightbox) .annot .pin circle,
:is(main, .lightbox) .diagram .pin circle {
  fill: #2459d6;
  stroke: #fff;
  stroke-width: 3;
}
:is(main, .lightbox) .annot .pin text,
:is(main, .lightbox) .diagram .pin text {
  fill: #fff;
  font-weight: 700;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  text-anchor: middle;
  dominant-baseline: central;
}
main ol.legend {
  list-style: none;
  counter-reset: pin;
  margin: 12px 0 20px;
  padding: 0;
}
main ol.legend > li {
  counter-increment: pin;
  position: relative;
  margin: 8px 0;
  padding-inline-start: 36px;
}
main ol.legend > li::before {
  content: counter(pin);
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #2459d6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 25px;
  text-align: center;
}
main .diagram svg {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid #eae3d9;
  border-radius: 10px;
}
main .diagram text {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
main .phones {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}
main .phones figure.shot {
  margin: 0;
}
main .pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
main .step {
  position: relative;
  margin: 26px 0 0;
  padding-inline-start: 50px;
}
main .step > .num {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #c9573a;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 34px;
  text-align: center;
}
main .step > h2 {
  margin: 3px 0 8px;
}
main .trouble {
  margin: 18px 0;
  padding: 4px 18px 8px;
  border: 1px solid #f1c9c2;
  border-inline-start: 4px solid #a93226;
  border-radius: 8px;
  background: #fdf4f2;
}
main .trouble > h2 {
  margin: 12px 0 6px;
  font-size: 17px;
}
main .trouble pre {
  font-size: 12.5px;
  white-space: pre-wrap;
  word-break: break-word;
}
main .paths {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
main .paths > div {
  min-width: 0;
  border: 1px solid #eae3d9;
  border-radius: 10px;
  padding: 4px 18px 10px;
  background: #ffffff;
}
main .paths h3 {
  margin: 12px 0 4px;
  font-size: 16px;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2vh 2vw;
  background: rgba(36, 28, 53, 0.86);
  cursor: zoom-out;
}
.lightbox.open {
  display: flex;
}
.lightbox > * {
  flex: none;
  max-width: none;
}
.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
main :not(pre) > code,
main a {
  overflow-wrap: anywhere;
}
@media (max-width: 860px) {
  main table {
    display: block;
    overflow-x: auto;
  }
  main .phones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  main .pair,
  main .paths {
    grid-template-columns: minmax(0, 1fr);
  }
  main .step {
    padding-inline-start: 0;
  }
  main .step > .num {
    position: static;
    display: inline-block;
    margin-bottom: 4px;
  }
}

/* The three "where to go next" cards on the home page. */
main .cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
main .cards a {
  display: block;
  padding: 16px 18px;
  border: 1px solid #eae3d9;
  border-radius: 12px;
  background: #fff;
  color: #5a5168;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
main .cards a:hover {
  border-color: #c9573a;
  box-shadow: 0 8px 24px -14px rgba(36, 28, 53, 0.3);
}
main .cards strong {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  color: #a8432a;
}
main .cards span {
  display: block;
  font-size: 14.5px;
  line-height: 1.5;
}
/* Code blocks get a Copy button (added by docs.js). */
main .code-wrap {
  position: relative;
  margin: 18px 0;
}
main .code-wrap > pre {
  margin: 0;
}
main .code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  background: rgba(36, 28, 53, 0.75);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  color: #eae3d9;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    background-color 0.15s ease;
}
main .code-wrap:hover .code-copy,
main .code-copy:focus-visible,
main .code-copy.done {
  opacity: 1;
}
main .code-copy:hover {
  background: #a8432a;
}
main .code-copy.done {
  border-color: #c9573a;
  background: #c9573a;
  color: #fff;
}
@media (hover: none) {
  main .code-copy {
    opacity: 1;
  }
}
@media (max-width: 860px) {
  main .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── GuestLens additions ─────────────────────────────────── */

/* Screenshots are centered when they are narrower than the text. */
main figure.shot {
  margin-inline: auto;
}
main figure.shot .annot,
main figure.shot > img {
  width: 100%;
}

/* A phone screenshot with its legend beside it. */
main .phone-row {
  display: grid;
  grid-template-columns: minmax(0, 330px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin: 22px 0;
}
main .phone-row > figure.shot {
  margin: 0;
}
main .phone-row > ol.legend,
main .phone-row > div > :first-child {
  margin-top: 0;
}
main figure.shot.phone img {
  border-radius: 22px;
}

/* The eight event themes. */
main .phones figure.shot img {
  border-radius: 16px;
}
main .phones figcaption {
  text-align: center;
  font-weight: 600;
  color: #3d3450;
}

/* A row of steps joined by arrows, for "how it works" pictures. */
main .flow {
  display: grid;
  grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
  padding: 0;
  list-style: none;
  counter-reset: flow;
}
main .flow > li {
  position: relative;
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid #eae3d9;
  border-radius: 12px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.5;
  counter-increment: flow;
}
main .flow > li::before {
  content: counter(flow);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: #241c35;
  color: #faf7f2;
  font-size: 13px;
  font-weight: 700;
}
main .flow > li strong {
  display: block;
  margin-bottom: 4px;
}
main .flow > li:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  inset-inline-end: -11px;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-top: 2px solid #c9573a;
  border-inline-end: 2px solid #c9573a;
  transform: rotate(45deg);
}

/* The three kinds of people. */
main .people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0;
}
main .people > div {
  padding: 16px 18px;
  border: 1px solid #eae3d9;
  border-radius: 12px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.55;
}
main .people h3 {
  margin: 0 0 2px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 19px;
}
main .people code {
  display: inline-block;
  margin-bottom: 8px;
}

/* A checklist with real boxes, for the "first hour" page. */
main ul.checklist {
  list-style: none;
  padding: 0;
}
main ul.checklist > li {
  position: relative;
  padding-inline-start: 32px;
}
main ul.checklist > li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 4px;
  width: 18px;
  height: 18px;
  border: 2px solid #c9573a;
  border-radius: 5px;
  background: #fff;
}

@media (max-width: 860px) {
  main .phone-row,
  main .people {
    grid-template-columns: minmax(0, 1fr);
  }
  main .phone-row > figure.shot {
    max-width: 330px !important;
  }
  main .flow {
    grid-template-columns: minmax(0, 1fr);
  }
  main .flow > li:not(:last-child)::after {
    top: auto;
    bottom: -11px;
    inset-inline-end: 50%;
    transform: rotate(135deg);
  }
}

/* An annotated screenshot opened large keeps its numbered boxes. */
.lightbox .annot {
  flex: none;
}
.lightbox .annot img {
  border-radius: 8px;
}
