/* Conquer English — the arena band.
   Shown on the front page once the reader has actually started: where they
   stopped, what the week looks like, and how long the board has left. A first
   visit never sees it, because a wall of zeroes is not a welcome. */

.arena{margin:4px 0 var(--s5)}
.arena .hello{display:flex;align-items:baseline;gap:14px;margin-bottom:var(--s3)}
.arena .hello h2{font-family:var(--display);font-weight:300;font-size:1.72rem;line-height:1}
.arena .hello .sp{flex:1}
.arena .hello .tag{font-size:.72rem;color:var(--faint)}
.arena .hello .tag b{color:var(--gold);font-weight:500;font-variant-numeric:tabular-nums}

.band{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:1px;
  background:var(--hair-soft);border:1px solid var(--hair-soft)}
.band .cell{background:var(--bg);padding:20px 22px 22px;min-width:0}
.band .cell.lead{background:
  radial-gradient(ellipse 90% 130% at 10% 105%,color-mix(in srgb,var(--gold) 11%,transparent),transparent 62%),var(--bg)}
.band .lab{font-size:.6rem;letter-spacing:.24em;text-transform:uppercase;color:var(--gold);
  font-weight:600;display:block;margin-bottom:12px}
.band .big{font-family:var(--display);font-weight:300;font-size:3.1rem;line-height:.95;
  letter-spacing:-.015em;font-variant-numeric:tabular-nums;display:block}
.band .big.g{color:var(--gold)}
.band .big small{font-size:.95rem;color:var(--faint);letter-spacing:.03em;margin-left:3px;
  font-family:var(--ui)}
.band .mid{font-family:var(--display);font-weight:300;font-size:2.05rem;line-height:1.12;
  display:block}
.band .und{font-size:.78rem;color:var(--faint);margin-top:10px;line-height:1.55}
.band .cta{display:inline-block;margin-top:16px;border:1px solid var(--gold-dim);
  color:var(--gold);text-decoration:none;padding:9px 18px;font-size:var(--lbl);
  letter-spacing:.18em;text-transform:uppercase}
.band .cta:hover{border-color:var(--gold);background:color-mix(in srgb,var(--gold) 7%,transparent)}

.week{display:flex;gap:5px;margin-top:2px}
.week i{flex:1;height:46px;border:1px solid var(--hair-soft);display:flex;
  flex-direction:column;align-items:center;justify-content:center;gap:5px;font-style:normal;
  font-size:var(--lbl);letter-spacing:.1em;text-transform:uppercase;color:var(--faint)}
.week i::before{content:"";width:7px;height:7px;transform:rotate(45deg);
  border:1px solid var(--gold-dim)}
.week i.hit::before{background:var(--gold);border-color:var(--gold)}
.week i.now{border-color:var(--gold-dim);background:color-mix(in srgb,var(--gold) 5%,transparent);color:var(--muted)}

@media (max-width:860px){
  .band{grid-template-columns:1fr 1fr}
  .band .cell.lead{grid-column:1/-1}
}
@media (max-width:560px){
  .band{grid-template-columns:1fr}
  .band .cell.lead{grid-column:1}
  .band .big{font-size:2.6rem}
}

/* ------------------------------------------------- the chapters, with work */
/* Eleven full-width rows left a hand's width of nothing between the title and
   the word on the right, and read as a stretched-out table rather than as the
   contents of a book. They are cards now: the number and the state on one
   line, the title under it, and how far in you are along the bottom. */
.grid.trained{grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;
  background:var(--hair-soft);border:1px solid var(--hair-soft)}
/* app.css lays a chapter row out sideways and, under 560px, tells the title
   and the station list to take a full line each (flex:1 0 100%). Those rules
   were written for a row. In a COLUMN flex box that is wrapping, a basis of
   100% is 100% of the HEIGHT — so the title filled the column and everything
   else wrapped into fresh columns beside it, throwing the page 450px wider
   than the phone. Hence nowrap, and the children's flex reset below. */
.grid.trained .chapcard{position:relative;display:flex;flex-direction:column;
  flex-wrap:nowrap;align-items:flex-start;gap:8px;background:var(--bg);
  padding:16px 18px 16px;border-bottom:0;min-height:122px;
  transition:background .18s,box-shadow .18s}
