@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: Figtree;
  src: url("/assets/fonts/figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --p-bg: #f8f5ed;
  --p-surface: #e6e8df;
  --p-ink: #20221d;
  --p-muted: #64645e;
  --p-accent: #215341;
  --p-accent-ink: #f8f5ed;
  --p-action: #215341;
  --p-action-ink: #f8f5ed;
  --p-inv-bg: #20221d;
  --p-inv-surface: #2c2e29;
  --p-inv-ink: #f8f5ed;
  --p-inv-muted: #9e9d96;
  --p-inv-accent: #f8f5ed;
  --p-inv-accent-ink: #20221d;
  --p-inv-action: #f8f5ed;
  --p-inv-action-ink: #20221d;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-text: "Figtree", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.03em;
  --display-tracking-xl: -0.04em;
  --display-stretch: 96%;
}
:root {
  --paper: var(--p-bg);
  --ink: var(--p-ink);
  --teal: var(--p-action);
  --dark: #193c31;
  --amber: #e9b73e;
  --surface: var(--p-surface);
  --muted: #555b50;
  --line: #cecfc1;
  --sans: var(--font-text);
  --display: var(--font-display);
  --serif: Baskerville, "Iowan Old Style", Georgia, serif;
  --trim: clamp(20px, 4.5vw, 82px);
  font-family: var(--sans);
}
.story-store {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}
.story-store .mast {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.story-store .mast-in,
.story-transport .transport-inner {
  margin-inline: auto;
  width: min(1440px, calc(100% - 2 * var(--trim)));
}
.story-store .mast-in {
  min-height: clamp(57px, 8vh, 82px);
  gap: 20px;
}
.story-store .mast .brand {
  font: 650 clamp(23px, 1.9vw, 32px)/1 var(--display);
  letter-spacing: -0.05em;
  gap: 9px;
}
.story-store .mast .brand img {
  width: 31px;
  height: 31px;
}
.story-store .mast .nav-end {
  gap: 18px;
}
.story-store .mast-in nav {
  gap: clamp(18px, 1.8vw, 33px);
}
.story-store .mast nav a {
  font: 530 14px/1.2 var(--sans);
  color: var(--ink);
}
.story-store :is(.mast nav a, .exercise-link):hover {
  text-underline-offset: 5px;
}
.story-store .buy,
.story-store .buy.cream {
  background: var(--teal);
  color: #fffdf5;
  border: 1px solid transparent;
  border-radius: 4px;
  box-shadow: none;
  font-family: var(--sans);
  font-weight: 620;
  transition:
    background 180ms,
    transform 170ms;
}
.story-store .buy:hover:where(:not(:disabled)) {
  background: var(--dark);
  transform: translateY(-2px);
}
.story-store .buy:active {
  transform: translateY(1px);
}
.nav-buy-short {
  display: none;
}
.story-store .nav-buy {
  padding: 11px 18px;
  font-size: 14px;
  min-height: 43px;
}
.story-store .test-label {
  color: #715419;
}
.story-store .skip:focus {
  z-index: 30;
  color: var(--ink);
}
.story-store :is(button, a, input, summary):focus-visible {
  outline: 3px solid #995000;
  outline-offset: 3px;
}
.story-store #book {
  display: block;
  background: var(--paper);
  color: var(--ink);
  min-height: 0;
  margin: 0;
  border: 0;
  padding: 0;
}
.story-ready #story {
  background: var(--paper);
}
.book-launch {
  display: grid;
  grid-template-columns: minmax(0, 0.93fr) minmax(0, 1.07fr);
  align-items: stretch;
  width: min(1440px, calc(100% - 2 * var(--trim)));
  height: 100%;
  min-height: 0;
  gap: clamp(28px, 4.5vw, 88px);
  padding-block: clamp(12px, 3.45cqh, 32px);
}
.offer-copy > * {
  order: 0;
}
.story-store #book .offer-copy > h1,
.story-store #book .offer-copy > .hero-actions {
  order: 0;
}
.offer-copy {
  display: flex;
  align-self: center;
  flex-direction: column;
  align-items: start;
  min-width: 0;
}
.story-store #book .launch-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  min-height: 36px;
  padding: 0;
  text-transform: uppercase;
  color: var(--teal);
  font: 550 clamp(10px, 0.8vw, 13px)/1.2 var(--mono);
  letter-spacing: 0.1em;
}
.launch-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--teal);
}
.launch-kicker:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}
.story-store #book h1 {
  margin: clamp(12px, 2.6cqh, 28px) 0 clamp(16px, 3.8cqh, 40px);
  font: 520 clamp(55px, min(7.55vw, 14cqh), 121px)/0.94 var(--display);
  font-stretch: 96%;
  letter-spacing: -0.052em;
  word-spacing: 0.012em;
  color: var(--ink);
}
#book-title > span {
  display: block;
  white-space: nowrap;
}
#book-title em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  color: var(--teal);
  letter-spacing: -0.055em;
  margin-inline-start: 0.014em;
}
.story-store #book .hero__lead {
  color: #41483f;
  font: 440 clamp(16px, 1.35vw, 22px)/1.45 var(--sans);
  max-width: 34ch;
}
.story-store #book .hero-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px clamp(12px, 1.8vw, 30px);
  margin: clamp(20px, 4.7cqh, 43px) 0 0;
}
.story-store #book .hero-actions .buy {
  padding: 15px clamp(15px, 1.55vw, 26px);
  font-size: clamp(14px, 1.08vw, 17px);
  line-height: 1.2;
  gap: 20px;
}
.story-store #book .hero-actions .buy span {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}
.exercise-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: clamp(14px, 1.08vw, 17px);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #909584;
  min-height: 44px;
}
.exercise-link span {
  display: inline-block;
  transition: transform 0.18s;
}
.exercise-link:hover span {
  transform: translateX(3px);
}
.edition-facts {
  display: flex;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: clamp(26px, 6.8cqh, 65px) 0 0;
  gap: 0;
}
.edition-facts li {
  display: grid;
  align-content: start;
  align-items: center;
  gap: 7px;
  padding: 0 clamp(13px, 1.7vw, 26px);
  border-left: 1px solid #bac1b2;
}
.edition-facts li:first-child {
  border: 0;
  padding-left: 0;
}
.edition-facts li:last-child {
  padding-right: 0;
}
.edition-facts strong {
  font: 530 clamp(24px, 2.25vw, 34px)/1 var(--display);
  letter-spacing: -0.07em;
}
.edition-facts span {
  font-size: clamp(11px, 0.92vw, 14px);
  line-height: 1.2;
  color: var(--muted);
}
.edition-facts .icon {
  width: clamp(23px, 2.25vw, 34px);
  height: clamp(23px, 2.25vw, 34px);
  stroke-width: 1.35px;
}
.story-store #book .cover-gallery {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  align-self: stretch;
  isolation: isolate;
  overflow: hidden;
  border-radius: 4px;
  background: var(--amber);
  color: var(--ink);
  container-type: size;
}
/* This frame is the physical set for the digital cover. Its coordinates also
   provide the start and end positions for the move between book and shelf. */
