/* A trade's first week told over paintings (trade_starts/show, plan 90, plan 92 task 7; drawn in
   docs/idea/45-samples/sky-painted.html): a printed feature, not the app, the same in the dark theme. The paintings sit
   on a stage held in the window (.jw-stage); the steps scroll over it and the one on the reading line puts its
   painting up (img.is-on) and its note up (.jw-step.is-on), trade_start_controller.js. Without script (.jw not
   .is-live) the cover painting stays up and every card and note shows in order. */
@font-face { font-family: "DM Serif Display"; src: url("/assets/dm-serif-display-latin-3f6a6125.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Serif Display"; src: url("/assets/dm-serif-display-latin-ext-5e515044.woff2") format("woff2"); font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Caveat"; src: url("/assets/caveat-latin-f0eed7a8.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Anton"; src: url("/assets/anton-latin-684d7604.woff2") format("woff2"); font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; src: url("/assets/archivo-variable-2348e0b4.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("/assets/plex-serif-regular-12f8cb7a.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url("/assets/plex-serif-bold-8bf11162.woff2") format("woff2"); font-weight: 700; font-display: swap; }

.jw {
  --ink: #17162b; --paper: #fcf8f0; --muted: #57504a; --rule: #d8cdbb; --ember: #b4441d; --glow: #ffcf6e;
  --night: #080b20; --display: "DM Serif Display", Georgia, serif; --text: "Plex Serif", Georgia, serif;
  --label: "Archivo", ui-sans-serif, system-ui, sans-serif; --hand: "Caveat", "Comic Sans MS", cursive;
  --gutter: max(16px, 4vw);
  color-scheme: light; background: var(--paper); color: var(--ink); font-family: var(--text); overflow-x: clip;
}
.jw a { color: inherit; }
.jw :focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; border-radius: 4px; }
#monday { --accent: #b4441d; } #tuesday { --accent: #b6562a; } #wednesday { --accent: #1f6a86; }
#thursday { --accent: #7a3f8c; } #friday { --accent: #a6402c; } #table { --accent: #a6402c; }

/* The week, held under the site header (sticky, 4rem + its border): the day being read lit, the fill as far as the story has gone. */
.jw-week { position: sticky; top: calc(4rem + 1px); z-index: 30; display: flex; justify-content: center; height: 3.5rem; padding-inline: var(--gutter);
  background: linear-gradient(rgb(7 9 26 / .78), rgb(7 9 26 / .52)); backdrop-filter: blur(10px) saturate(1.2); color: #fff; }
.jw-week a { position: relative; display: flex; flex: 1; max-width: 8rem; align-items: center; justify-content: center; padding-bottom: .625rem;
  color: rgb(255 255 255 / .7); font: 620 .9375rem/1 var(--label); text-decoration: none; white-space: nowrap; }
.jw-week a:hover, .jw-week a[aria-current="true"] { color: #fff; }
.jw-track { position: absolute; left: var(--gutter); right: var(--gutter); bottom: .6875rem; height: 2px; border-radius: 2px; background: rgb(255 255 255 / .22); pointer-events: none; }
.jw-fill { position: absolute; inset: 0 auto 0 0; width: var(--p, 4%); border-radius: 2px; background: linear-gradient(90deg, rgb(255 207 110 / .35), var(--glow)); transition: width .4s ease; }
.jw-fill::after { content: ""; position: absolute; top: 50%; right: -6.5px; width: 13px; height: 13px; margin-top: -6.5px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 0 4px rgb(255 207 110 / .22), 0 0 14px var(--glow); }
.jw:not(.is-live) .jw-track { display: none; }

/* The stage: one painting at a time, held in the window while the story scrolls over it. */
.jw-scrolly { position: relative; background: var(--night); }
.jw-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: #1d2236; }
.jw-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%);
  opacity: 0; transform: scale(1.04); transition: opacity 1.1s ease, transform 9s cubic-bezier(.2, .6, .2, 1), filter 1s; }
.jw-stage img.is-on { opacity: 1; transform: scale(1.1); }
.jw-stage.is-end img.is-on { filter: brightness(.55); }
.jw-stage::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 42%, transparent 60%, rgb(10 12 28 / .32)); }
.jw-stage::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: .16; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .55  0 0 0 0 .5  0 0 0 0 .42  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

.jw-steps { position: relative; z-index: 3; margin-top: -100vh; margin-top: -100svh; }

