/* How it works loop: "from a PDF of chores to a playbook your AI works from". It sits in the How it works section of the offer page.
   The stage is drawn on a 360 x 450 canvas and scaled to the stage width by hero-demo.js,
   so every size here is a size on that canvas. No transitions: the script draws every frame. */

.demo-stage-col {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.hd-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  contain: layout paint;
}
.hd-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  pointer-events: none;
  z-index: 50;
}
.hd-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 360px;
  height: 450px;
  transform-origin: 0 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #0F0F0F;
}
.hd-canvas * {
  box-sizing: border-box;
  margin: 0;
}
.hd-canvas .hd-a {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
}
.hd-scene {
  position: absolute;
  left: 0;
  top: 0;
  width: 360px;
  height: 450px;
}

/* Pick your AI */
.hd-pick {
  width: 360px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 24px;
  height: 24px;
}
.hd-tile {
  width: 86px;
  height: 86px;
}
.hd-tilebox {
  position: absolute;
  inset: 0;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(15, 15, 15, 0.1);
}
.hd-tname {
  position: absolute;
  left: 0;
  width: 86px;
  top: 55px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  line-height: 18px;
  white-space: nowrap;
}
.hd-logo {
  z-index: 20;
  display: block;
  max-width: none;
  pointer-events: none;
}

/* Chat header */
.hd-header {
  width: 360px;
  height: 45px;
  background: #fff;
  border-bottom: 1px solid #E0E0E0;
  z-index: 6;
}
.hd-header-name {
  z-index: 8;
  position: absolute;
  left: 42px;
  top: 12px;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
}
.hd-headerline {
  width: 360px;
  height: 1px;
  background: #E0E0E0;
  transform-origin: 0 0;
  z-index: 7;
}
.hd-fade {
  width: 360px;
  height: 16px;
  background: linear-gradient(#fff, rgba(255, 255, 255, 0));
  z-index: 5;
}
.hd-chatview {
  position: absolute;
  left: 0;
  top: 0;
  width: 360px;
  height: 450px;
  clip-path: inset(44px 0 70px 0);
}

/* Messages */
.hd-bubble {
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 20px;
}
.hd-ai {
  background: #F2F2F2;
  color: #0F0F0F;
  max-width: 276px;
  border-bottom-left-radius: 6px;
}
.hd-user {
  background: #0F0F0F;
  color: #fff;
  border-bottom-right-radius: 6px;
}
.hd-word {
  display: inline;
}
.hd-ai b {
  font-weight: 700;
}
.hd-line {
  display: block;
}
.hd-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 16px;
  border-bottom-left-radius: 6px;
  background: #F2F2F2;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.hd-dots {
  display: inline-flex;
  gap: 4px;
}
.hd-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #606060;
  display: block;
}

/* Chips */
.hd-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px 0 10px;
  border-radius: 15px;
  background: #F2F2F2;
  border: 1px solid #E0E0E0;
  color: #0F0F0F;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 16px;
  white-space: nowrap;
  z-index: 3;
}
.hd-docicon {
  position: relative;
  width: 11px;
  height: 14px;
  border: 1.5px solid #0F0F0F;
  border-radius: 2px;
  flex: none;
}
.hd-docicon::after {
  content: "";
  position: absolute;
  left: 1.5px;
  right: 1.5px;
  top: 3px;
  height: 1.5px;
  background: #0F0F0F;
  box-shadow: 0 3px 0 #0F0F0F;
}
.hd-status {
  position: relative;
  width: 14px;
  height: 14px;
  flex: none;
}
.hd-spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #CFCFCF;
  border-top-color: #606060;
}
.hd-check {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #1e8e5a;
}
.hd-check::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 2.5px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

/* Input box */
.hd-box {
  width: 320px;
  background: #fff;
  border: 1.5px solid #CFCFCF;
  border-radius: 16px;
}
/* the drop state: accent border on the box (fades with the zone) */
.hd-canvas .hd-boxacc {
  position: absolute;
  left: -1.5px;
  top: -1.5px;
  right: -1.5px;
  bottom: -1.5px;
  border: 2px solid #0F0F0F;
  border-radius: 16px;
  pointer-events: none;
}
/* the drop zone over the whole chat area, with its words in the empty space above the input box */
.hd-canvas .hd-zone {
  width: 336px;
  height: 381px;
  border: 2px dashed #0F0F0F;
  border-radius: 14px;
  background: #F2F2F2;
}
.hd-zone-label {
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 16px;
  line-height: 20px;
  font-weight: 700;
  color: #0F0F0F;
}
.hd-ph {
  position: absolute;
  left: 14px;
  top: 0;
  font-size: 14px;
  line-height: 20px;
  color: #606060;
  white-space: nowrap;
}
.hd-send {
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0F0F0F;
}
.hd-send::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 10px;
  width: 8px;
  height: 8px;
  border: solid #fff;
  border-width: 2px 0 0 2px;
  transform: rotate(45deg);
}
.hd-send::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 10px;
  width: 2px;
  height: 13px;
  background: #fff;
}