.grid.trained .chapcard:hover{padding-left:18px;background:var(--sunk)}
.grid.trained .chapcard > b,
.grid.trained .chapcard > span{flex:0 0 auto;order:0;max-width:100%}
.grid.trained .chapcard .num{width:auto;flex:none;letter-spacing:.2em}
.grid.trained .chapcard b{flex:none;font-size:1.26rem;line-height:1.22;
  padding-right:4.4rem}
.grid.trained .chapcard > span:not(.num):not(.cnt):not(.pr){display:none}
.grid.trained .chapcard .pr{display:flex;flex:0 0 auto;gap:3px;width:100%;margin:auto 0 0}
.grid.trained .chapcard .pr i{height:2px;flex:1;background:color-mix(in srgb,var(--gold-dim) 20%,transparent)}
.grid.trained .chapcard .pr i.f{background:var(--gold-dim)}
.grid.trained .chapcard .cnt{position:absolute;top:16px;right:18px;width:auto;margin:0;
  font-size:var(--lbl);letter-spacing:.14em;text-transform:uppercase;color:var(--faint);
  opacity:1;text-align:right}

/* the one you are in the middle of */
.grid.trained .chapcard.active{background:
  linear-gradient(150deg,color-mix(in srgb,var(--gold) 9%,transparent),transparent 64%),var(--bg);
  box-shadow:inset 0 0 0 1px var(--gold)}
.grid.trained .chapcard.active b,
.grid.trained .chapcard.active:hover b{color:var(--fg)}
.grid.trained .chapcard.active .cnt{color:var(--gold)}
.grid.trained .chapcard.active .pr i.f{background:var(--gold)}
.grid.trained .chapcard.full .cnt{color:var(--gold)}
.grid.trained .chapcard.full b{color:var(--muted)}

@media (max-width:620px){
  .grid.trained{grid-template-columns:1fr}
  .grid.trained .chapcard{min-height:0;padding:14px 15px}
  .grid.trained .chapcard b{font-size:1.16rem;padding-right:4.2rem}
  .grid.trained .chapcard .cnt{top:14px;right:15px}
}

/* ======================================================================
   Where these blocks sit on the front page.

   The front page is a named grid: every child must claim its own row, or it
   falls to order:0 / auto-placement and lands somewhere nobody chose. The
   editions block never claimed one, which is why on a phone the shop was
   rendering ABOVE the title of the book. Both it and the arena band are
   placed here, explicitly, in both layouts.
   ====================================================================== */

/* ---- phone and tablet ---- */
@media (max-width:999px){
  .wrap:has(> .grid) > .editions{order:2}
  .wrap:has(> .grid) > .arena{order:0}
  body.returning .wrap:has(> .grid) > .arena{order:2}
  body.returning .wrap:has(> .grid) > .grid{order:3}
  body.returning .wrap:has(> .grid) > .editions{order:5}
  body.returning .wrap:has(> .grid) > .compisle{order:4}
  body.returning .wrap:has(> .grid) > #stations{order:6}
  body.returning .wrap:has(> .grid) > footer{order:7}
  .arena{margin-bottom:var(--s4)}
}

/* ---- desktop ---- */
@media (min-width:1000px){
  /* a first visit keeps today's layout exactly: the shop in the reading
     column, the apparatus in the rail beside it */
  .wrap:has(> .grid) > .editions{grid-column:1;grid-row:4}
  body.returning .wrap:has(> .grid) > .arena{grid-column:1/-1;grid-row:4}
  body.returning .wrap:has(> .grid) > .grid{grid-column:1;grid-row:5}
  body.returning .wrap:has(> .grid) > #stations{grid-column:2;grid-row:5}
  body.returning .wrap:has(> .grid) > .editions{grid-column:1/-1;grid-row:6;
    margin-top:var(--s6)}
  body.returning .wrap:has(> .grid) > .compisle{grid-column:1/-1;grid-row:7}
  body.returning .wrap:has(> .grid) > footer{grid-row:8}
  /* the reader is back; the masthead does not need to introduce the site */
  body.returning .wrap:has(> .grid) > header{margin-bottom:var(--s2)}
  body.returning .wrap:has(> .grid) > .sig{display:none}
}

/* app.css sets the row padding and the title size for the front page grid with
   a heavier selector than a plain class, so the card form has to match it */
