/* The pretend computer inside the laptop, drawn in the macOS manner on a fixed 1280 x 800 stage.
   Positions that scenes target (buttons, strips) are fixed numbers here and in scenes.js.
   Original artwork throughout: no Apple logo or Apple icons. */

.stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1280px;
  height: 800px;
  transform-origin: 0 0;
  transform: scale(var(--s, 0.5));
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Inter, Arial, sans-serif;
  color: #1d1d1f;
  background: #6d7fe0;
  -webkit-font-smoothing: antialiased;
}

/* A soft macOS-style wallpaper */
.dk-wall {
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, #3f63d8 0%, #6d7be6 34%, #a487e0 62%, #e9a3c4 88%, #f6c3b5 100%);
}

/* Menu bar */
.dk-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 30px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(24px) saturate(160%);
  font-size: 14px;
  color: #111;
}

.dk-bar__l,
.dk-bar__r {
  display: flex;
  align-items: center;
  gap: 20px;
}

.dk-bar__l b {
  font-weight: 700;
}

.dk-bar__r {
  gap: 14px;
  font-variant-numeric: tabular-nums;
}

.dk-bar__r svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: #111;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dk-bar__r svg:first-child {
  width: 24px;
}

.dk-bar__r svg .fill {
  fill: #111;
  stroke: none;
}

.dk-scenes,
.dk-scene {
  position: absolute;
  inset: 0;
}

.dk-scenes {
  z-index: 1;
}

.dk-scene[hidden] {
  display: none;
}

/* Dock: frosted glass with app icons and running dots */
.dk-dock {
  position: absolute;
  left: 0;
  top: 720px;
  width: 1280px;
  height: 74px;
  z-index: 2;
}

.dk-dock::before {
  content: "";
  position: absolute;
  left: 397px;
  width: 486px;
  top: 0;
  bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(26px) saturate(170%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.dk-dock__icon {
  position: absolute;
  top: 9px;
  width: 54px;
  height: 54px;
}

.dk-dock__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}

.dk-dock__icon b {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  background: #ff3b30;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.dk-dock__icon i {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: rgba(20, 20, 30, 0.7);
}

/* Windows */
.win {
  position: absolute;
  overflow: hidden;
  border: 0.5px solid rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3), 0 4px 14px rgba(0, 0, 0, 0.12);
}

.win__bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  border-bottom: 1px solid #e3e3e6;
  background: #f6f6f7;
  color: #3a3a3c;
}

.win__lights {
  display: flex;
  gap: 8px;
  margin-right: 6px;
}

.win__lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.win__lights i:nth-child(2) { background: #febc2e; }
.win__lights i:nth-child(3) { background: #28c840; }

.win__tools {
  display: flex;
  align-items: center;
  gap: 14px;
}

.win__tools svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #6e6e73;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.win__head {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.15;
}

.win__head b {
  font-size: 15px;
  color: #1d1d1f;
}

.win__head span {
  font-size: 12px;
  color: #86868b;
}

.win__bar--web .win__tools:last-child {
  margin-left: auto;
}

.win__addr {
  position: absolute;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 440px;
  height: 30px;
  margin-left: -220px;
  border-radius: 8px;
  background: #e9e9eb;
  font-size: 14px;
  color: #1d1d1f;
}

.win__bar--web {
  position: relative;
}

.win__addr svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: #6e6e73;
  stroke-width: 2.4;
}

.win__body {
  height: calc(100% - 44px);
}

/* Mail */
.mail {
  display: flex;
  height: 100%;
}

.mail__side {
  width: 190px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  background: #f1f1f3;
  border-right: 1px solid #e3e3e6;
  font-size: 14px;
  color: #1d1d1f;
}

.mail__side p {
  margin: 12px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #86868b;
}

.mail__side p:first-child {
  margin-top: 0;
}

.mail__side b,
.mail__side span {
  display: flex;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-weight: 400;
}

.mail__side b.is-on {
  background: #dcdce1;
  font-weight: 600;
}

.mail__side i {
  font-style: normal;
  color: #86868b;
}

.mail__list {
  list-style: none;
  margin: 0;
  padding: 6px 8px;
  flex: 1;
}

.mail__list li {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 10px;
  row-gap: 1px;
  padding: 10px 12px 10px 24px;
  border-radius: 8px;
  position: relative;
  font-size: 14px;
}

.mail__list li + li::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 12px;
  top: 0;
  border-top: 1px solid #ececef;
}