/* Chapter 1: the traditional PDF guide */
.hd-canvas .hd-pdfgroup {
  width: 360px;
  height: 450px;
}
.hd-canvas .hd-sheet {
  position: absolute;
  left: 80px;
  top: 40px;
  width: 200px;
  height: 250px;
  background: #fff;
  border: 1px solid #E0E0E0;
  box-shadow: 0 6px 18px rgba(15, 15, 15, 0.12);
}
.hd-canvas .hd-sheet-l {
  transform: rotate(-4deg);
}
.hd-canvas .hd-sheet-r {
  transform: rotate(3deg);
}
.hd-canvas .hd-pdfbadge {
  position: absolute;
  left: 232px;
  top: 52px;
  width: 36px;
  height: 20px;
  border-radius: 4px;
  background: #c62828;
  color: #fff;
  text-align: center;
  font-size: 12.5px;
  line-height: 20px;
  font-weight: 700;
}
.hd-canvas .hd-pdftitle {
  position: absolute;
  left: 96px;
  top: 80px;
  width: 168px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 700;
  color: #0F0F0F;
}
.hd-canvas .hd-rsvg {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  overflow: visible;
}
.hd-canvas .hd-chore {
  position: absolute;
  left: 94px;
  width: 180px;
  height: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  /* a fixed, narrow face: the lines must fit inside the sheet whatever the device's own font is */
  font-family: Arial, "Liberation Sans", Helvetica, sans-serif;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  color: #0F0F0F;
}
.hd-canvas .hd-cbox {
  flex: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid #606060;
  border-radius: 2px;
}
.hd-canvas .hd-redcap {
  position: absolute;
  left: 30px;
  top: 316px;
  width: 300px;
  text-align: center;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  color: #c62828;
}
.hd-canvas .hd-redcap span {
  display: block;
  width: fit-content;
  margin: 0 auto;
}

