/* ============================================================
   Ebook page, Edition 02 — dark.

   Rides on body.lib's dark tokens (css/library.css) so the nav, the
   footer and the ground are already handled and this file only has to
   describe the page itself.
   ============================================================ */

body.eb2 { background: var(--d-bg); color: var(--d-ink); }

.e-sec {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 9vw, 130px) var(--gutter);
}

/* section heads: title left, the one explanatory line right. Nothing is
   centred except the ring, which has to be. */
.e-head { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(20px, 4vw, 70px); align-items: end; }
.e-head--c { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.e-kicker { margin: 0 0 14px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--cursor); }
.e-head h2, .e-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.045em;
}
.e-head h2 { font-size: clamp(34px, 5.2vw, 72px); }
.e-head-sub { margin: 0 0 6px; max-width: 46ch; font-size: clamp(14.5px, 1.1vw, 16.5px); line-height: 1.6; color: var(--d-ink-60); }

/* ============================================================
   Hero
   ============================================================ */
.e-hero { max-width: var(--maxw); margin: 0 auto; padding: clamp(82px, 7.5vw, 112px) var(--gutter) clamp(24px, 3vw, 44px); text-align: center; }
.e-eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0;
  padding: 7px 15px; border: 1px solid var(--d-line); border-radius: 999px;
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-ink-60); }
.e-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--cursor); }
.e-hero h1 { margin: 18px 0 0; font-size: clamp(52px, 11vw, 150px); }
.e-hero h1 em { font-style: italic; color: var(--cursor); }
.e-sub { margin: 16px auto 0; max-width: 56ch; font-size: clamp(14.5px, 1.15vw, 17px); line-height: 1.65; color: var(--d-ink-60); }
.e-cta { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* the one button on the page that has to be found */
/* pink the whole way across: the old gradient was dark for its first 38%,
   so at a glance the button read as another dark panel */
.e-cta .btn--solid, .buy-go.btn--solid, .e-join .btn--solid {
  --btn-fill: #fff;
  position: relative; overflow: hidden; border: 0;
  background: linear-gradient(104deg, #ff5c89 0%, var(--cursor) 42%, #d81f57 100%);
  background-size: 180% 100%; background-position: 0% 50%;
  color: #fff; font-size: 13px; padding: 15px 26px;
  box-shadow: 0 10px 30px rgba(252,71,120,.3);
  transition: background-position .7s var(--ease), box-shadow .5s var(--ease), transform .4s var(--ease);
}
.e-cta .btn--solid::after, .buy-go.btn--solid::after, .e-join .btn--solid::after {
  content: ""; position: absolute; inset: 0 auto 0 -40%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.4), transparent);
  transform: skewX(-18deg); animation: eb-sheen 4.6s var(--ease) infinite;
}
@keyframes eb-sheen { 0%,62% { left: -45%; } 86%,100% { left: 125%; } }
.e-cta .btn--solid:hover, .buy-go.btn--solid:hover, .e-join .btn--solid:hover {
  color: var(--cursor); background-position: 100% 50%; transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(252,71,120,.5);
}

.e-stats { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 26px 0 0; padding: 0; }
.e-stats li { display: flex; align-items: baseline; gap: 7px; padding: 0 clamp(14px,2vw,26px); border-left: 1px solid var(--d-line); }
.e-stats li:first-child { border-left: 0; }
.e-stats b { font-size: 15px; font-weight: 600; }
.e-stats span { font-size: 13px; color: var(--d-ink-40); }

/* the fan — offsets are margin-left percentages so the arrangement holds at
   any width; --sp is driven by the scroll (js/ebook.js) */
.e-fan { position: relative; width: min(100%, 1280px); margin: clamp(16px,2.4vw,36px) auto 0; aspect-ratio: 1280 / 450; }
.fan-pg { position: absolute; bottom: 0; left: 50%; margin-left: calc(var(--mx, 0%) * var(--sp, 1));
  border-radius: 7px; overflow: hidden; background: #0f1114;
  transform: translateX(-50%) rotate(calc(var(--rot, 0deg) * var(--sp, 1)));
  box-shadow: 0 26px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.07); }
.fan-pg img { display: block; width: 100%; height: auto; }
.fan-pg--c  { width: 23.5%; --mx: 0;       --rot: 0deg;   z-index: 5; box-shadow: 0 40px 110px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.1); }
.fan-pg--i1 { width: 17.9%; --mx:  15.6%;  --rot:  5deg;  z-index: 4; }
.fan-pg--i2 { width: 17.9%; --mx: -15.6%;  --rot: -5deg;  z-index: 4; }
.fan-pg--o1 { width: 19.7%; --mx:  30.2%;  --rot:  10deg; z-index: 3; opacity: .8; }
.fan-pg--o2 { width: 19.7%; --mx: -30.2%;  --rot: -10deg; z-index: 3; opacity: .8; }

/* ============================================================
   The lede and the four pointers
   ============================================================ */
.e-why { padding-top: clamp(40px, 6vw, 90px); }
.e-lede em { font-style: normal; color: var(--cursor); }
.e-lede { margin: 0 auto; max-width: 62ch; text-align: center;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(19px, 2.1vw, 30px); line-height: 1.35; letter-spacing: -.02em; }
.e-four { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(30px,5vw,88px);
  margin-top: clamp(44px, 6vw, 96px); border-top: 1px solid var(--d-line); }
.e4 { display: grid; grid-template-columns: 54px 1fr; gap: 10px;
  padding: clamp(26px,3vw,40px) 0; border-bottom: 1px solid var(--d-line); }
.e4-n { font-size: 13px; letter-spacing: .04em; color: var(--d-ink-40); }
.e4 h3 { margin: 0; font-size: clamp(16px, 1.5vw, 19px); font-weight: 600; letter-spacing: -.02em; line-height: 1.25; }
.e4 p { margin: 12px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--d-ink-60); }

/* ============================================================
   Chapters — a rail you drag
   ============================================================ */
.cc-rail { margin-top: clamp(22px, 2.4vw, 34px); overflow-x: auto; scrollbar-width: none;
  cursor: grab; -webkit-overflow-scrolling: touch; }
.cc-rail::-webkit-scrollbar { display: none; }
.cc-rail.is-drag { cursor: grabbing; }
.cc-rail.is-drag .cc { transition: none; }
.cc-track { display: flex; gap: 20px; padding: 4px 0 24px; width: max-content; }

/* The reference's proportion: the text block is inset well in from the card
   edge, and the lesson well sits much closer to it. The two insets differing
   is what makes the well read as a layer underneath rather than a box inside.

   Every block above the well has a fixed height, so the blurb, the pills and
   the first lesson all start on the same line on all eight cards. */
.cc { flex: 0 0 auto; width: clamp(312px, 31vw, 418px);
  background: var(--d-panel); border: 1px solid var(--d-line); border-radius: 22px;
  padding: 16px; user-select: none; display: flex; flex-direction: column;
  height: 584px;
  transition: transform .5s var(--ease), border-color .5s var(--ease), background .5s var(--ease); }
.cc:hover { transform: translateY(-6px); border-color: var(--d-line-hi); background: var(--d-panel-2); }

