/* Conquer English — the bookstore, and the tab that points at it. */

.storewrap{max-width:68rem}
.storewrap > header{max-width:42rem;margin-inline:auto}
.storewrap .editions{margin-top:var(--s5)}
/* the covers get the full width; the prose keeps a column you can read */
.storewrap > .card,.storewrap > .pager{max-width:46rem;margin-inline:auto;width:100%}

/* the eleven chapters, as a list of what you are buying */
.stlist{list-style:none;margin:var(--s3) 0 0;padding:0;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 var(--s4)}
.stlist li{display:flex;align-items:baseline;gap:12px;padding:9px 0;
  border-bottom:1px solid var(--hair-soft);font-size:.92rem;color:var(--muted)}
.stlist li b{font-family:var(--display);font-weight:400;font-size:1.05rem;
  color:var(--gold);flex:none;width:1.9rem;font-variant-numeric:tabular-nums}
@media (max-width:620px){ .stlist{grid-template-columns:1fr} }
.stgrid .hint{margin-top:var(--s3)}
.stgrid .hint a{color:var(--gold);border-bottom:1px solid var(--gold-dim);text-decoration:none}

/* =======================================================================
   The bookstore tab. It lives in the bottom-left corner, comes up when the
   page has settled, opens itself once so nobody can miss it, then folds back
   to a small pill. Hovering opens it again; the cross puts it away for good
   in this browser. The corner is the one place a floating thing can open
   without landing on top of what somebody is reading.
   ======================================================================= */
.shoptab{position:fixed;left:20px;bottom:20px;z-index:35;
  transform:translateY(calc(100% + 28px));
  transition:transform .6s cubic-bezier(.2,.9,.24,1)}
.shoptab.in{transform:translateY(0)}

/* collapsed: a pill */
.shoptab .spine{display:flex;align-items:center;gap:10px;padding:11px 16px;cursor:pointer;
  background:linear-gradient(140deg,var(--raise),var(--sunk));
  border:1px solid var(--hair);position:relative;overflow:hidden;
  font-family:var(--ui);color:var(--gold)}
.shoptab .spine .dia{width:9px;height:9px;transform:rotate(45deg);
  border:1px solid var(--gold);flex:none}
.shoptab .spine .vt{font-size:var(--lbl);letter-spacing:.24em;text-transform:uppercase;
  font-weight:600;white-space:nowrap}
.shoptab .spine:hover{border-color:var(--gold)}
/* the sweep that makes somebody look */
.shoptab .spine::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg,transparent 38%,color-mix(in srgb,var(--gold) 42%,transparent),transparent 62%);
  transform:translateX(-130%)}
.shoptab.look .spine::after{animation:shopSweep 1.4s ease-in-out 2}
@keyframes shopSweep{to{transform:translateX(130%)}}
.shoptab.look .spine,.shoptab.open .spine{box-shadow:0 0 30px -4px color-mix(in srgb,var(--gold) 40%,transparent)}

/* open: the card grows upward out of the pill */
.shoptab .card2{position:absolute;left:0;bottom:calc(100% + 8px);width:290px;
  background:var(--raise);border:1px solid var(--hair);
  transform-origin:0 100%;transform:translateY(10px) scale(.96);opacity:0;
  pointer-events:none;visibility:hidden;
  transition:transform .4s cubic-bezier(.2,.9,.24,1),opacity .3s ease,visibility .4s}
.shoptab.open .card2{transform:none;opacity:1;pointer-events:auto;visibility:visible}
.shoptab .in2{padding:20px 20px 18px;position:relative}
.shoptab .in2 .eyebrow{font-size:var(--lbl)}
.shoptab .in2 h3{font-family:var(--display);font-weight:300;font-size:1.46rem;
  line-height:1.12;margin:9px 0 4px}
.shoptab .in2 h3 i{font-style:italic;color:var(--gold)}
.shoptab .in2 p{font-size:.78rem;color:var(--faint);line-height:1.55;margin:8px 0 0}
.shoptab .pz{display:flex;gap:20px;margin-top:14px;padding-top:12px;
  border-top:1px solid var(--hair-soft)}
.shoptab .pz b{display:block;font-family:var(--display);font-weight:300;font-size:1.32rem;
  color:var(--gold);line-height:1;font-variant-numeric:tabular-nums}