/* The cover: the headline over the street at sunrise. */
.jw-cover { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; min-height: 100svh;
  padding: 6svh var(--gutter) 8svh; color: #fff; }
.jw-cover::before { content: ""; position: absolute; inset: 0 0 -20svh; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgb(6 8 28 / .66) 0, rgb(6 8 28 / .4) 40%, rgb(6 8 28 / 0) 68%);
  mask-image: linear-gradient(#000 0, #000 62%, transparent); }
.jw-crumbs { margin-bottom: 1.5rem; color: rgb(255 255 255 / .78); font: 500 .8125rem/1.4 var(--label); }
.jw-crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.jw-kicker { margin-bottom: 1rem; color: #ffd99a; font: 700 .8125rem/1.3 var(--label); letter-spacing: .16em; text-transform: uppercase; }
.jw-title { max-width: 12.5ch; font: 400 clamp(2.9rem, 9vw, 6.2rem)/.98 var(--display); letter-spacing: -.012em; text-wrap: balance; text-shadow: 0 2px 30px rgb(5 7 25 / .55); }
.jw-dek { max-width: 34ch; margin-top: 1.25rem; color: rgb(255 255 255 / .92); font-size: clamp(1.0625rem, 1.6vw, 1.3125rem); line-height: 1.45; text-wrap: pretty; text-shadow: 0 1px 12px rgb(5 7 25 / .6); }
.jw-by { max-width: 38ch; margin-top: .875rem; color: rgb(255 255 255 / .8); font-size: .9375rem; font-style: italic; text-shadow: 0 1px 12px rgb(5 7 25 / .6); }
.jw-cover-go { display: inline-flex; align-items: center; gap: .6rem; min-height: 3.25rem; margin-top: 2.5rem; padding: .8rem 1.2rem;
  border: 1.5px solid rgb(255 255 255 / .55); border-radius: var(--radius-control, .625rem); background: rgb(8 10 30 / .35);
  backdrop-filter: blur(6px); color: #fff; font: 650 1.0625rem/1 var(--label); text-decoration: none; }
.jw-cover-go:hover { background: rgb(8 10 30 / .55); }

/* A step: one card or one note, on the side away from where the eye sits on its painting. */
.jw-step { display: flex; align-items: flex-start; min-height: 108vh; min-height: 108svh; padding: 18svh var(--gutter) 0; }
.jw-step.is-long { min-height: 150vh; min-height: 150svh; }
.jw-step[data-side="right"] { justify-content: flex-end; }

.jw-card { position: relative; width: 100%; max-width: 30rem; padding: 1.6rem 1.8rem 1.8rem; border-radius: 5px; background: rgb(252 248 240 / .965);
  box-shadow: 0 24px 60px -18px rgb(6 8 30 / .6), 0 2px 8px rgb(6 8 30 / .18); }
.jw-card .jw-when { display: flex; align-items: center; gap: .55rem; margin-bottom: .75rem; color: var(--accent, var(--ember));
  font: 720 .8125rem/1 var(--label); font-variant-numeric: tabular-nums; letter-spacing: .15em; text-transform: uppercase; }
.jw-card .jw-when::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.jw-h2 { font: 400 clamp(2rem, 4vw, 2.75rem)/1 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.jw-card .jw-h2 { margin-bottom: .6rem; }
.jw-line { color: var(--muted); font-size: 1.125rem; line-height: 1.5; text-wrap: pretty; }
.jw-link { display: inline-block; margin-top: 1rem; color: var(--accent, var(--ember)) !important; font: 650 .9375rem/1.3 var(--label); text-decoration: underline; text-underline-offset: 4px; }

/* The phone's words, laid on the painting: who or what, then what happened. */
.jw-note { position: sticky; top: 42svh; display: grid; gap: .25rem; width: min(19rem, 80vw); padding: .85rem 1rem .9rem; border-radius: 16px;
  background: rgb(252 248 240 / .97); box-shadow: 0 18px 44px -14px rgb(6 8 30 / .55); font-family: var(--label); }
.jw-note-who { color: #6b6676; font: 700 .75rem/1.2 var(--label); letter-spacing: .14em; text-transform: uppercase; }
.jw-note b { font: 680 1.25rem/1.2 var(--label); }
.jw-note.is-yes b { color: #2f7a4a; }
.jw-note.is-miss b { color: #a03a22; }
.jw-note.is-sign b { color: #1f3f8a; font: 600 2.25rem/1 var(--hand); }
.jw-note.is-stamp { width: auto; padding: .6rem 1.2rem .7rem; border: 4px solid #b4361f; border-radius: 10px; background: rgb(252 248 240 / .7);
  box-shadow: none; color: #b4361f; text-align: center; rotate: -8deg; }
.jw-note.is-stamp .jw-note-who { color: #b4361f; }
.jw-note.is-stamp b { font: 400 3.4rem/1 Anton, Impact, sans-serif; letter-spacing: .06em; text-transform: uppercase; }
.jw.is-live .jw-note { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .45s ease, transform .5s cubic-bezier(.2, .9, .3, 1.2); }
.jw.is-live .jw-step.is-on .jw-note { opacity: 1; transform: none; }
.jw.is-live .jw-step.is-on .jw-note.is-stamp { animation: jw-stamp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes jw-stamp { from { opacity: 0; scale: 1.3; } }

/* The end: the painting dims under the first job's counts and the way in. */
.jw-end { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-height: 150vh; min-height: 150svh;
  padding: 0 var(--gutter) 12svh; color: #fff; text-align: center;
  background: linear-gradient(rgb(5 7 22 / 0) 0, rgb(5 7 22 / 0) 40%, rgb(5 7 22 / .78) 66%, rgb(5 7 22 / .94)); }
.jw-count-h { margin-bottom: 1.2rem; color: #ffd99a; font: 700 .8125rem/1.3 var(--label); letter-spacing: .16em; text-transform: uppercase; }
.jw-count dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.5rem, 3vw, 2.5rem); max-width: 40rem; margin-inline: auto; }
.jw-count dl div { display: flex; flex-direction: column-reverse; align-items: center; gap: .45rem; }
.jw-count dd { color: #fff; font: 400 clamp(4rem, 15vw, 8.5rem)/.9 Anton, Impact, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .01em; text-shadow: 0 0 40px rgb(255 207 110 / .35); }
.jw-count div:last-child dd { color: var(--glow); }
.jw-count dt { max-width: 11ch; color: rgb(255 255 255 / .82); font: 600 clamp(.875rem, 2vw, 1.0625rem)/1.25 var(--label); }
.jw-count-note { margin-top: 1.25rem; color: rgb(255 255 255 / .7); font: 500 .8125rem/1.4 var(--label); }
.jw-close { display: grid; justify-items: center; gap: 1.6rem; margin-top: clamp(2.5rem, 8vh, 4.5rem); }
.jw-close-h { max-width: 18ch; font: 400 clamp(2rem, 5vw, 3.2rem)/1.05 var(--display); text-wrap: balance; }
.jw-go { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3.625rem; padding: 1rem 2.1rem;
  border-radius: var(--radius-control, .625rem); background: var(--glow); color: #1a1530 !important; font: 760 1.1875rem/1 var(--label); text-decoration: none;
  box-shadow: 0 0 0 6px rgb(255 207 110 / .16), 0 18px 40px -12px rgb(255 190 80 / .6); }
.jw-go:hover { background: #ffd98a; }

/* After the story, on paper: the questions, then the lessons it shows. */
.jw-faq, .jw-lessons { max-width: 44rem; margin-inline: auto; padding: clamp(4rem, 8vw, 6rem) var(--gutter); }
.jw-faq + .jw-lessons { padding-top: 0; }
.jw-faq .jw-h2, .jw-lessons .jw-h2 { margin-bottom: 1rem; }
.jw-faq details { border-bottom: 1px solid var(--rule); }
.jw-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 0; font-size: 1.125rem; font-weight: 700; cursor: pointer; list-style: none; }
.jw-faq summary::-webkit-details-marker { display: none; }
.jw-faq summary svg { flex: none; rotate: 90deg; transition: rotate .2s; }
.jw-faq details[open] summary svg { rotate: -90deg; }
.jw-faq details p { padding-bottom: 1.125rem; color: var(--muted); font-size: 1.0625rem; }
.jw-lessons ul { display: grid; gap: .5rem; }
.jw-lessons a { display: grid; gap: .125rem; padding: 1rem 1.125rem; border: 1px solid var(--rule); border-radius: var(--radius-control, .5rem); text-decoration: none; }
.jw-lessons a:hover { border-color: var(--ink); }
.jw-lessons b { font-size: 1.125rem; }
.jw-lessons small { color: var(--muted); font-size: 1rem; }

/* A phone: the card or note held at the bottom over the painting; one gone once the next is up. */
@media (max-width: 759px) {
  .jw-week a { font-size: .875rem; }
  .jw-step:not(.jw-cover, .jw-end) { align-items: flex-end; padding: 0 12px; }
  .jw-step[data-side="right"] { justify-content: flex-start; }
  .jw-card, .jw-note { position: sticky; top: auto; bottom: max(14px, env(safe-area-inset-bottom)); }
  .jw-card { padding: 1rem 1.1rem 1.15rem; transition: opacity .3s; }
  .jw.is-live .jw-step.is-past .jw-card { opacity: 0; }
  .jw-h2 { font-size: 2rem; }
  .jw-line { font-size: 1.0625rem; }
  .jw-note.is-stamp { margin-inline: auto; }
  .jw-end { padding-bottom: 10svh; }
  .jw-cover { justify-content: flex-start; padding-top: 10svh; }
  .jw-cover-go { margin-top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .jw-stage img, .jw-stage img.is-on { transform: none; transition: opacity .4s; }
  .jw.is-live .jw-note, .jw.is-live .jw-step.is-on .jw-note { transform: none; transition: opacity .2s; }
  .jw.is-live .jw-step.is-on .jw-note.is-stamp { animation: none; }
  .jw-fill, .jw-faq summary svg { transition: none; }
}