.mail__list li b { grid-column: 1; font-size: 15px; }
.mail__list li time { grid-row: 1; grid-column: 2; color: #86868b; font-size: 13px; font-variant-numeric: tabular-nums; }
.mail__list li span { grid-column: 1 / -1; color: #1d1d1f; }
.mail__list li small { grid-column: 1 / -1; color: #86868b; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mail__list li.is-new::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0a84ff;
}

.mail__list li.is-on {
  background: #0a84ff;
}

.mail__list li.is-on b,
.mail__list li.is-on span,
.mail__list li.is-on time,
.mail__list li.is-on small {
  color: #fff;
}

.mail__list li.is-on::after {
  background: #fff;
}

.mail--read .mail__list {
  flex: 0 0 330px;
  border-right: 1px solid #e3e3e6;
}

.msg {
  flex: 1;
  padding: 26px 36px;
}

.msg__from {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.4;
}

.msg__from span {
  color: #86868b;
  font-size: 14px;
}

.msg__subj {
  max-width: 330px;
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.2;
}

.msg__body {
  max-width: 330px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: #3a3a3c;
}

.msg__btn {
  position: absolute;
  left: 366px;
  top: 350px;
  width: 172px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #d8352b;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.msg-empty {
  position: absolute;
  left: 331px;
  top: 44px;
  right: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #86868b;
  opacity: 0;
}

/* Thimble's checklist */
.check {
  position: absolute;
  left: 760px;
  top: 108px;
  width: 400px;
  z-index: 4;
  padding: 20px 22px 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.26), 0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
}

.check__head {
  margin: 0 0 14px;
  font: 800 16px/1 "Archivo", system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a5514;
}

.check ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.check li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 17px;
  line-height: 1.35;
}

.check li i {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef0f5;
}