.story-store #book .book-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #d9ac43;
  overflow: hidden;
  aspect-ratio: auto;
  perspective: 1450px;
}
.story-store #book .set-art {
  inset: 0;
  background-position: center;
  background-size: cover;
}
.story-store #book .set-art::after {
  content: none;
}
.story-store #book .set-cover {
  background-image: url("/assets/saffron-studio.jpg");
}
.story-store #book .set-ledger {
  background: #d6decf;
}
.story-store #book .set-calendar {
  background: #dda980;
}
.story-store #book .set-plan {
  background: #bdced2;
}
.story-ready #book .book-stage:not(.interior, .inspecting) .book-position {
  top: 52%;
  left: 51%;
  width: auto;
  height: min(68cqh, 81cqw);
  --depth: clamp(13px, 2.9cqw, 25px);
  --half: clamp(6.5px, 1.45cqw, 12.5px);
}
.story-store #book .book-stage.interior .book-position {
  width: auto;
  height: min(62cqh, 56cqw);
  left: 71%;
  top: 51%;
}
.story-store #book .book-stage.inspecting .book-position {
  width: auto;
  height: min(117cqh, 134cqw);
  left: 50%;
  top: 51%;
}
.story-store #book .cast-shadow {
  top: 84%;
  left: 53%;
  width: min(48cqw, 320px);
  height: 4.8%;
  opacity: 0.47;
  filter: blur(9px);
  background: #4e3a21;
}
.book-view-picker,
.preview-tools,
.book-bar {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
}
.book-view-picker {
  top: clamp(12px, 2cqw, 20px);
  left: clamp(12px, 2cqw, 20px);
  gap: 0;
  background: #f8f5ed;
  padding: 3px;
  border-radius: 5px;
}
.book-view-picker button {
  font: 550 clamp(12px, 2cqw, 14px)/1 var(--sans);
  background: transparent;
  color: #374635;
  height: 35px;
  padding: 0 clamp(8px, 2cqw, 15px);
  border-radius: 3px;
}
.book-view-picker button[aria-pressed="true"] {
  background: var(--teal);
  color: var(--paper);
}
.book-view-picker button:hover:not([aria-pressed="true"]) {
  background: var(--surface);
}
.preview-tools {
  top: clamp(12px, 2cqw, 20px);
  right: clamp(12px, 2cqw, 20px);
  gap: 6px;
}
#book .preview-tools button,
#book .book-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
}
#book .preview-tools button {
  width: 40px;
  height: 40px;
}
#book .preview-tools button[aria-pressed="true"] {
  background: var(--teal);
  color: var(--paper);
}
.book-bar {
  inset: auto clamp(12px, 2cqw, 20px) clamp(12px, 2cqw, 20px);
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.book-bar > * {
  pointer-events: auto;
}
.book-stepper {
  display: flex;
  align-items: center;
  color: var(--ink);
  background: var(--paper);
  padding: 0 2px;
  border-radius: 4px;
}
#book .book-bar .book-stepper button {
  min-height: 40px;
  width: 36px;
  font-size: 18px;
}
#book .book-bar .stage-count {
  font: 11px/1 var(--mono);
  border: 0;
  padding: 0 4px;
  white-space: nowrap;
}
#book .book-bar .open-volume {
  gap: 10px;
  font-weight: 600;
  padding: 0 12px;
  min-height: 40px;
  background: var(--ink);
  color: var(--paper);
}
#book .book-bar .open-volume .icon {
  width: 17px;
  height: 17px;
}
#book .book-bar button:hover,
#book .preview-tools button:hover {
  background: var(--surface);
  color: var(--ink);
}
.story-ready .story-transport {
  padding-inline: 0;
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.story-transport .transport-inner {
  min-height: 52px;
}
.transport-hint {
  font-family: var(--sans);
  font-size: 13px;
}
.transport-hint > span:first-child {
  color: var(--teal);
}
.transport-controls button {
  width: 38px;
  height: 38px;
  border-color: #aeb5a7;
}
.story-track a span {
  background: #ced1c3;
  height: 3px;
}
.story-track a[aria-current] span {
  background: var(--teal);
}
.about-book {
  border-radius: 4px;
}
.about-book h2 {
  font: 500 clamp(31px, 3vw, 47px)/1.08 var(--display);
  letter-spacing: -0.05em;
}

@media (min-width: 801px) and (max-width: 1050px) {
  .story-store .mast-in {
    width: calc(100% - 2 * var(--trim));
    gap: 10px;
  }
  .story-store .mast-in nav {
    gap: 12px;
  }
  .story-store .mast-in nav a {
    font-size: 13px;
  }
  .story-store .mast .nav-end {
    gap: 10px;
  }
  .story-store .mast .brand {
    font-size: 23px;
  }
  .story-store #book .hero-actions {
    gap: 5px 13px;
  }
}
@media (max-width: 800px) {
  .story-store .mast-in {
    min-height: 59px;
  }
  .story-store .mast .mobile-nav {
    padding: 8px var(--trim) 18px;
    background: var(--paper);
  }
  .story-store .mast .mobile-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
@media (max-width: 850px) and (min-height: 720px), (max-width: 660px) {
  .book-launch {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(12px, 2cqh, 22px);
    padding-block: clamp(12px, 2.5cqh, 34px) 12px;
  }
  .offer-copy {
    align-self: auto;
    width: 100%;
  }
  .story-store #book .launch-kicker {
    min-height: 24px;
    font-size: 10px;
  }
  .story-store #book h1 {
    margin: 5px 0 12px;
    font-size: clamp(45px, min(9vw, 10cqh), 82px);
    line-height: 0.93;
  }
  #book-title > span {
    display: inline;
    white-space: normal;
  }

  .story-store #book .hero__lead {
    max-width: 48ch;
    font-size: clamp(15px, 2vw, 19px);
    line-height: 1.35;
  }
  .story-store #book .hero-actions {
    margin: 13px 0 0;
    gap: 9px 18px;
  }
  .story-store #book .hero-actions .buy {
    padding: 11px 16px;
    min-height: 44px;
    font-size: 15px;
    gap: 14px;
  }
  .edition-facts {
    margin: 10px 0 0;
    gap: 0;
    width: 100%;
  }
  .edition-facts span {
    white-space: nowrap;
  }
  .edition-facts li {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
  }
  .edition-facts strong,
  .edition-facts span {
    font: 500 12px/1.15 var(--sans);
    color: var(--muted);
    letter-spacing: 0;
  }
  .edition-facts .icon {
    width: 14px;
    height: 14px;
  }
  .story-store #book .book-stage:not(.interior, .inspecting) .book-position {
    height: min(69cqh, 80cqw);
    top: 52%;
  }
  .story-store #book .book-stage.interior .book-position {
    height: min(62cqh, 55cqw);
  }
  .book-view-picker {
    top: 10px;
    left: 10px;
  }
  .preview-tools {
    top: 10px;
    right: 10px;
  }
  .book-bar {
    inset: auto 10px 10px;
  }
  .story-transport .transport-inner {
    min-height: 46px;
  }
}
@media (max-width: 640px) {
  :root {
    --trim: clamp(14px, 4.5vw, 23px);
  }
  .story-store .mast .brand {
    font-size: 23px;
    gap: 7px;
  }
  .story-store .mast .brand img {
    width: 26px;
    height: 26px;
  }
  .story-store .mast .nav-end {
    gap: 7px;
  }
  .story-store .mast .nav-buy {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 36px;
  }
  .story-store .mast-in {
    min-height: 54px;
  }
  .story-store .mast .test-label:not(:empty) {
    left: 34px;
    bottom: 2px;
    font: 8px/1 var(--mono);
  }
  .story-store .mast .menu {
    height: 44px;
    width: 32px;
  }
  .story-store #book h1 {
    font-size: clamp(45px, 12.3vw, 72px);
  }
  #book-title > span {
    display: block;
    white-space: nowrap;
  }
  #book-title > span + span::before {
    content: none;
  }
  .story-store #book .hero__lead {
    max-width: 45ch;
    font-size: 15px;
  }
  .story-store .transport-hint {
    font-size: 10px;
  }
  .story-store .transport-controls button {
    width: 34px;
    height: 36px;
  }
  .story-store #book .hero-actions {
    gap: 4px 12px;
    width: 100%;
  }
  .story-store #book .hero-actions .buy {
    font-size: 14px;
    gap: 6px;
    padding: 10px 11px;
  }
  .story-store .exercise-link {
    font-size: 13px;
    gap: 4px;
  }
  .book-view-picker button {
    height: 36px;
    padding-inline: 8px;
  }
  #book .preview-tools button {
    width: 35px;
    height: 40px;
  }
  #book .book-bar .book-stepper button {
    width: 34px;
  }
}
@media (max-width: 390px) and (max-height: 685px) {
  .story-store .mast-in {
    min-height: 51px;
    gap: 4px;
  }
  .story-store .mast .brand {
    font-size: 20px;
  }
  .story-store .mast .nav-end {
    gap: 3px;
  }
  .story-store .mast .nav-buy {
    font-size: 11px;
  }
  .book-launch {
    padding-block: 6px 8px;
    gap: 8px;
  }
  .story-store #book h1 {
    font-size: 38px;
    margin: 3px 0 6px;
  }
  .story-store #book .hero__lead {
    font-size: 13px;
    line-height: 1.3;
  }
  .story-store #book .hero-actions {
    margin-top: 6px;
    gap: 3px 10px;
  }
  .story-store #book .hero-actions .buy {
    min-height: 37px;
    font-size: 12px;
    padding: 8px 10px;
    gap: 7px;
  }
  .story-store .exercise-link {
    min-height: 37px;
    font-size: 12px;
    gap: 4px;
  }
  .edition-facts {
    margin-top: 5px;
  }
  .edition-facts span,
  .edition-facts strong {
    font-size: 10px;
  }
  .edition-facts li {
    padding: 0 7px;
  }
  .edition-facts li:first-child {
    padding-left: 0;
  }
  .book-view-picker,
  .preview-tools {
    top: 6px;
  }
  .book-view-picker {
    left: 6px;
  }
  .preview-tools {
    right: 6px;
    gap: 3px;
  }
  .book-view-picker button {
    height: 30px;
    padding-inline: 6px;
  }
  #book .preview-tools button {
    width: 30px;
    height: 36px;
  }
  .book-bar {
    inset: auto 6px 5px;
  }
  #book .book-bar .open-volume,
  #book .book-bar .book-stepper button {
    min-height: 32px;
  }
  .story-store #book .book-stage:not(.interior, .inspecting) .book-position {
    height: min(62cqh, 76cqw);
  }
  .story-transport .transport-inner {
    min-height: 41px;
  }
}
@media (max-height: 520px) and (min-width: 641px) {
  .story-store #book .hero__lead {
    font-size: 14px;
  }
  .story-store #book h1 {
    font-size: min(6.5vw, 13cqh);
    margin-block: 5px 9px;
  }
  .story-store #book .hero-actions {
    margin-top: 7px;
  }
  .edition-facts {
    margin-top: 10px;
  }
  .edition-facts li {
    gap: 2px;
  }
  .edition-facts strong {
    font-size: 21px;
  }
  .edition-facts .icon {
    width: 21px;
    height: 21px;
  }
  .story-store .mast-in {
    min-height: 44px;
  }
}