/* the text block carries the deeper inset */
.cc-head { padding: 18px 22px 0; }
.cc-num { display: block; font-size: 19px; letter-spacing: .02em; color: var(--d-ink-40); }
.cc h3 { margin: 14px 0 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(25px, 2.5vw, 32px); line-height: 1.06; letter-spacing: -.035em; color: var(--d-ink);
  /* two lines, always — so the blurb below starts on the same line everywhere */
  height: 2.2em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-blurb { margin: 12px 0 0; font-size: 14.5px; line-height: 1.5;
  color: var(--d-ink-60);
  height: 3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cc-pills { display: flex; gap: 8px; margin: 18px 0 0; padding: 18px 0 20px; border-top: 1px solid var(--d-line); }
.cc-pill { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--cursor); color: #fff; border-radius: 6px; padding: 5px 9px; }
.cc-pill--q { background: rgba(255,255,255,.07); color: var(--d-ink-60); }

/* the well sits just inside the card edge, not level with the text */
.cc-panel { margin-top: 0; background: var(--d-bg); border: 1px solid var(--d-line);
  border-radius: 14px; padding: 2px 18px; }
.cc-list { list-style: none; margin: 0; padding: 0; }
.cc-list li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--d-line); font-size: 14.5px; line-height: 1.35;
  color: var(--d-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-list li:first-child { border-top: 0; }
.cc-list li span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cc-n { font-size: 11px; color: var(--d-ink-40); }

.cc-hint { margin: 2px 0 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-ink-40); }
.cc-hint span { color: var(--cursor); }

/* ============================================================
   Last added
   ============================================================ */
.nw { list-style: none; margin: clamp(34px,4vw,56px) 0 0; padding: 0; border-top: 1px solid var(--d-line); }
.nw-row { display: grid; grid-template-columns: 120px 110px 1fr auto; gap: clamp(12px,2vw,28px);
  align-items: center; padding: 20px 0; border-bottom: 1px solid var(--d-line);
  transition: background .4s var(--ease), padding-left .4s var(--ease); }
.nw-row:hover { background: rgba(255,255,255,.025); padding-left: 10px; }
.nw-when { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--d-ink-40); }
.nw-tag { justify-self: start; font-size: 9px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--cursor); border: 1px solid rgba(252,71,120,.35); border-radius: 999px; padding: 4px 9px; }
.nw-row b { font-family: var(--display); font-weight: 400; font-size: clamp(17px,1.7vw,23px); letter-spacing: -.03em; }
.nw-cat { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--d-ink-40); }

/* ============================================================
   The ring — a wheel of topics you drag
   ============================================================ */
/* The circle is much wider than the viewport and its centre sits below the
   section, so only the top arc crosses the screen. That is what makes it read
   as a wheel you are standing at the edge of, rather than a ring of cards. */
.ring { position: relative; height: clamp(470px, 50vw, 680px); margin-top: clamp(30px,4vw,54px);
  overflow: hidden; cursor: grab; touch-action: pan-y;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ring.is-drag { cursor: grabbing; }
.ring-track { position: absolute; left: 50%; top: calc(100% + var(--r, 700px) - 56%);
  width: 0; height: 0; will-change: transform; }
.rc { position: absolute; left: 0; top: 0; z-index: 2; width: clamp(210px, 23vw, 330px);
  margin: 0; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: inherit; transform-origin: 0 0;
  /* read right to left: centre the page on the track's origin, rotate it onto
     the circle, lift it by the radius, then undo the rotation so it stays
     upright however far the wheel has turned */
  /* no counter-rotation: each page leans with the circle, the way the
     reference's cards do, so the ring reads as one turning object */
  transform:
    rotate(calc((var(--i) * var(--step, 36deg)) + var(--a, 0deg)))
    translateY(calc(var(--r, 700px) * -1))
    translate(-50%, -50%); }
.rc img { display: block; width: 100%; height: auto; border-radius: 8px;
  background: #0f1114;
  box-shadow: 0 22px 60px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.07);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), filter .55s var(--ease);
  filter: saturate(.7) brightness(.62); }
.rc-cap { display: grid; gap: 3px; margin-top: 14px; text-align: center;
  opacity: 0; transition: opacity .45s var(--ease); }
.rc-cap b { font-size: 14px; font-weight: 500; letter-spacing: -.01em; color: var(--d-ink); }
.rc-cap i { font-style: normal; font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--cursor); }
.rc.on img, .rc:hover img { filter: none; transform: translateY(-6px) scale(1.05);
  box-shadow: 0 36px 90px rgba(0,0,0,.8), 0 0 0 1px rgba(252,71,120,.4); }
.rc.on .rc-cap { opacity: 1; }
.ring-read { text-align: center; margin: 18px 0 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-ink-40); }
.ring-read span { color: var(--cursor); }

/* ============================================================
   Buy — price left, what you get right
   ============================================================ */
.buy2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--d-line); border: 1px solid var(--d-line); border-radius: 24px; overflow: hidden; }
.buy2-l, .buy2-r { background: var(--d-bg); padding: clamp(28px, 3.4vw, 52px); }
.buy2-l { background: linear-gradient(160deg, #101218, #0a0b0e); display: flex; flex-direction: column; align-items: flex-start; }
.buy2-l h2 { margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(30px, 3.6vw, 50px); line-height: .96; letter-spacing: -.045em; }
.buy2-price { display: flex; align-items: baseline; gap: 14px; margin: 30px 0 0; }
.buy2-price s { font-size: 30px; color: var(--d-ink-40); }
.buy2-price b { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 7vw, 96px); line-height: 1; letter-spacing: -.05em; }
.buy2-price b span { font-size: .45em; vertical-align: super; }
.buy2-note { margin: 8px 0 0; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--d-ink-40); }
.buy2-l .buy-go { margin-top: 28px; }
.buy2-fine { margin: 16px 0 0; font-size: 12px; line-height: 1.55; color: var(--d-ink-40); max-width: 40ch; }
.buy2-list { list-style: none; margin: 0; padding: 0; display: grid; }
.buy2-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: baseline;
  padding: 15px 0; border-bottom: 1px solid var(--d-line); font-size: 15px; color: var(--d-ink); }
.buy2-list li:first-child { padding-top: 0; }
.buy2-list span { font-size: 10px; letter-spacing: .1em; color: var(--cursor); }
.buy2-sample { display: inline-block; margin-top: 22px; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--d-ink-60); border-bottom: 1px solid var(--d-line); padding-bottom: 3px; }
.buy2-sample:hover { color: var(--d-ink); border-color: var(--cursor); }
.pay-msg { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--d-ink-60); }
.pay-msg.is-bad { color: var(--cursor); }
.buy-go.is-busy { opacity: .7; pointer-events: none; }
.buy-go.is-paid { background: #1b7f4d; }
.buy-go.is-paid::after { display: none; }
.pay-email { box-sizing: border-box; width: 100%; max-width: 300px; margin: 30px 0 0; padding: 14px 20px;
  font: inherit; font-size: 15px; text-align: center; color: var(--d-ink); background: transparent;
  border: 1px solid var(--d-line-hi); border-radius: 999px; outline: none; transition: border-color .2s; }
.pay-email::placeholder { color: var(--d-ink-40); }
.pay-email:focus { border-color: var(--cursor); }
.pay-email + .buy-go, .buy3-l .pay-email + .buy-go { margin-top: 12px; }

/* ============================================================
   FAQ
   ============================================================ */
.fq-list { margin-top: clamp(30px,4vw,52px); border-top: 1px solid var(--d-line); }
.fq { border-bottom: 1px solid var(--d-line); }
.fq summary { list-style: none; cursor: pointer; padding: 22px 0; display: flex;
  justify-content: space-between; gap: 24px; align-items: center;
  font-family: var(--display); font-weight: 400; font-size: clamp(17px,1.7vw,24px); letter-spacing: -.03em; }
.fq summary::-webkit-details-marker { display: none; }
.fq summary::after { content: "+"; color: var(--cursor); font-family: var(--mono); font-size: 19px; }
.fq[open] summary::after { content: "\2212"; }
.fq p { margin: 0 0 22px; max-width: 72ch; font-size: 15px; line-height: 1.65; color: var(--d-ink-60); }

/* ============================================================
   Community
   ============================================================ */
.e-join { position: relative; overflow: hidden; margin: 0 auto clamp(40px,6vw,90px);
  max-width: calc(var(--maxw) - var(--gutter)); border-radius: 28px;
  background: linear-gradient(150deg, #15171d, #0a0b0e); border: 1px solid var(--d-line); }
.e-join::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 50% 0%, rgba(252,71,120,.22), transparent 62%); }
.e-join-in { position: relative; z-index: 1; text-align: center; padding: clamp(44px,6vw,86px) var(--gutter); }
.e-ava { display: flex; justify-content: center; margin-bottom: 20px; }
.e-ava span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--d-panel-2); border: 1px solid var(--d-line-hi); color: var(--d-ink-60);
  font-size: 13px; font-weight: 600; margin-left: -10px; }