/* Chapter 1: the AI playbook folder, its callouts and the zip file */
.hd-canvas .hd-folder {
  width: 312px;
  height: 270px;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 15, 15, 0.1);
  overflow: hidden;
}
.hd-canvas .hd-fhead {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #F2F2F2;
}
.hd-canvas .hd-ficon {
  position: relative;
  flex: none;
  width: 18px;
  height: 13px;
  margin-top: 3px;
  border-radius: 2px;
  background: #0F0F0F;
}
.hd-canvas .hd-ficon::before {
  content: "";
  position: absolute;
  left: 0;
  top: -3px;
  width: 8px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #0F0F0F;
}
.hd-canvas .hd-ftitle {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.hd-canvas .hd-frow {
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
  font-size: 13px;
  line-height: 28px;
  white-space: nowrap;
}
.hd-canvas .hd-ri {
  flex: none;
  display: block;
}
.hd-canvas .hd-ri-doc {
  width: 11px;
  height: 14px;
  border: 1.5px solid #606060;
  border-radius: 2px;
}
.hd-canvas .hd-ri-folder {
  width: 15px;
  height: 11px;
  border: 1.5px solid #0F0F0F;
  border-radius: 2px;
  background: #F2F2F2;
}
.hd-canvas .hd-callcap {
  width: max-content;
  max-width: 300px;
  text-align: center;
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
  color: #1e8e5a;
}
.hd-canvas .hd-arrow {
  width: 360px;
  height: 450px;
  pointer-events: none;
}
.hd-canvas .hd-arrow svg {
  display: block;
  overflow: visible;
}
.hd-canvas .hd-zip {
  z-index: 14;
  width: 54px;
  height: 68px;
  background: #fff;
  border: 1px solid #CFCFCF;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 15, 15, 0.18);
  overflow: hidden;
}
.hd-canvas .hd-zip.hd-held {
  box-shadow: 0 8px 18px rgba(15, 15, 15, 0.3);
}
.hd-zip .band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14px;
  background: #0F0F0F;
}
.hd-zip .fold {
  position: absolute;
  right: 0;
  top: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(225deg, #fff 50%, #E0E0E0 50%);
}
.hd-zip .zipper {
  position: absolute;
  left: 22px;
  top: 14px;
  width: 8px;
  height: 36px;
  background: repeating-linear-gradient(#606060 0, #606060 3px, #E0E0E0 3px, #E0E0E0 6px);
  border-radius: 1px;
}
.hd-zip .ziptag {
  position: absolute;
  left: 9px;
  bottom: 3px;
  width: 34px;
  height: 16px;
  border-radius: 3px;
  background: #0F0F0F;
  color: #fff;
  text-align: center;
  font-size: 12.5px;
  line-height: 16px;
  font-weight: 700;
}
.hd-canvas .hd-zipname {
  z-index: 14;
  width: 200px;
  text-align: center;
  font-size: 12.5px;
  line-height: 15px;
  font-weight: 700;
  color: #0F0F0F;
}

/* Option buttons */
.hd-card {
  background: #F8F8F8;
  border: 1px solid #E0E0E0;
  border-radius: 14px;
  padding: 8px;
}
.hd-optbtn {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 34px 0 14px;
  border: 1px solid #E0E0E0;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
.hd-optbtn + .hd-optbtn {
  margin-top: 4px;
}
.hd-optbtn::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 14px;
  width: 8px;
  height: 8px;
  border: solid #606060;
  border-width: 2px 2px 0 0;
  transform: rotate(45deg);
}
.hd-optbtn.hd-hover {
  border-color: #0F0F0F;
  background: #F2F2F2;
}
.hd-optbtn.hd-hover::after {
  border-color: #0F0F0F;
}

/* Topic list */
.hd-list {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 14px;
  padding: 8px 0;
  overflow: hidden;
}
.hd-listclip {
  position: relative;
  overflow: hidden;
}
.hd-row {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 24px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 24px;
  white-space: nowrap;
}
.hd-row .num {
  flex: none;
  min-width: 20px;
  color: #0F0F0F;
  font-weight: 700;
}
.hd-row.hd-hover {
  background: #F2F2F2;
}
.hd-row.hd-picked {
  background: #F2F2F2;
  box-shadow: inset 3px 0 0 #0F0F0F;
}
.hd-row .tick {
  display: none;
  position: absolute;
  right: 12px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e8e5a;
}
.hd-row.hd-picked .tick {
  display: block;
}
.hd-row .tick::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 2.5px;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}
.hd-why {
  background: #F2F2F2;
  border: 1px solid #E0E0E0;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 18px;
}
.hd-why b {
  font-weight: 700;
}

/* Thinking */
.hd-think {
  padding: 10px 14px;
}
.hd-thinkrow {
  position: relative;
  height: 24px;
  padding-left: 24px;
  font-size: 14px;
  line-height: 24px;
  white-space: nowrap;
}
.hd-thinkrow .hd-status {
  position: absolute;
  left: 0;
  top: 5px;
}

/* Pointer and click ring */
.hd-pointer {
  width: 20px;
  height: 28px;
  z-index: 40;
  filter: drop-shadow(0 0 0.7px #fff) drop-shadow(0 0 0.7px #fff) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}
.hd-pointer i {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 15px;
  height: 22px;
  background: #0F0F0F;
  clip-path: polygon(0 0, 0 20px, 4.5px 16px, 8px 22px, 11px 20.5px, 7.5px 14.5px, 14px 14.5px);
}
.hd-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #0F0F0F;
  z-index: 39;
}

/* Pause button */
.hd-controls {
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0.75rem 0;
}
.hd-controls[hidden] {
  display: none;
}
.hd-toggle {
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.hd-toggle::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 8px;
  width: 4px;
  height: 12px;
  background: var(--text);
  box-shadow: 6px 0 0 var(--text);
}
.hd-toggle[data-state="paused"]::before {
  left: 11px;
  top: 7px;
  width: 0;
  height: 0;
  background: none;
  box-shadow: none;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--text);
}
.hd-toggle::after {
  content: "";
  position: absolute;
  inset: -7px;
}
.hd-toggle:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

/* Chapter labels above the stage */
.hd-chapters {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0 0.9rem;
  margin: 0 0 0.5rem;
  padding: 0;
}
.hd-chap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 13px 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
}
/* the marked label is bold: keep the space of the bold text so the row never shifts */
.hd-chap::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 700;
}
.hd-chap.hd-on {
  font-weight: 700;
  color: var(--text);
}
/* the 2 px line (text colour) sits right under the words; the rest of the 44 px is the tap area */
.hd-chap.hd-on::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 33px;
  height: 2px;
  background: var(--text);
}
.hd-chap:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 2px;
}

/* Reduced motion: four still panels */
.hd-panels {
  display: grid;
  gap: 1.25rem;
}
.hd-panel {
  margin: 0;
}
.hd-panel figcaption {
  padding: 0.6rem 1.25rem 0;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}