.story-store #book-stage:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: -5px;
}
.phone-scene-picker,
.phone-view-picker {
  display: none;
}
@media (max-width: 640px) {
  .phone-view-picker {
    display: block;
    position: absolute;
    z-index: 2;
    left: 8px;
    top: 8px;
  }
  .phone-view-picker select,
  .phone-scene-picker select {
    color: var(--ink);
    font: 570 13px/1 var(--sans);
    border: 0;
    border-radius: 4px;
    background-color: var(--paper);
    min-height: 44px;
    cursor: pointer;
    padding: 0 8px;
  }
  #book .book-view-picker {
    display: none;
  }
  #book .preview-tools {
    top: 8px;
    right: 8px;
    gap: 4px;
  }
  #book .preview-tools button {
    width: 44px;
    height: 44px;
  }
  #book .book-bar .book-stepper button {
    width: 44px;
    height: 44px;
  }
  #book .book-bar .open-volume {
    min-height: 44px;
  }
  .story-transport .story-track {
    display: none;
  }
  .story-transport .transport-inner {
    grid-template-columns: 1fr auto;
    min-height: 48px;
    gap: 4px;
    padding-block: 0;
  }
  .story-transport .transport-hint {
    align-self: center;
  }
  .story-transport .transport-controls {
    grid-column: 2;
    grid-row: 1;
    gap: 4px;
  }
  .phone-scene-picker {
    display: block;
  }
  .phone-scene-picker select {
    font-size: 12px;
    max-width: 135px;
    padding-left: 0;
  }
  .transport-controls [data-story-status] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .story-store .transport-controls button {
    width: 44px;
    height: 44px;
  }
}
@media (max-width: 375px) and (max-height: 650px) {
  .phone-view-picker {
    top: 4px;
    left: 4px;
  }
  #book .preview-tools {
    top: 4px;
    right: 4px;
  }
  #book .book-bar {
    bottom: 4px;
    left: 4px;
    right: 4px;
  }
  .story-store #book .book-stage:not(.interior, .inspecting) .book-position {
    height: min(57cqh, 75cqw);
  }
}
@media (max-width: 920px) {
  .story-store .mast-in > nav {
    display: none;
  }
  .story-store .mast .menu {
    display: grid;
    width: 44px;
    height: 44px;
    place-content: center;
    gap: 5px;
    background: transparent;
  }
  .story-store .mast .menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--ink);
  }
  .story-store .mast .mobile-nav:not([hidden]) {
    display: grid;
    position: absolute;
    inset: 100% 0 auto;
    gap: 0;
    max-height: calc(100dvh - 60px);
    overflow-y: auto;
    padding: 8px var(--trim) 18px;
    box-shadow: 0 10px 20px #20221d18;
    background: var(--paper);
  }
  .story-store .mast .mobile-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
  }
  .story-store .mast .brand,
  .story-store .mast .nav-buy {
    min-height: 44px;
  }
  .story-store .mast .test-label {
    pointer-events: none;
  }
}
@media (max-width: 370px) {
  .story-store .mast .brand {
    font-size: 19px;
    gap: 4px;
  }
  .story-store .mast .brand img {
    width: 21px;
    height: 21px;
  }
  .story-store .mast .nav-end {
    gap: 2px;
  }
  .story-store .mast .nav-buy {
    padding-inline: 7px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .nav-buy-long {
    display: none;
  }
  .nav-buy-short {
    display: inline;
  }
}