.e-ava span:first-child { margin-left: 0; }
.e-join h2 { margin: 12px 0 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(32px, 5vw, 64px); line-height: .96; letter-spacing: -.045em; }
.e-join p { margin: 16px auto 0; max-width: 46ch; font-size: 15px; line-height: 1.6; color: var(--d-ink-60); }
.e-join-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.e-join .btn--ghost { color: var(--d-ink); border-color: var(--d-line); }

/* ============================================================
   Narrow
   ============================================================ */
@media (max-width: 980px) {
  .e-head, .e-head--c { grid-template-columns: 1fr; gap: 18px; align-items: start; }
  .e-four { grid-template-columns: 1fr 1fr; }
  .pi { grid-template-columns: 1fr; }
  .pi-stage { aspect-ratio: 16/11; }
  .pi-shot img { object-position: center; }
  .buy2 { grid-template-columns: 1fr; }
  .nw-row { grid-template-columns: 1fr; gap: 6px; }
  .nw-tag { margin-top: 4px; }
  .e-fan { aspect-ratio: 1/1; }
  .fan-pg--c { width: 48%; }
  .fan-pg--i1, .fan-pg--i2 { width: 36%; }
  .fan-pg--i1 { --mx: 28%; } .fan-pg--i2 { --mx: -28%; }
  .fan-pg--o1, .fan-pg--o2 { display: none; }
}
@media (max-width: 620px) {
  .e-four { grid-template-columns: 1fr; }
  .e-stats li { padding: 0 12px; }
}

/* ============================================================
   Ghost buttons on the dark ground.

   The shared .btn uses --hair for its border and wipes to --ink on hover,
   both of which are light-page values: on black the border vanished and the
   hover filled dark-on-dark. Everything secondary is restated here.
   ============================================================ */
body.eb2 .btn:not(.btn--solid) {
  --btn-fill: var(--d-ink);
  border: 1px solid var(--d-line-hi);
  background: rgba(255,255,255,.04);
  color: var(--d-ink);
}
body.eb2 .btn:not(.btn--solid):hover {
  color: #07080a;
  border-color: var(--d-ink);
}
body.eb2 .foot .btn:not(.btn--solid) { background: none; }


/* ============================================================
   The orbit the pages ride on, and the drag badge
   ============================================================ */
/* The ticked rim from the reference: the strokes sit on the same circle the
   pages ride, so the ring reads as one object. Brightest at the top, where
   the live page is, falling away round the back. */
.ring-orbit {
  position: absolute; left: 50%; top: calc(100% + var(--r, 700px) - 56%);
  width: calc(var(--r, 700px) * 2.11); height: calc(var(--r, 700px) * 2.11);
  margin-left: calc(var(--r, 700px) * -1.055); margin-top: calc(var(--r, 700px) * -1.055);
  color: rgba(255,255,255,.75); pointer-events: none; z-index: 0;
}
.ring-grab {
  position: absolute; left: 0; top: 0; z-index: 4;
  transform: translate(-50%, -50%);
  will-change: transform;
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  background: var(--d-ink); color: #07080a;
  font-size: 11px; letter-spacing: .04em; pointer-events: none;
  opacity: 0; transition: opacity .4s var(--ease);
}
.ring:hover .ring-grab { opacity: 1; }
.ring.is-drag .ring-grab { opacity: 1; }
.ring.is-drag .ring-grab b { transform: scale(.9); }

.e-chapters { position: relative; }

/* ============================================================
   Hand-written markers
   ============================================================ */