.check li i svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: transparent;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.check li.is-done[data-r="bad"] i { background: #fde7e5; }
.check li.is-done[data-r="bad"] i svg { stroke: #c2281d; }
.check li.is-done[data-r="ok"] i { background: #e2f6e7; }
.check li.is-done[data-r="ok"] i svg { stroke: #1f8a3a; }

.check__verdict {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #c2281d;
  color: #fff;
  font: 800 20px/1.2 "Archivo", system-ui, sans-serif;
  opacity: 0;
}

.toast {
  position: absolute;
  left: 560px;
  top: 560px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 12px;
  background: #1d1d1f;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  opacity: 0;
}

.toast svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #7fe39a;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* A recipe site */
.recipe {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 34px;
  padding: 34px;
}

.recipe__img {
  display: block;
  width: 100%;
  height: 300px;
  border-radius: 14px;
  object-fit: cover;
  background: #f5ead0;
}

.recipe h3 {
  margin: 4px 0 8px;
  font-size: 34px;
  line-height: 1.1;
}

.recipe__meta {
  margin: 0;
  color: #86868b;
  font-size: 17px;
}

.recipe__lines {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.recipe__lines li {
  padding: 9px 0;
  border-bottom: 1px solid #ececef;
  font-size: 19px;
  line-height: 1.3;
  color: #1d1d1f;
}

/* A bank */
.bank {
  height: 100%;
  background: #f4f6fa;
}

.bank__top,
.rx__top {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 32px;
  color: #fff;
  font-size: 16px;
}

.bank__top { background: #163a6b; }

.bank__top b,
.rx__top b {
  margin-right: auto;
  font: 800 22px/1 "Archivo", system-ui, sans-serif;
}

.bank__signin,
.bank__home {
  position: absolute;
  left: 360px;
  top: 140px;
  width: 400px;
  padding: 28px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bank__home { opacity: 0; }

.bank__signin h4,
.bank__home h4,
.rx__step h4 {
  margin: 0 0 16px;
  font-size: 25px;
  line-height: 1.2;
}

.bank__signin label {
  display: block;
  margin: 12px 0 6px;
  font-size: 15px;
  color: #6e6e73;
}

.field {
  height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1.5px solid #cfd5e2;
  border-radius: 9px;
  font-size: 18px;
}

.field--pass {
  letter-spacing: 0.25em;
  font-size: 20px;
}

.bank__btn {
  height: 48px;
  margin-top: 20px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #163a6b;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.acct {
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #edf0f5;
  font-size: 18px;
}

.acct span {
  font-size: 16px;
  color: #6e6e73;
}

/* A pharmacy */
.rx {
  height: 100%;
  background: #fbfaf6;
}

.rx__top { background: #1f6f4a; }

.rx__note {
  margin: 0;
  padding: 12px 32px;
  border-bottom: 1px solid #f1e2b5;
  background: #fff4d6;
  color: #5c4300;
  font-size: 17px;
}

.rx__step {
  position: absolute;
  left: 40px;
  right: 40px;
  top: 158px;
}

.rx__row {
  height: 76px;
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 0 22px;
  border: 1px solid #e7e4da;
  border-radius: 12px;
  background: #fff;
  font-size: 18px;
}

.rx__row b { display: block; }
.rx__row span { color: #6b6f80; font-size: 16px; }
.rx__row--muted { opacity: 0.6; }

.s4-step2,
.s4-step3 { opacity: 0; }

.s4-step3 {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.s4-step3 p {
  margin: 0;
  font-size: 18px;
  color: #4b5064;
}

.rx__ok {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  background: #e2f6e7;
}

.rx__ok svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: #1f8a3a;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rx__btn {
  position: absolute;
  top: 224px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #1f8a3a;
  color: #fff;
  font-size: 19px;
  font-weight: 700;
}

.s4-refill { left: 880px; width: 140px; }
.s4-place { left: 820px; width: 200px; opacity: 0; }

.rx__btn.is-pressed {
  background: #16702e;
  transform: scale(0.95);
}

/* A pop-up that covers the page (used by the live demo) */
.popup {
  position: absolute;
  z-index: 4;
  width: 520px;
  padding: 30px 32px 28px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.popup h4 {
  margin: 6px 0 10px;
  font-size: 28px;
  line-height: 1.15;
}

.popup p {
  margin: 0 0 18px;
  font-size: 17px;
  color: #6e6e73;
}

.popup__x {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ececef;
}

.popup__x svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #6e6e73;
  stroke-width: 3;
  stroke-linecap: round;
}

.popup__field {
  height: 46px;
  margin: 0 auto 12px;
  border: 1.5px solid #d2d2d7;
  border-radius: 10px;
}

.popup__btn {
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #e2742b;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.dimmer {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

/* Overlays that every scene shares */
.dk-spot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  border-radius: 18px;
  /* A huge outline dims everything outside the hole: Thimble's guide mode. */
  outline: 2400px solid rgba(6, 9, 32, 0.56);
  opacity: 0;
  pointer-events: none;
}

.dk-ring {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  border: 5px solid #f3d21c;
  border-radius: 16px;
  opacity: 0;
}

.dk-th {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.dk-ripple {
  position: absolute;
  left: -26px;
  top: -26px;
  width: 52px;
  height: 52px;
  z-index: 8;
  border: 5px solid #0a84ff;
  border-radius: 50%;
  opacity: 0;
}

/* The macOS arrow: black with a white edge */
.dk-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 36px;
  z-index: 9;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.dk-cursor svg {
  width: 100%;
  height: 100%;
  fill: #000;
  stroke: #fff;
  stroke-width: 2;
  stroke-linejoin: round;
}

/* Lower third: every line Thimble says is captioned, big. */
.dk-cap {
  position: absolute;
  left: 28px;
  bottom: 92px; /* sits 12px above the dock; a second line grows upward */
  max-width: 940px; /* clear of Thimble at home */
  z-index: 10;
  display: flex;
  align-items: stretch;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  opacity: 0;
}

.dk-cap__who {
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #c99a3b;
  color: #1b1204;
  font: 800 18px/1 "Archivo", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dk-cap[data-who="rose"] .dk-cap__who {
  background: #fff;
  color: #0b0f33;
}

.dk-cap__text {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 14px 22px;
  background: #0b0f33;
  color: #fff;
  font: 400 28px/1.3 "Atkinson Hyperlegible", system-ui, sans-serif;
}

/* The ghost holds the full line so the bar never grows while text types in. */
.dk-cap__ghost { visibility: hidden; }

.dk-cap__live {
  position: absolute;
  inset: 14px 22px;
  display: flex;
  align-items: center;
}

/* Tuning: bars at the start of each scene, rolling away. */
.dk-tune {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.dk-tune i:nth-child(1) { background: #c2c2c2; }
.dk-tune i:nth-child(2) { background: #f3d21c; }
.dk-tune i:nth-child(3) { background: #1db2c6; }
.dk-tune i:nth-child(4) { background: #2fb24c; }
.dk-tune i:nth-child(5) { background: #c93497; }
.dk-tune i:nth-child(6) { background: #d8352b; }
.dk-tune i:nth-child(7) { background: #2433c4; }
