/* Look inside the year: the 36 weeks in order, each with its scene as the year at a glance shows it, with Sam's map
   lying on the kitchen table beside the list; then Friday up close from the free week 1 (the top of its chapter
   page and the foot of June's marked test) with a line for a Friday in each term, the word bank and the price. */

/* The whole year, in order. */
.yr { background: var(--paper); }
.yr-head { max-width: 1180px; margin: 0 auto 26px; }
.yr-head .lead { max-width: 62ch; }
.yr-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 430px) minmax(0, 1fr); gap: 32px 48px; align-items: start; }
.look .pg[id], .wk, .sp, .yr-term > h3 { scroll-margin-top: calc(var(--top-h) + 14px); }

/* Sam's map on the table: it stays beside the weeks as they go by. */
.ym { position: sticky; top: calc(var(--top-h) + 16px); z-index: 3; }
.ym-table { margin: 0; position: relative; border-radius: 8px; background: #c98a4a url("../img/b/table-1800.webp") 40% 50% / 1500px auto; padding: 24px 22px 18px;
  box-shadow: inset 0 -10px 0 #a76d34, inset 0 -12px 0 #e6bb80, 0 8px 18px rgba(80,45,10,.18); }
.ym-map { position: relative; width: min(100%, 380px); margin: 0 auto; aspect-ratio: 866 / 972; background: #fbf6e9; transform: rotate(-1.4deg);
  box-shadow: 0 0 0 1px rgba(51,54,59,.12), 2px 3px 0 rgba(255,255,255,.6), 10px 14px 18px rgba(80,45,10,.32); overflow: hidden; }
.ym-svg { display: block; width: 100%; height: 100%; }
.ym-ink .ring { fill: none; stroke: #d2402f; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.ym-ink .hit { fill: transparent; cursor: pointer; }
.ym-cap { position: relative; margin: 16px auto 0; width: min(100%, 380px); background: rgba(255,255,255,.96); border-radius: 6px; padding: 10px 14px 12px; box-shadow: 0 1px 0 rgba(80,45,10,.25), 4px 6px 12px rgba(80,45,10,.18); min-height: 78px; }
.ym-cap .c1 { display: block; font-weight: 700; font-size: 18px; line-height: 26px; }
.ym-cap .c2 { display: block; font-size: 16px; line-height: 24px; }

/* The weeks. Beside the map, the list runs on a little past week 36, so the map is still in view, whole, while the
   last weeks pass the reading line and their spots colour in. */
.yr-list { min-width: 0; padding-bottom: 290px; }
@media (max-width: 960px) { .yr-list { padding-bottom: 0; } }
.yr-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.yr-jump li { margin: 0; }
.yr-jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 6px 14px; border: 1.5px solid var(--graphite); border-radius: 22px; background: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.yr-jump a:hover { background: var(--manila); }
.yr-term { margin: 0 0 34px; }
.yr-term > h3 { font-size: 23px; line-height: 30px; margin: 0 0 4px; }
.yr-term > p { font-size: 16px; line-height: 24px; margin: 0 0 12px; }
.pg .wks, .pg .yr-jump, .pg .sp-pages { padding-left: 0; }
.wks { list-style: none; margin: 0; }
.pg .wks li.wk { margin: 0; }
.wk { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 18px; align-items: start; padding: 16px 12px 16px 10px; border-top: 1.5px dashed rgba(79,134,219,.45); border-radius: 6px; transition: background-color .3s; }
.wk.on { background: var(--manila); }
html.paused .wk, html:not(.living) .wk { transition: none; }
/* A week's scene, as the year at a glance (start pack page 5, a preview) prints it, never larger than that preview's
   own pixels (img/weeks/gNN.webp, 220 x 126, cut from preview 06 by source/glance), like a small print on the paper. */
.wk-sc { position: relative; width: 100%; max-width: 220px; aspect-ratio: 220 / 126; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(51,54,59,.14), 3px 5px 0 4px rgba(51,54,59,.06), 6px 10px 14px 4px rgba(80,45,10,.12); }
.wk-sc img { display: block; width: 100%; height: 100%; }
.wk-tx h4 { font-size: 20px; line-height: 26px; margin: 0; }
.wk-tx h4 span { font-weight: 400; }
.wk-tx h4 span::before { content: "· "; }
.pg .wk-tx p { font-size: 16px; line-height: 24px; margin: 2px 0 0; }
.pg .wk-tx .wk-ch { font-style: italic; margin: 2px 0 4px; }
.wk-w .lb { font-size: 14px; font-weight: 700; color: #55585d; margin-right: 6px; }
.pg .wk-tx .wk-b { margin-top: 8px; font-size: 15px; line-height: 22px; }
.wk-b q { quotes: "\201C" "\201D"; }
.wk-b a { font-weight: 700; }

/* The start pack: its three pages a visitor may see whole, lying fanned on the list. */
.sp { padding: 14px 10px 4px; border-top: 1.5px dashed rgba(79,134,219,.45); border-radius: 6px; transition: background-color .3s; }
.sp.on { background: var(--manila); }
.sp-pages { list-style: none; margin: 0 0 12px; display: flex; gap: 14px; }
.pg .sp-pages li { margin: 0; flex: 0 1 130px; min-width: 0; }
.sp-pages img { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 0 0 1px rgba(51,54,59,.16), 4px 6px 10px rgba(80,45,10,.14); }
.sp-pages li:nth-child(1) img { transform: rotate(-1.5deg); }
.sp-pages li:nth-child(3) img { transform: rotate(1.2deg); }
.sp-pages span { display: block; font-size: 14px; line-height: 20px; margin-top: 8px; font-weight: 700; }
.pg .sp > p { font-size: 16px; line-height: 24px; margin: 0 0 10px; }

/* Friday up close: parts of the free week 1's two Friday pages (drawn from the free PDF at 300 dpi and more; the free
   week may be shown whole), then a line for a Friday in each term, in words. No paid page is shown here. */
.lk-term { border-top: 1.5px solid rgba(51,54,59,.12); }
.lk-term:nth-of-type(even) { background: var(--manila); }
.lk-in { max-width: 1180px; margin: 0 auto; }
.lk-in > p { max-width: 64ch; }
.lk-narrow { max-width: 760px; }
.ups { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 28px 40px; align-items: start; margin-top: 24px; max-width: 1060px; }
.up { margin: 0; }
.up-pic { position: relative; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(51,54,59,.16), 6px 8px 0 rgba(51,54,59,.07), 10px 14px 20px rgba(80,45,10,.12); }
.up-pic img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the top of the chapter page, and the foot of June's marked test: each a part of its page, at the size it prints */
.up-ch .up-pic { aspect-ratio: 1400 / 375; transform: rotate(-.5deg); }
.up-test .up-pic { aspect-ratio: 680 / 544; max-width: 360px; transform: rotate(.8deg); }
.up figcaption { margin-top: 14px; font-size: 16px; line-height: 24px; max-width: 52ch; }
.up figcaption b { display: block; font-size: 17px; }
.up q { quotes: "\201C" "\201D"; font-style: italic; }
.lk-fri .fri-h3 { font-size: 22px; line-height: 30px; margin: 34px 0 8px; }
.lk-fri .fri-terms { list-style: none; margin: 0 0 14px; padding: 0; max-width: 64ch; }
.lk-fri .fri-terms li { margin: 0; padding: 10px 0 10px 30px; position: relative; border-top: 1.5px dashed rgba(79,134,219,.45); font-size: 16px; line-height: 24px; scroll-margin-top: calc(var(--top-h) + 14px); }
/* each Friday's spot, ringed as Sam's map rings the week in view */
.lk-fri .fri-terms li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 18px; height: 18px; border: 2.5px solid #d2402f; border-radius: 50%; background: #f6c333; }
.lk-fri .fri-terms b { display: block; }
.lk-fri .fri-lead { font-size: 17px; line-height: 27px; margin: 0 0 12px; max-width: 64ch; }
/* The opening card's price: what each buys, one line each, then the form, the refunds link and, before sales open,
   that it isn't on sale yet. */
.band-card .lk-go { margin: 14px 0 0; }
.band-card .lk-prices { list-style: none; margin: 16px 0 6px; padding: 0; }
.band-card .lk-prices li { margin: 0; font-size: 17px; line-height: 25px; }
.band-card .lk-prices li + li { margin-top: 4px; padding-top: 4px; border-top: 1.5px dashed rgba(79,134,219,.45); }
.band-card .lk-prices b { font-size: 19px; }
.band-card .band-price { margin: 4px 0 10px; text-wrap: pretty; }
.band-card .band-price a { white-space: nowrap; }
.band-card .lk-soon { font-size: 16px; line-height: 23px; margin: 0 0 12px; background: var(--manila); border-radius: 4px; padding: 8px 12px; }
@media (max-width: 760px) {
  /* A phone: the card's words and both ways on fit the first screen, under the strip of the table. */
  .look .band-card { padding-top: 20px; padding-bottom: 12px; }
  .look .band-card .lk-intro { font-size: 16px; line-height: 24px; margin-bottom: 0; }
  .band-card .lk-prices { margin-top: 12px; }
  .band-card .lk-prices li { font-size: 16px; line-height: 23px; }
  .band-card .lk-prices b { font-size: 17px; }
  .band-card .band-price { font-size: 14px; line-height: 20px; margin: 4px 0 8px; }
  .band-card .lk-soon { font-size: 15px; line-height: 21px; padding: 6px 10px; margin-bottom: 10px; }
  .band-card .lk-go { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 12px; }
  .band-card .lk-go .btn { font-size: 15px; padding: 8px 8px; min-height: 46px; text-align: center; }
}
/* A shorter phone: the things on the table lie a little smaller, so the card, with its price and whether it's on sale
   yet, still fits the first screen. */
@media (min-width: 341px) and (max-width: 760px) and (max-height: 760px) {
  .look .band { padding-top: calc(var(--top-h) + 162px); }
  .look .band-things { transform: scale(.8); transform-origin: 50% var(--top-h); }
  .look .band-card h1 { margin-bottom: 8px; }
}

/* The year and the terms, at the foot. */
.lk-end { max-width: 640px; margin: 0 auto; transform: rotate(-.4deg); }
.lk-end .kicker { margin-top: -4px; }
.lk-end .fine a { white-space: nowrap; }
.lk-end [data-sale="soon"] .fine a { white-space: normal; }
.lk-end .near-price { margin: -4px 0 12px; text-wrap: balance; }
.lk-end .soon { font-size: 16px; line-height: 24px; margin: 6px 0 12px; background: var(--manila); border-radius: 4px; padding: 10px 12px; }
.lk-end .row { margin-top: 4px; }

@media (max-width: 1100px) {
  .yr-grid { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 28px 32px; }
  .wk { grid-template-columns: minmax(0, 200px) minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .yr-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ym { position: static; max-width: 460px; }
  /* With the page's script, a phone or a narrow window gets the map as a strip that stays under the header while the
     weeks go by: a window onto Sam's map that follows the path, and what week it is beside it. */
  html.ym-js .ym { position: sticky; top: calc(var(--top-h) + 4px); margin: 0 -16px; max-width: none; }
  html.ym-js .ym-table { border-radius: 0; padding: 10px 14px 14px; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: center;
    box-shadow: inset 0 -6px 0 #a76d34, inset 0 -8px 0 #e6bb80, 0 6px 12px rgba(80,45,10,.2); background-size: 1100px auto; }
  html.ym-js .ym-map { width: 120px; aspect-ratio: 1; transform: rotate(-1.4deg); }
  html.ym-js .ym-cap { margin: 0; width: auto; min-height: 0; padding: 8px 10px 10px; }
  html.ym-js .ym-cap .c1 { font-size: 16px; line-height: 22px; }
  html.ym-js .ym-cap .c2 { font-size: 14px; line-height: 20px; }
  html.ym-js .ym.stuck::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: calc(var(--top-h) + 8px); background: var(--paper); box-shadow: 0 1px 0 rgba(51,54,59,.08); }
  html.ym-js .wk, html.ym-js .sp, html.ym-js .yr-term > h3 { scroll-margin-top: calc(var(--top-h) + var(--ym-h, 150px) + 12px); }
  .wk { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
  .ups { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .up-test { max-width: 360px; }
}
/* On a phone the strip lies on the same wood the band above it already brought (one picture, not two). */
@media (max-width: 760px) {
  .ym-table { background-image: url("../img/b/table-band-1300.webp"); }
}
@media (max-width: 560px) {
  .wk { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 14px; padding: 16px 6px 18px; }
  .wk-sc { margin-top: 6px; }
  .wk-tx h4 { font-size: 19px; line-height: 25px; }
  .wk-tx h4 span { display: block; }
  .wk-tx h4 span::before { content: none; }
  .lk-end { transform: none; }
  .sp-pages { gap: 10px; }
}
/* Short screens (a phone on its side, very large text): the strip stays where it is in the page instead of following. */
@media (max-height: 560px), (max-width: 340px) {
  html.ym-js .ym { position: static; }
  html.ym-js .wk, html.ym-js .sp, html.ym-js .yr-term > h3 { scroll-margin-top: calc(var(--top-h) + 14px); }
}
@media (max-width: 340px) {
  html.ym-js .ym-table { grid-template-columns: minmax(0, 1fr); }
  html.ym-js .ym-map { width: 140px; }
}
/* Very narrow (200% zoom on a phone): the scene sits above its words, so the words keep a full line. */
@media (max-width: 300px) {
  .wk { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .wk-sc { max-width: 220px; margin-top: 0; }
}
@media (max-width: 240px) { .look .band-card h1 { font-size: 24px; line-height: 30px; } }