.scribble {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Caveat', 'Segoe Script', cursive;
  font-size: clamp(19px, 1.9vw, 26px); line-height: 1; color: var(--cursor);
  white-space: nowrap; pointer-events: none;
}
.scribble svg { width: 54px; height: 27px; flex: none; }
.e-head, .buy2-l { position: relative; }
.scribble--chap { top: 8%; left: 40%; transform: rotate(-5deg); }
.scribble--ring { top: 100%; right: 4%; margin-top: 44px; transform: rotate(-3deg); }
.scribble--buy  { top: -30px; left: 230px; transform: rotate(-5deg); color: #9ee37d; }
.scribble--faq  { top: 100%; left: 50%; margin-top: 16px; transform: translateX(-56%) rotate(-3deg); }

@media (max-width: 980px) {
  .scribble--chap, .scribble--buy, .scribble--faq { position: static; transform: rotate(-3deg); margin-top: 14px; }
  .cc { width: clamp(272px, 80vw, 340px); padding: 24px 24px 16px; }
}

/* ============================================================
   Launch badge — a sticker, not a second button
   ============================================================ */
.buy2-l .buy-badge {
  display: inline-flex; align-items: center; gap: 7px; margin: 14px 0 4px;
  background: linear-gradient(100deg, rgba(252,71,120,.22), rgba(252,71,120,.1));
  border: 1px solid rgba(252,71,120,.45);
  color: #ff9ab8; border-radius: 8px; padding: 7px 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
  transform: rotate(-1.5deg); cursor: default;
}
.buy2-l .buy-badge svg { width: 13px; height: 13px; flex: none; fill: var(--cursor); }


/* ============================================================
   Spacing and stacking corrections
   ============================================================ */
.e-ring { padding-top: clamp(32px, 4.5vw, 65px); }

/* the rim is scenery: it sits under the track, which carries the pages */
.ring-orbit { z-index: 0; }
.ring-track { position: absolute; z-index: 2; }
.ring-grab { z-index: 5; }

/* Buy: the left panel was half empty because its content kept its natural
   width inside a 1fr column. The column narrows and the content fills it. */
.buy2 { grid-template-columns: .82fr 1.18fr; }
.buy2-l { align-items: stretch; }
.buy2-l h2, .buy2-l .buy2-price, .buy2-l .buy2-note { align-self: flex-start; }
.buy2-l .buy-badge { align-self: flex-start; }
.buy2-l .buy-go { width: 100%; justify-content: center; }
.buy2-fine { max-width: none; }

/* 4. the FAQ marker, nudged */
.scribble--faq { margin-top: -8px; transform: translateX(calc(-56% - 48px)) rotate(-3deg); }


/* ============================================================
   Chapters head, centred
   ============================================================ */
.e-chapters .e-head--c h2 { font-size: clamp(42px, 7.5vw, 104px); line-height: .92; }
.ch-pills { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.ch-pill { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  background: var(--cursor); color: #fff; border-radius: 7px; padding: 6px 11px; }
.ch-pill--q { background: rgba(255,255,255,.07); color: var(--d-ink-60); }
.e-chapters .e-head-sub { margin: 22px auto 0; text-align: center; }
.scribble--chap { top: 24%; left: 50%; transform: translateX(min(330px, 30vw)) rotate(-5deg); }

/* ============================================================
   What readers say
   ============================================================ */
.tstage { position: relative; margin-top: clamp(30px,4vw,54px); display: grid;
  grid-template-columns: 1fr auto; gap: 26px; align-items: center; }
.tcards { position: relative; min-height: 420px; }
.tcard { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  gap: clamp(26px,3vw,46px);
  background: linear-gradient(150deg, #ff5c89, var(--cursor) 48%, #d81f57);
  border-radius: 26px; padding: clamp(32px,4vw,64px); color: #fff;
  opacity: 0; transform: scale(.985) translateY(10px); pointer-events: none;
  transition: opacity .55s var(--ease), transform .7s var(--ease); }
.tcard.on { opacity: 1; transform: none; pointer-events: auto; }
.tcard h3 { margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 4vw, 56px); line-height: 1.02; letter-spacing: -.04em; max-width: 18ch; }
.tcard-b { display: grid; grid-template-columns: 240px 1fr; gap: clamp(20px,3vw,48px); align-items: start; }
.tcard-who { display: grid; gap: 4px; }
.tcard-who .tava { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.35);
  font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.tcard-who b { font-family: 'Caveat', cursive; font-size: 25px; font-weight: 600; }
.tcard-who i { font-style: normal; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(0,0,0,.28); border-radius: 5px; padding: 4px 8px; justify-self: start; }
.tcard p { margin: 0; font-size: clamp(14.5px,1.25vw,17px); line-height: 1.6; color: rgba(255,255,255,.92); }
.tdots { display: flex; flex-direction: column; gap: 10px; }
.tdot { width: 26px; height: 3px; border-radius: 2px; border: 0; padding: 0; cursor: pointer;
  background: var(--d-line-hi); transition: background .4s var(--ease), width .4s var(--ease); }
.tdot.on { background: var(--cursor); width: 34px; }

/* ============================================================
   Pricing: a stadium on the left, the contents on the right
   ============================================================ */
.buy-top h2 { font-size: clamp(34px, 5.6vw, 76px); }
.buy-join { display: inline-flex; align-items: center; gap: 12px; margin: 24px 0 0;
  font-size: 15px; color: var(--d-ink-60); }
.e-ava--sm span { width: 28px; height: 28px; font-size: 11px; }

.buy3 { position: relative; display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(16px,2.4vw,34px); margin-top: clamp(40px,5vw,78px); align-items: stretch; }
.buy3-l, .buy3-r { position: relative; padding: clamp(40px,5vw,76px) clamp(28px,3.4vw,56px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.buy3-l { background: var(--d-panel); border: 1px solid var(--d-line); border-radius: 50% / 22%; }
.buy3-r { background: linear-gradient(155deg, #ff5c89, var(--cursor) 55%, #d81f57);
  border-radius: 28px; color: #fff; align-items: flex-start; text-align: left; }
.buy3-n { position: absolute; top: clamp(20px,2.4vw,34px); left: 50%; transform: translateX(-50%);
  font-size: 13px; color: var(--d-ink-40); }
.buy3-r .buy3-n { left: auto; right: clamp(24px,3vw,44px); transform: none; color: rgba(255,255,255,.5); }
.buy3-price { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.buy3-price s { font-size: 28px; color: var(--d-ink-40); }
.buy3-price b { font-family: var(--display); font-weight: 400; font-size: clamp(56px,7.4vw,104px);
  line-height: 1; letter-spacing: -.05em; }
.buy3-price b span { font-size: .45em; vertical-align: super; }
.buy3-sub { margin: 14px 0 0; font-size: clamp(15px,1.4vw,19px); color: var(--d-ink); }
.buy3-pills { display: flex; gap: 8px; margin-top: 16px; }
.buy3-pills span { font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  background: rgba(255,255,255,.07); color: var(--d-ink-60); border-radius: 6px; padding: 5px 9px; }
.buy3-l .buy-go { margin-top: 30px; min-width: 230px; justify-content: center; }
.buy3-l .buy2-fine { margin-top: 14px; max-width: 32ch; text-align: center; }
.buy3-or { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); z-index: 2;
  display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: var(--d-bg); border: 1px solid var(--d-line); color: var(--d-ink-60); font-size: 14px; }
.buy3-r h3 { margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(34px,4.4vw,64px); line-height: .98; letter-spacing: -.045em; }
.buy3-rsub { margin: 14px 0 0; font-size: 15.5px; color: rgba(255,255,255,.85); }
.buy3-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 0; width: 100%; }
.buy3-list li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.25);
  font-size: 15px; color: #fff; }
.buy3-sample { display: inline-block; margin-top: 26px; font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.85); border-bottom: 1px solid rgba(255,255,255,.4);
  padding-bottom: 3px; }
.buy3-sample:hover { color: #fff; border-color: #fff; }

@media (max-width: 980px) {
  .e-four { grid-template-columns: 1fr; }
  .tcard-b { grid-template-columns: 1fr; }
  .tstage { grid-template-columns: 1fr; }
  .tdots { flex-direction: row; justify-content: center; }
  .buy3 { grid-template-columns: 1fr; }
  .buy3-l { border-radius: 28px; }
  .buy3-or { position: static; transform: none; margin: -6px auto; }
  .scribble--chap { position: static; transform: rotate(-4deg); margin-top: 16px; }
}


/* ============================================================
   Ring: the page in focus grows, the rest step back
   ============================================================ */
.rc img { transform: scale(.8); transform-origin: 50% 100%;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease), filter .6s var(--ease); }
.rc.on img, .rc:hover img { transform: scale(1.3) translateY(-4px); }
.rc.on img { box-shadow: 0 40px 100px rgba(0,0,0,.85), 0 0 0 1px rgba(252,71,120,.4); }
/* room for the grown page, and the rim strictly underneath */
.ring { height: clamp(520px, 56vw, 760px); }
.ring-orbit { z-index: 0 !important; }
.ring-track { z-index: 2; }
.rc { z-index: 2; }
.rc.on { z-index: 3; }

/* the rail's own drag badge, same idea as the ring's */
.cc-rail { position: relative; }
.cc-grab {
  position: absolute; left: 0; top: 0; z-index: 6;
  transform: translate(-50%, -50%); will-change: transform;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  background: var(--d-ink); color: #07080a; font-size: 11px; letter-spacing: .04em;
  pointer-events: none; opacity: 0; transition: opacity .35s var(--ease);
}
.cc-rail:hover .cc-grab { opacity: 1; }
.cc-rail.is-drag .cc-grab { opacity: 1; }


/* ============================================================
   Round two of corrections
   ============================================================ */

/* 1. the lede section was running edge to edge */
.e-why { max-width: 1180px; margin-inline: auto; }
.e-why .e-four { padding-inline: clamp(0px, 2vw, 40px); }

/* 2. the wheel: every page the same size, no focus scaling — the movement
   is the circle itself, not the cards growing */
.rc img { transform: none; filter: saturate(.78) brightness(.68); }
.rc.on img, .rc:hover img { transform: none; filter: none;
  box-shadow: 0 30px 80px rgba(0,0,0,.8), 0 0 0 1px rgba(252,71,120,.4); }
.ring { height: clamp(430px, 46vw, 620px); }

/* 4. pricing: a true circle on the left, softer corners on the right */
.buy3-l { border-radius: 50%; aspect-ratio: 1 / 1; height: auto; align-self: center;
  width: min(100%, 520px); justify-self: center; padding: clamp(30px,4vw,56px); }
.buy3-r { border-radius: 56px; }

/* 5. drag-me lower */
.scribble--chap { top: calc(24% + 40px); }

/* the rails use the badge as the cursor, so the hand must go */
.cc-rail, .cc-rail.is-drag, .ring, .ring.is-drag { cursor: none; }
.cc-rail .cc, .ring .rc { cursor: none; }
.cc-grab, .ring-grab { transition: opacity .25s var(--ease); }

@media (max-width: 980px) {
  .buy3-l { aspect-ratio: auto; border-radius: 28px; width: 100%; }
  .buy3-r { border-radius: 28px; }
}

/* ============================================================
   The globe beside the quotes
   ============================================================ */
.tstage { grid-template-columns: minmax(280px, .78fr) 1.22fr auto; }
.tglobe-wrap { position: relative; margin: 0; aspect-ratio: 1 / 1;
  display: grid; place-items: center; border-radius: 42% / 36%;
  background: linear-gradient(165deg, #15171d, #0a0b0e);
  border: 1px solid var(--d-line); overflow: hidden; }
.tglobe { width: 100%; height: 100%; display: block; }
.tglobe-top { position: absolute; top: 9%; left: 50%; transform: translateX(-50%);
  text-align: center; font-size: 12.5px; line-height: 1.4; letter-spacing: .02em;
  color: var(--cursor); }
.tglobe-top b { color: var(--d-ink); font-weight: 500; }
.tglobe-cap { position: absolute; bottom: 9%; left: 50%; transform: translateX(-50%);
  font-family: 'Caveat', cursive; font-size: 25px; color: var(--cursor); white-space: nowrap; }

/* ============================================================
   Black ink on every pink surface
   ============================================================ */
.tcard { color: #121212; }
.tcard h3 { color: #121212; }
.tcard p { color: rgba(0,0,0,.76); }
.tcard-who .tava { background: rgba(0,0,0,.14); border-color: rgba(0,0,0,.22); color: #121212; }
.tcard-who b { color: #121212; }
.tcard-who i { background: rgba(0,0,0,.14); color: #121212; }

.buy3-r { color: #121212; }
.buy3-r .buy3-n { color: rgba(0,0,0,.45); }
.buy3-rsub { color: rgba(0,0,0,.72); }
.buy3-list li { color: #121212; border-top-color: rgba(0,0,0,.18); }
.buy3-sample { color: rgba(0,0,0,.72); border-bottom-color: rgba(0,0,0,.3); }
.buy3-sample:hover { color: #121212; border-color: #121212; }

.cc-pill, .ch-pill { color: #121212; }
.e-cta .btn--solid, .buy-go.btn--solid, .e-join .btn--solid { color: #121212; }
.e-cta .btn--solid:hover, .buy-go.btn--solid:hover, .e-join .btn--solid:hover { color: #121212; }

/* ============================================================
   Pricing: an ellipse like the reference, and no divider
   ============================================================ */
.buy3 { grid-template-columns: 1.04fr .96fr; }
.buy3-l { border-radius: 50%; aspect-ratio: auto; width: 100%;
  min-height: 560px; padding: clamp(44px,5vw,80px) clamp(40px,5vw,86px); }
.buy3-or { display: none; }

@media (max-width: 980px) {
  .tstage { grid-template-columns: 1fr; }
  .tglobe-wrap { max-width: 360px; margin-inline: auto; }
  .buy3 { grid-template-columns: 1fr; }
  .buy3-l { border-radius: 28px; min-height: 0; }
}

/* ============================================================
   Round three
   ============================================================ */

/* the ring gets its own stacking context, so the rim can never paint over
   the pages whatever else on the page has a z-index */
.ring { isolation: isolate; }
.ring-orbit { z-index: 0 !important; }
.ring-track { z-index: 1 !important; }
.rc { z-index: auto; }
.rc.on { z-index: 2; }

/* the drag badges live on <body> now, so they are fixed to the viewport */
.cc-grab, .ring-grab {
  position: fixed; left: 0; top: 0; z-index: 9999;
  opacity: 0; pointer-events: none;
}
.cc-grab.on, .ring-grab.on { opacity: 1; }

/* pricing: a cylinder, not an ellipse */
.buy3-l { border-radius: 999px; }

/* ============================================================
   FAQ, centred
   ============================================================ */
.e-faq .e-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.e-faq .e-head h2 { font-size: clamp(34px, 5.4vw, 72px); line-height: 1; }
.fq-tabs { display: inline-flex; gap: 2px; margin: 28px auto 0; padding: 4px;
  background: var(--d-panel); border: 1px solid var(--d-line); border-radius: 999px; }
.fq-tab { border: 0; border-radius: 999px; padding: 9px 20px; font: inherit; font-size: 14px;
  background: none; color: var(--d-ink-60); cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease); }
.fq-tab:hover { color: var(--d-ink); }
.fq-tab.on { background: var(--d-ink); color: #07080a; }
.fq-list { max-width: 860px; margin-inline: auto; }
.fq[hidden] { display: none; }
.scribble--faq { top: 16%; left: 50%; margin-top: 0;
  transform: translateX(min(300px, 26vw)) rotate(-4deg); }

@media (max-width: 760px) {
  .scribble--faq { position: static; transform: rotate(-3deg); margin: 14px auto 0; }
}


/* ============================================================
   Feature-card grid — the "Web design ebook" blocks.

   Restored: these styles live here but are used by prompts.html too, and
   rewriting this file for the dark ebook page took them out from under it.
   ============================================================ */
/* ---------- feature card grid ---------- */
.f-grid {
  max-width: var(--maxw); margin: clamp(34px,4vw,62px) auto 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.7vw, 24px);
}
@media (max-width: 1080px) { .f-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px)  { .f-grid { grid-template-columns: 1fr; } }

.fcard {
  position: relative; overflow: hidden;
  min-height: 268px;
  display: flex; flex-direction: column;
  padding: clamp(20px,2vw,26px);
  border-radius: 26px;
  border: 1px solid var(--hair);
  background: rgba(43,43,43,.022);
  transition: transform .55s var(--ease), box-shadow .55s var(--ease),
              border-color .45s var(--ease), background .45s var(--ease);
  will-change: transform;
}
.fcard:hover, .fcard.is-lit {
  transform: translateY(-6px);
  border-color: rgba(43,43,43,.24);
  background: rgba(43,43,43,.045);
  box-shadow: 0 22px 52px rgba(0,0,0,.09);
}

.fcard h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(18px,1.55vw,24px); letter-spacing: -.032em;
  line-height: 1.05; margin: 0;
}
.fcard > p {
  margin: 9px 0 0; font-size: 14px; line-height: 1.5;
  color: var(--ink-60); max-width: 34ch;
}

/* the visual stage each card animates inside */
.fviz {
  position: relative; margin-top: auto; padding-top: 22px;
  min-height: 118px;
}

/* every animated fragment shares this, staggered by --i */
.bit {
  transition: transform .6s var(--ease), opacity .5s var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
  will-change: transform;
}

/* ---------- 01 landing clients: avatar wall + reactions ---------- */
.av-wall { display: grid; grid-template-columns: repeat(3, 52px); gap: 10px; }
.av {
  width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center;
  font-family: var(--display); font-size: 17px; color: #f1f1f1;
  border: 2px solid rgba(241,241,241,.85);
  box-shadow: 0 6px 16px rgba(0,0,0,.14);
  transform: rotate(var(--r, 0deg));
}
.fcard:hover .av, .fcard.is-lit .av { transform: rotate(0deg) translateY(-5px) scale(1.04); }
.av:nth-child(1){ --r:-5deg;  background:linear-gradient(140deg,#2b2b2b,#4a4a52); }
.av:nth-child(2){ --r: 2deg;  background:linear-gradient(140deg,#7a2540,#fc4778); }
.av:nth-child(3){ --r:-8deg;  background:linear-gradient(140deg,#123544,#2f7f96); }
.av:nth-child(4){ --r: 5deg;  background:linear-gradient(140deg,#3d2a12,#a9762e); }
.av:nth-child(5){ --r:-3deg;  background:linear-gradient(140deg,#1d3320,#4d8c5a); }
.av:nth-child(6){ --r: 7deg;  background:linear-gradient(140deg,#2a1d3d,#6b4fa0); }

.reacts { position: absolute; right: 0; top: 26px; display: grid; gap: 9px; }
.react {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--hair);
  font-family: var(--mono); font-size: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
  opacity: 0; transform: translateX(14px) scale(.9);
}
.fcard:hover .react, .fcard.is-lit .react { opacity: 1; transform: none; }

/* ---------- 02 documents: fanned sheets ---------- */
.docs { position: relative; height: 112px; }
.doc {
  position: absolute; left: 8px; bottom: 0;
  width: 84px; height: 106px; border-radius: 11px;
  background: #fff; border: 1px solid var(--hair);
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
  padding: 11px; display: grid; align-content: start; gap: 6px;
  transform: rotate(var(--r)) translateX(var(--x));
}
.doc span { display: block; height: 4px; border-radius: 2px; background: rgba(43,43,43,.16); }
.doc span:nth-child(1){ width: 70%; background: rgba(43,43,43,.34); }
.doc span:nth-child(3){ width: 55%; }
.doc:nth-child(1){ --r:-9deg;  --x:0px;   }
.doc:nth-child(2){ --r:-1deg;  --x:34px;  }
.doc:nth-child(3){ --r: 7deg;  --x:68px;  }
.fcard:hover .doc:nth-child(1), .fcard.is-lit .doc:nth-child(1){ transform: rotate(-14deg) translate(-8px,-8px); }
.fcard:hover .doc:nth-child(2), .fcard.is-lit .doc:nth-child(2){ transform: rotate(0deg)   translate(40px,-14px); }
.fcard:hover .doc:nth-child(3), .fcard.is-lit .doc:nth-child(3){ transform: rotate(12deg)  translate(90px,-8px); }
.doc-tag {
  position: absolute; right: 2px; bottom: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-40);
}

/* ---------- 03 chat bubbles ---------- */
.chat { display: grid; gap: 8px; }
.bub {
  max-width: 78%; padding: 9px 13px; border-radius: 14px;
  font-size: 13px; background: #fff; border: 1px solid var(--hair);
  box-shadow: 0 5px 14px rgba(0,0,0,.06);
  opacity: 0; transform: translateY(10px);
}
.bub.me { margin-left: auto; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fcard:hover .bub, .fcard.is-lit .bub { opacity: 1; transform: none; }

/* ---------- generic chip rows (research / copy / process) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border-radius: 999px;
  background: #fff; border: 1px solid var(--hair); font-size: 13px;
  opacity: .45; transform: translateY(8px) scale(.96);
}
.fcard:hover .mchip, .fcard.is-lit .mchip { opacity: 1; transform: none; }

/* ---------- 06 grids & layout ---------- */
.cols { display: flex; gap: 6px; align-items: flex-end; height: 92px; }
.col {
  flex: 1; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, rgba(252,71,120,.55), rgba(252,71,120,.14));
  height: 38%; transform-origin: 50% 100%;
}
.fcard:hover .col, .fcard.is-lit .col { height: var(--h, 70%); }
.col:nth-child(1){ --h: 58%; } .col:nth-child(2){ --h: 86%; }
.col:nth-child(3){ --h: 44%; } .col:nth-child(4){ --h: 96%; }
.col:nth-child(5){ --h: 66%; } .col:nth-child(6){ --h: 78%; }
.bp { display: flex; justify-content: space-between; margin-top: 9px; }
.bp span { font-family: var(--mono); font-size: 10px; color: var(--ink-40); letter-spacing: .1em; }

/* ---------- 07 typography ---------- */
.typ { display: grid; gap: 4px; }
.typ .big {
  font-family: var(--display); font-size: 40px; letter-spacing: -.05em;
  line-height: .9; transform-origin: 0 100%;
}
.fcard:hover .typ .big, .fcard.is-lit .typ .big { transform: scale(1.16); }
.typ .small { font-size: 13px; color: var(--ink-60); }
.typ .rule { height: 1px; background: var(--hair); margin: 6px 0; }

/* ---------- 08 colour ---------- */
.swatches { display: flex; gap: 8px; }
.sw { flex: 1; height: 76px; border-radius: 12px; transform-origin: 50% 100%; }
.fcard:hover .sw, .fcard.is-lit .sw { transform: scaleY(1.16); }
.sw:nth-child(1){ background:#2b2b2b; } .sw:nth-child(2){ background:#fc4778; }
.sw:nth-child(3){ background:#2f7f96; } .sw:nth-child(4){ background:#e2b23c; }
.sw:nth-child(5){ background:#e7e7e7; border:1px solid var(--hair); }

/* ---------- 09 visuals: layered shapes ---------- */
.layers { position: relative; height: 108px; }
.layer {
  position: absolute; inset: 14px 30px; border-radius: 16px;
  border: 1px solid var(--hair); background: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.07);
}
.fcard:hover .layer:nth-child(1), .fcard.is-lit .layer:nth-child(1){ transform: translate(-24px,-10px) rotate(-7deg); }
.fcard:hover .layer:nth-child(2), .fcard.is-lit .layer:nth-child(2){ transform: translate(0,-4px) rotate(1deg); }
.fcard:hover .layer:nth-child(3), .fcard.is-lit .layer:nth-child(3){ transform: translate(24px,-10px) rotate(8deg); }
.layer:nth-child(2){ background: linear-gradient(140deg,#2b2b2b,#3a3a44); }
.layer:nth-child(3){ background: linear-gradient(140deg,#7a2540,#fc4778); }

/* ---------- 12 performance gauge ----------
   Scoped under .gauge: a bare .ring here collided with the page's own
   carousel and collapsed it to 84px. */
.gauge { display: flex; align-items: center; gap: 16px; }
.gauge .ring {
  --p: 0;
  width: 84px; height: 84px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--cursor) calc(var(--p) * 1%), rgba(43,43,43,.10) 0);
  display: grid; place-items: center;
  transition: --p 1.1s var(--ease);
}
.gauge .ring::after {
  content: ""; width: 64px; height: 64px; border-radius: 50%; background: var(--bg);
  grid-area: 1/1;
}
.gauge .ring b {
  grid-area: 1/1; z-index: 1;
  font-family: var(--display); font-size: 20px; font-weight: 400; letter-spacing: -.03em;
}
.fcard:hover .gauge .ring, .fcard.is-lit .gauge .ring { --p: 96; }
@property --p { syntax: '<number>'; initial-value: 0; inherits: false; }

/* ---------- readability fixes: bigger, higher-contrast card copy ---------- */
.fcard > p { font-size: clamp(14.5px,1.08vw,16.5px); color: rgba(43,43,43,.74); max-width: 36ch; }
.fcard h3 { font-size: clamp(19px,1.65vw,26px); }

/* product cards: text left, visual right on wide screens */
@media (min-width: 901px) {
  .prod-grid { grid-template-columns: 1fr; }
  .prod {
    display: grid; grid-template-columns: 1.05fr .95fr;
    gap: clamp(24px,3vw,52px); align-items: center;
  }
  .prod .prod-cover { order: 2; aspect-ratio: 16/11; }
  .prod .prod-body { order: 1; padding-top: 0; }
  .prod:nth-child(even) .prod-cover { order: 1; }
  .prod:nth-child(even) .prod-body { order: 2; }
}
.prod-meta li { font-size: clamp(14.5px,1.05vw,16px); color: rgba(43,43,43,.82); }
.prod-meta .k { font-size: 11px; color: rgba(43,43,43,.5); min-width: 84px; }
.prod-desc { font-size: clamp(15px,1.1vw,17px); color: rgba(43,43,43,.72); max-width: 52ch; }

/* Full-width CTAs: .btn is inline by default, so vertical margins collapse
   out of block flow and the button rides up over the list above it.
   Making them flex restores the margin and centres the label properly. */
.access-card .btn,
.side-box .btn,
.prod .btn--solid,
.c-form .btn {
  display: flex; align-items: center; justify-content: center;
}


/* the feature grid, on the ebook page */
.e-inside2 .f-grid { margin-top: clamp(30px, 4vw, 56px); }

/* ============================================================
   Feature cards on the dark ground.

   These visuals were drawn for a light page and use --ink-40, --hair and
   --bg, all of which land within a few per cent of the dark background.
   Everything that carries a label is restated here.
   ============================================================ */

/* "3 TEMPLATES", "375px / 1440px", "H1 — 80px · body — 16px" */
body.lib .doc-tag,
body.lib .bp span,
body.lib .typ .small { color: var(--d-ink-60); }
body.lib .typ .rule { background: var(--d-line); }
body.lib .typ .big { color: var(--d-ink); }

/* the bars were snapping to height on hover with nothing to ease */
body.lib .col,
.col { transition: height .75s var(--ease); }
body.lib .col { background: linear-gradient(180deg, rgba(252,71,120,.85), rgba(252,71,120,.2)); }
.col:nth-child(2) { transition-delay: .05s; }
.col:nth-child(3) { transition-delay: .1s; }
.col:nth-child(4) { transition-delay: .15s; }
.col:nth-child(5) { transition-delay: .2s; }
.col:nth-child(6) { transition-delay: .25s; }

/* the no-code tags: outlined pills on the dark ground, not white blocks */
body.lib .mchip {
  background: rgba(255,255,255,.05);
  border-color: var(--d-line-hi);
  color: var(--d-ink);
  transition: opacity .5s var(--ease), transform .5s var(--ease),
              background .4s var(--ease), border-color .4s var(--ease);
}
body.lib .fcard:hover .mchip { background: rgba(255,255,255,.09); border-color: var(--cursor); }

/* chat bubbles */
body.lib .bub { background: var(--d-panel-2); border-color: var(--d-line); color: var(--d-ink); }
body.lib .bub.me { background: var(--cursor); color: #121212; border-color: transparent; }

/* the performance gauge: its centre was punched out in the light ground */
body.lib .gauge .ring { background: conic-gradient(var(--cursor) calc(var(--p) * 1%), rgba(255,255,255,.12) 0); }
body.lib .gauge .ring::after { background: var(--d-panel); }
body.lib .gauge .ring b { color: var(--d-ink); }

/* the fifth swatch was near-white and far too hot against the dark */
body.lib .sw:nth-child(5) { background: #d9d6cf; border-color: rgba(255,255,255,.14); }

/* documents, layers and avatar wall */
body.lib .doc { background: var(--d-panel-2); border-color: var(--d-line); }
body.lib .av { background: var(--d-panel-2); border-color: var(--d-line); color: var(--d-ink); }
body.lib .react { background: rgba(255,255,255,.06); color: var(--d-ink); }
body.lib .sswatch i, body.lib .scols i { border-color: var(--d-line); }

/* the chapter pills were dark ink on a dark panel */
.cc-pill--q { background: rgba(255,255,255,.1); color: var(--d-ink); }
.ch-pill--q { background: rgba(255,255,255,.1); color: var(--d-ink); }

/* ============================================================
   The globe: a cylinder, smaller, with the label above and below
   ============================================================ */
.e-say .e-head--c h2 { font-size: clamp(34px, 5.4vw, 72px); }
.e-say .e-head-sub { margin: 20px auto 0; text-align: center; }
.tstage { grid-template-columns: minmax(250px, .66fr) 1.34fr auto; align-items: center; }
.tglobe-wrap {
  aspect-ratio: 3 / 4; max-width: 330px; margin-inline: auto;
  border-radius: 999px;                       /* a cylinder, as in the reference */
  padding: 0; overflow: hidden;
}
.tglobe { width: 100%; height: 72%; align-self: center; }
.tglobe-top { position: absolute; top: 11%; left: 50%; transform: translateX(-50%);
  text-align: center; font-size: 15px; line-height: 1.3; color: var(--cursor); }
.tglobe-top b { display: block; color: var(--d-ink); font-weight: 400; font-size: 17px; }
.tglobe-cap { position: absolute; bottom: 10%; left: 50%; transform: translateX(-50%);
  text-align: center; font-family: 'Caveat', cursive; font-size: 21px; line-height: 1.15;
  color: var(--d-ink-40); white-space: nowrap; }
.tglobe-cap span { display: block; font-size: 25px; color: var(--cursor); }

/* ============================================================
   Pricing: one line, matched heights
   ============================================================ */
.buy3 { align-items: stretch; }
.buy3-l, .buy3-r { height: 100%; }
.buy3-l { min-height: 0; }
.buy3-r h3 { font-size: clamp(30px, 3.6vw, 52px); white-space: nowrap; }

/* ============================================================
   FAQ: the filter sits with everything else that is centred
   ============================================================ */
.e-faq .fq-tabs { display: flex; width: max-content; margin-inline: auto; }
.scribble--faq { top: calc(16% + 60px); transform: translateX(calc(min(300px, 26vw) - 36px)) rotate(-4deg); }


/* ============================================================
   Round four
   ============================================================ */

/* the globe's labels clear the rim instead of sitting on it */
.tglobe-wrap { aspect-ratio: 5 / 7; }
.tglobe { height: 58%; }
.tglobe-top { top: 7%; }
.tglobe-cap { bottom: 6%; }

/* chapter cards were clipped on lift: the rail scrolls, so it clips too */
.cc-rail { overflow-y: visible; }
.cc-track { padding-top: 14px; }

/* the wheel: more room between pages, and less lean so they stop touching */
.rc {
  transform:
    rotate(calc((var(--i) * var(--step, 36deg)) + var(--a, 0deg)))
    translateY(calc(var(--r, 700px) * -1))
    rotate(calc(((var(--i) * var(--step, 36deg)) + var(--a, 0deg)) * -0.55))
    translate(-50%, -50%);
}

/* chat bubbles read at rest and nudge under the pointer */
body.lib .bub { opacity: 1; transform: none;
  transition: transform .5s var(--ease), background .4s var(--ease); }
body.lib .fcard:hover .bub:nth-child(1) { transform: translateX(6px); }
body.lib .fcard:hover .bub:nth-child(2) { transform: translateX(-6px); }
body.lib .fcard:hover .bub:nth-child(3) { transform: translateX(6px); }

/* the three documents take colour and shift under the pointer */
body.lib .doc { transition: transform .6s var(--ease), background .45s var(--ease), border-color .45s var(--ease); }
body.lib .fcard:hover .doc:nth-child(1) { background: linear-gradient(160deg,#2a2d34,#1b1d22); border-color: var(--d-line-hi); }
body.lib .fcard:hover .doc:nth-child(2) { background: linear-gradient(160deg,#8d2246,#5d1630); border-color: rgba(252,71,120,.5); }
body.lib .fcard:hover .doc:nth-child(3) { background: linear-gradient(160deg,#2f5f70,#1d3b46); border-color: rgba(79,160,185,.5); }


/* ============================================================
   Round five
   ============================================================ */

/* The globe is a sphere again. The canvas is drawn square, so squashing it
   with a percentage height distorted it; it keeps its 1:1 box and the
   cylinder grows instead, which is where the labels now live. */
.tglobe-wrap { aspect-ratio: 4 / 5; max-width: 340px; display: flex; align-items: center; }
.tglobe { width: 100%; height: auto; aspect-ratio: 1 / 1; align-self: center; }
.tglobe-top { top: 5.5%; }
.tglobe-cap { bottom: 4.5%; }

/* The wheel. The lean now comes from an angle JS folds into (-180, 180],
   so a page leans with the circle near the top and never flips over. */
.rc {
  width: clamp(240px, 26vw, 380px);
  transform:
    rotate(var(--pa, 0deg))
    translateY(calc(var(--r, 700px) * -1))
    rotate(calc(var(--lean, 0deg) - var(--pa, 0deg)))
    translate(-50%, -50%);
}
.rc img { transform: scale(.88); }
.rc.on img, .rc:hover img { transform: scale(1.12) translateY(-6px); }

/* the rim is scenery: strictly behind the pages, including through one that
   is still fading in at the edge of the arc */
.ring-orbit { z-index: -1 !important; }

/* the bigger pages need the arc sitting lower, and the frame taller, or the
   page at the top of the wheel is cropped by the section's own overflow */
.ring { height: clamp(560px, 64vw, 820px); }
.ring-track, .ring-orbit { top: calc(100% + var(--r, 700px) - 48%); }

/* the cylinder takes the extra height instead of the sphere losing it */
.tglobe-wrap { aspect-ratio: 3 / 4; }


/* ============================================================
   Round six — the wheel rebuilt, and the globe at full size
   ============================================================ */

/* The pages are no longer hung off a rotating track. The track is a single
   point on the arc's crown; JS places each page relative to it from its
   distance to the page being read, so a position is recomputed, never
   accumulated, and a page cannot rotate past its clamp however far you drag. */
.ring { height: clamp(560px, 58vw, 800px); }
.ring-track {
  left: 50%; top: var(--cy, 46%);
  width: 0; height: 0; z-index: 2 !important;
}
.rc {
  left: 0; top: 0; z-index: 2;
  width: clamp(280px, 32vw, 470px);
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%);           /* JS writes the real one */
  transition: none;
}
.rc img { transform: none; }
.rc:hover img, .rc.on img { transform: translateY(-6px); }
.rc.on img { box-shadow: 0 44px 110px rgba(0,0,0,.85), 0 0 0 1px rgba(252,71,120,.4); }

/* the rim is the same arc the pages stand on, and strictly beneath them */
.ring-orbit {
  top: calc(var(--cy, 46%) + var(--r, 2900px));
  z-index: 0 !important;
}

/* The globe is a full circle again, at the size it was before. The canvas is
   drawn square, so it keeps a 1:1 box and the cylinder grows around it —
   that is where the two labels live, clear of the sphere. */
.tglobe-wrap { aspect-ratio: 17 / 25; max-width: 340px; }
.tglobe-top { top: 4.5%; }
.tglobe-cap { bottom: 4%; }

/* the community banner is a card, so it keeps air on both sides */
.e-join { max-width: min(calc(var(--maxw) - var(--gutter) * 4), calc(100% - var(--gutter) * 4)); }

/* the FAQ needed room above it */
.e-faq { padding-top: calc(clamp(32px, 4.5vw, 65px) + 64px); }

/* headroom for the page at the crown of the arc */
.ring { height: clamp(580px, 60vw, 850px); }

/* v2.css zeroes #faq's top padding by id, which outranks a class */
body.eb2 #faq { padding-top: calc(clamp(32px, 4.5vw, 65px) + 64px); }


/* ============================================================
   Round seven
   ============================================================ */

/* The globe is a 1:1 disc again — the tall cylinder was what read as an
   ellipse. It is simply bigger now, so the sphere is larger than it ever
   was while both labels still clear it. */
.tglobe-wrap {
  aspect-ratio: 1 / 1; max-width: 400px; border-radius: 50%;
  display: flex; align-items: center;
}
.tglobe { width: 100%; height: auto; aspect-ratio: 1 / 1; }
.tglobe-top { top: 6%; }
.tglobe-cap { bottom: 3%; }

/* the quotes can be dragged up and down to step through them */
.tcards { cursor: grab; touch-action: pan-y; }
.tcards.is-drag { cursor: grabbing; }

/* the community banner sits well in from both edges */
/* 120px of air each side on a wide screen, scaling down so it never
   squeezes the banner to a sliver on a phone */
.e-join { max-width: min(calc(var(--maxw) - 240px), calc(100% - 2 * clamp(20px, 8.4vw, 120px))); }

/* The disc carries the labels, so it has to be bigger than the sphere plus
   its tick ring. Widening the column buys that room: the sphere ends up
   larger than it has ever been and nothing sits on top of it. */
.tstage { grid-template-columns: minmax(250px, .80fr) 1.20fr auto; }
.tglobe-wrap { max-width: 480px; }
.tglobe-top { top: 5%; }
.tglobe-cap { bottom: 2%; }


/* ============================================================
   Round eight
   ============================================================ */

/* the pages come down about 8%, so the middle one sits in its frame rather
   than filling it */
.rc { width: clamp(258px, 29.5vw, 434px); }

/* ============================================================
   Pricing v2: the saving on the left; on the right, the contents
   as numbers and an edition track that shows the book keeps
   updating like software. Text on the pink card stays #121212.
   ============================================================ */
.bx-save { display: inline-block; margin: 0 0 16px; padding: 7px 13px 6px; border-radius: 999px;
  background: var(--cursor); color: #121212; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; transform: rotate(-4deg); }

.bx-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  width: 100%; margin-top: 26px; }
.bx-stat { padding: 16px 14px 14px; border-radius: 18px; background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.3);
  transition: transform .45s var(--ease), background .45s var(--ease); }
.bx-stat:hover { transform: translateY(-3px); background: rgba(255,255,255,.26); }
.bx-stat b { display: block; font-family: var(--display); font-weight: 400; color: #121212;
  font-size: clamp(34px, 3.4vw, 52px); line-height: .9; letter-spacing: -.05em; }
.bx-stat span { display: block; margin-top: 10px; font-size: 13px; line-height: 1.35; color: rgba(0,0,0,.72); }
.bx-plus { grid-column: 1 / -1; margin: 8px 0 0; font-size: 14px; color: rgba(0,0,0,.72); }

.bx-ed { width: 100%; margin-top: 18px; padding: 22px 22px 20px; border-radius: 22px;
  background: #121212; color: #fff; }
.bx-ed-t { margin: 0; font-family: var(--display); font-weight: 400; color: #fff;
  font-size: clamp(22px, 2vw, 28px); line-height: 1.05; letter-spacing: -.03em; }
.bx-ed-s { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: rgba(255,255,255,.66); }

/* the rail is dashed ahead of you and solid pink behind; the solid part
   draws itself the first time the card comes into view */
.bx-ed-track { position: relative; list-style: none; margin: 22px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bx-ed-track::before { content: ""; position: absolute; left: 6px; right: 0; top: 6px; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 4px, transparent 4px 9px); }
.bx-ed-track::after { content: ""; position: absolute; left: 6px; top: 5px; width: 25%; height: 3px;
  border-radius: 3px; background: var(--cursor); transform-origin: left center; transform: scaleX(0);
  transition: transform 1.1s var(--ease) .25s; }
.bx-ed.is-in .bx-ed-track::after { transform: scaleX(1); }
.bx-ed-track li { position: relative; padding-top: 24px; min-width: 0; }
.bx-ed-track i { position: absolute; left: 0; top: 0; z-index: 1; width: 13px; height: 13px;
  border-radius: 50%; background: #121212; border: 1.5px solid rgba(255,255,255,.45); }
.bx-ed-track .is-past i, .bx-ed-track .is-now i { background: var(--cursor); border-color: var(--cursor); }
.bx-ed-track .is-now i::after { content: ""; position: absolute; inset: -1.5px; border-radius: 50%;
  border: 1.5px solid var(--cursor); animation: bx-ping 2.4s var(--ease) infinite; }
@keyframes bx-ping { 0% { transform: scale(1); opacity: .8; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
.bx-ed-track b { display: block; font-weight: 400; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: #fff; }
.bx-ed-track span { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.3; color: rgba(255,255,255,.55); }
.bx-ed-track .is-now span { color: var(--cursor); }
.bx-ed-track li:not(.is-past):not(.is-now) span { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .bx-ed-track::after { transform: scaleX(1); transition: none; }
  .bx-ed-track .is-now i::after { animation: none; opacity: 0; }
  .bx-stat { transition: none; }
}
@media (max-width: 560px) {
  .bx-stat { padding: 14px 10px 12px; }
  .bx-stat span { font-size: 12px; }
  .bx-ed { padding: 20px 16px 18px; }
}