.shoptab .pz span{display:block;margin-top:4px;font-size:var(--lbl);letter-spacing:.14em;
  text-transform:uppercase;color:var(--faint)}
.shoptab .goin{display:block;margin-top:16px;text-align:center;border:1px solid var(--gold-dim);
  color:var(--gold);text-decoration:none;padding:9px;font-size:var(--lbl);
  letter-spacing:.18em;text-transform:uppercase}
.shoptab .goin:hover{border-color:var(--gold);background:color-mix(in srgb,var(--gold) 8%,transparent)}
.shoptab .x{position:absolute;top:6px;right:7px;width:22px;height:22px;line-height:1;
  background:none;border:0;color:var(--faint);font-size:1rem;cursor:pointer;padding:0}
.shoptab .x:hover{color:var(--gold)}
/* 22px of glyph, 44px of target: the pad costs nothing visually and is
   the difference between dismissing the tab and reopening it by accident */
.shoptab .x::after{content:"";position:absolute;inset:-11px}

/* on a phone it is a bar along the bottom instead of a pill in the corner */
@media (max-width:900px){
  /* the bar sits over the page, so the page is given room to end above it */
  body.hasshop{padding-bottom:62px}
  .shoptab{left:0;right:0;bottom:0;transform:translateY(100%)}
  .shoptab.in{transform:translateY(0)}
  .shoptab .spine{display:none}
  .shoptab .card2{position:static;width:auto;border:0;border-top:1px solid var(--hair);
    transform:none;opacity:1;visibility:visible;pointer-events:auto;
    background:color-mix(in srgb,var(--raise) 96%,transparent);
    backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  .shoptab .in2{display:flex;align-items:center;gap:14px;
    padding:11px 14px calc(11px + env(safe-area-inset-bottom,0px))}
  .shoptab .in2 .eyebrow,.shoptab .in2 p{display:none}
  .shoptab .in2 h3{font-size:1.04rem;margin:0;flex:1;min-width:0}
  .shoptab .pz{margin:0;padding:0;border:0;gap:12px;flex:none}
  .shoptab .pz span{display:none}
  .shoptab .pz b{font-size:1rem}
  /* measured at 192x39 on an iPhone 12 — under the 44px floor, on the one
     control in the whole bar that leads to a sale */
  .shoptab .goin{margin:0;flex:none;padding:0 14px;min-height:44px;
    display:grid;place-items:center}
  /* In the bar the pad is useless: it reaches left across the Order link,
     which paints over it, so half the target is unreachable. A control in a
     flex row can just BE the right size instead of pretending to be. */
  .shoptab .x{position:relative;flex:none;margin:0;
    width:44px;height:44px;display:grid;place-items:center;font-size:1.1rem}
  .shoptab .x::after{content:none}
}
@media (max-width:560px){
  .shoptab .pz{display:none}
  .shoptab .in2 h3{font-size:.95rem;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
/* On a 320px screen "Volume One. Two ways in." broke into a five-line column
   beside the button — the first thing a reader on the smallest phone sees
   pinned to the bottom of every page. Below this width the bar stops trying
   to say two things at once and is just the way into the store. */
@media (max-width:480px){
  .shoptab .in2 h3{display:none}
  .shoptab .goin{flex:1;min-width:0}
}
@media (prefers-reduced-motion:reduce){
  .shoptab{transition:none}
  .shoptab .card2{transition:opacity .2s}
  .shoptab.look .spine::after{animation:none}
}


/* The open card is 290px wide in the bottom-left corner. Past about 1460px
   the centred text column clears it; below that the auto-open would land on
   top of what somebody is reading, which is the one thing the corner was
   chosen to avoid. So under that width the card opens only when the reader
   asks it to — hover, focus or tap — and the pill does the attracting on its
   own. Measured, not guessed: --page is 1120, so the column's left edge is
   (vw - 1120) / 2, and it clears 310px only once vw passes 1460. */
@media (min-width:901px) and (max-width:1459px){
  .shoptab.look:not(:hover):not(:focus-within) .card2{
    opacity:0;visibility:hidden;pointer-events:none;
    transform:translateY(10px) scale(.96)}
}