@media (min-width:1000px){
  .wrap:has(> .grid) > .grid.trained .chapcard{padding:16px 18px 16px}
  .wrap:has(> .grid) > .grid.trained .chapcard:hover{padding-left:18px}
  .wrap:has(> .grid) > .grid.trained .chapcard b{font-size:1.3rem}
}

/* ---- the chapters page ----
   On the front page the station list steps aside for the progress bar, because
   a reader already knows what is in a chapter. On the chapters page the reader
   may never have seen one, so both are shown. */
.chapwrap{max-width:68rem}
.chapwrap > header{max-width:42rem;margin-inline:auto}
.chapwrap > .card{max-width:46rem;margin-inline:auto;width:100%}
.chapwrap > .pager{max-width:46rem;margin-inline:auto;width:100%}
.chaplist{margin-top:var(--s4)}
.grid.trained.full{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.trained.full .chapcard{min-height:148px}
.grid.trained.full .chapcard > span:not(.num):not(.cnt):not(.pr){
  display:block;font-size:var(--lbl);letter-spacing:.14em;text-transform:uppercase;
  color:var(--faint);opacity:.75;text-align:left;margin-top:-2px}
@media (max-width:900px){ .grid.trained.full{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width:620px){ .grid.trained.full{grid-template-columns:1fr}
  .grid.trained.full .chapcard{min-height:0} }

.kinds{margin:var(--s3) 0 0}
.kinds dt{font-family:var(--display);font-size:1.18rem;color:var(--fg);margin-top:18px}
.kinds dd{margin:6px 0 0;color:var(--muted);font-size:.94rem;line-height:1.7;max-width:60ch}

/* the twelfth cell: where the volume leads */
.grid.trained .chapcard.endtile{background:
  linear-gradient(200deg,color-mix(in srgb,var(--gold) 7%,transparent),transparent 66%),var(--sunk)}
.grid.trained .chapcard.endtile .num{color:var(--gold)}
.grid.trained .chapcard.endtile b{color:var(--muted)}
.grid.trained .chapcard.endtile:hover b{color:var(--gold)}

/* =======================================================================
   The front page.
   It no longer carries the chapters or the shop — each has a page of its
   own — so what is left is: who this is, where you are, and the two ways
   in. Without a .grid child the front page falls out of app.css's own
   two-column rules and is a plain column again, which is what it wants.
   ======================================================================= */
.wrap:has(> .routes){max-width:62rem}
.wrap:has(> .routes) > header{max-width:40rem;margin-inline:auto}

.routes{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin-top:var(--s5);
  background:var(--hair-soft);border:1px solid var(--hair-soft)}
.route{display:flex;flex-direction:column;align-items:flex-start;gap:9px;
  background:var(--bg);padding:26px 26px 24px;text-decoration:none;min-height:230px;
  transition:background .2s}
.route:hover{background:var(--sunk)}
.route.shop{background:
  radial-gradient(ellipse 90% 120% at 100% 0%,color-mix(in srgb,var(--gold) 10%,transparent),transparent 62%),var(--bg)}
.route.shop:hover{background:
  radial-gradient(ellipse 90% 120% at 100% 0%,color-mix(in srgb,var(--gold) 14%,transparent),transparent 62%),var(--sunk)}
.route b{font-family:var(--display);font-weight:300;font-size:2rem;line-height:1.08;
  color:var(--fg);letter-spacing:-.012em}
.route:hover b{color:var(--gold)}
.route .rsub{font-size:.88rem;line-height:1.6;color:var(--muted);max-width:30em}
.route .rprice{margin-top:2px;font-size:var(--lbl);letter-spacing:.16em;text-transform:uppercase;
  color:var(--faint)}
.route .rprice i{font-style:normal;font-family:var(--display);font-size:1.18rem;
  letter-spacing:0;color:var(--gold);font-variant-numeric:tabular-nums}
.route .rgo{margin-top:auto;padding-top:14px;font-size:var(--lbl);letter-spacing:.18em;
  text-transform:uppercase;color:var(--gold)}
.route:hover .rgo{color:var(--gold)}
.route .rgo::after{content:" \2192"}
@media (max-width:720px){
  .routes{grid-template-columns:1fr}
  .route{min-height:0;padding:22px}
  .route b{font-size:1.72rem}
}


