/* /free-trading-journal/: the free Journal told as one book, screen by screen (Mix v2, picked by the keeper on
   1 Dec 2026). Each screen is a 16:10 frame: a centred heading over the same open book, built from the app's own
   screens, and one move that acts out the step (the plan writes itself in, the file drops in, each rule lights with
   its answer, the day files into the month). The close shows what you get as pictures, then the button.
   Motion runs only when /free-trading-journal/motion.js sets html.fj-anim (never under reduced motion); without it
   every part sits in its final place. Tokens come from /site.css; the Kit's brighter text colours are scoped to main. */

@font-face { font-family: "JetBrains Mono Variable"; src: url("/fonts/mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

.fj { flex: 1; width: 100%; position: relative; z-index: 0; overflow: clip; background: var(--ground);
  --bone: #f3efe6; --label: #e6e1d6; --soft: #c8c2b4; --quiet: #a09a8c;
  --display: var(--brand); --body: var(--sans); --mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, monospace;
  --e2: cubic-bezier(.55, .06, .22, 1); --hd: 67px; }

/* ---- the header's own Start free (wide screens; phones get the bottom bar) ---- */
.top nav a.fj-hbtn { display: none; }
@media (min-width: 900px) {
  .top nav { align-items: center; }
  .top nav a.fj-hbtn { display: inline-block; margin: -9px 0; padding: 10px 17px 9px; color: #171006; background: var(--metal);
    clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
  .top nav a.fj-hbtn:hover { color: #171006; filter: brightness(1.1); }
  .top nav a.fj-hbtn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(23, 16, 6, .9); filter: brightness(1.1); }
}

/* ---- a screen: full height under the header, the 16:10 frame centred in it. The screens have no ground of their
   own: one ground runs under the whole story, so each screen's glow can reach into the next ---- */
.fj-scr { position: relative; display: flex; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--hd)); min-height: calc(100svh - var(--hd)); }
.fj-frame { position: relative; container-type: inline-size; isolation: isolate; overflow: hidden; aspect-ratio: 16 / 10;
  width: min(100%, calc((100vh - var(--hd)) * 1.6), 1600px); width: min(100%, calc((100svh - var(--hd)) * 1.6), 1600px);
  --fs: 1.32cqw; }
.fj-crop { position: absolute; inset: 0; z-index: 1; }
.fj-st { position: absolute; inset: 0; container-type: inline-size; perspective: 150cqw; --fs: 1.32cqw; }
.fj-pcard { display: none; }

/* ---- the light behind the story (keeper 1 Dec 2026: "a soft glow that is already present when scrolling ... that more
   so illuminates the background, not as much as a hard object that has glow"). Each glow is a wide haze and a warmer
   core with a slow, even falloff: no ring, no lines, no specks, no fade-in, so the light is already there as the screen
   arrives. It sits behind every frame (z-index -1 in main) on a layer the size of the frame, so x and y are in % of the
   frame; it spills past the frame into the screens above and below, and main clips it at the page's edges. gen.mjs
   places one per screen: centre, left, right, left, right, centre ---- */
.fj-glow { position: absolute; left: 50%; top: 50%; z-index: -1; pointer-events: none; container-type: inline-size;
  aspect-ratio: 16 / 10; transform: translate(-50%, -50%); --k: var(--gs); --ty: -50%; opacity: var(--gi);
  width: min(100%, calc((100vh - var(--hd)) * 1.6), 1600px); width: min(100%, calc((100svh - var(--hd)) * 1.6), 1600px); }
.fj-glow > * { position: absolute; left: var(--gx); top: var(--gy); transform: translate(-50%, var(--ty)); }
.fj-glow .gh { width: calc(170cqw * var(--k)); height: calc(100cqw * var(--k) * var(--gv));
  background: radial-gradient(closest-side, rgba(231, 184, 74, .075), rgba(231, 184, 74, .066) 15%, rgba(231, 184, 74, .05) 32%,
    rgba(222, 172, 62, .032) 50%, rgba(210, 160, 55, .016) 68%, rgba(200, 150, 50, .006) 85%, transparent); }
.fj-glow .gc { width: calc(80cqw * var(--k)); height: calc(44cqw * var(--k));
  background: radial-gradient(closest-side, rgba(255, 214, 130, .13), rgba(245, 200, 110, .11) 18%, rgba(231, 184, 74, .075) 38%,
    rgba(231, 184, 74, .038) 60%, rgba(231, 184, 74, .012) 82%, transparent); }

/* ---- parts: each goes from state a to state b once its screen plays ---- */
.fj .p { position: absolute; transform: var(--tb); opacity: var(--ob); filter: var(--fb); clip-path: var(--cb); transform-origin: var(--or); }
.fj-anim .fj .p { transform: var(--ta); opacity: var(--oa); filter: var(--fa); clip-path: var(--ca); }
.fj-anim .fj .play .p { transform: var(--tb); opacity: var(--ob); filter: var(--fb); clip-path: var(--cb);
  transition: transform var(--u) var(--e2) var(--d), filter var(--u) var(--e2) var(--d), clip-path var(--u) var(--e2) var(--d), opacity var(--ou) var(--e2) var(--od); }
.fj .p.img img { display: block; width: 100%; height: auto; }

/* the book */
.fj .leafbg { background: linear-gradient(180deg, #111114, #0a0a0c); }
.fj .book { perspective: 150cqw; }
.fj .sh { box-shadow: 0 2.4cqw 4cqw -1.6cqw rgba(0, 0, 0, .96), 0 .6cqw 1.2cqw -.6cqw rgba(0, 0, 0, .8); }
.fj .ed::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 3; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .6), rgba(255, 223, 138, .5) 36%, rgba(255, 255, 255, .08) 82%, transparent); }
.fj .fadeh { -webkit-mask-image: linear-gradient(180deg, #000 48%, rgba(0, 0, 0, .55) 70%, transparent 88%); mask-image: linear-gradient(180deg, #000 48%, rgba(0, 0, 0, .55) 70%, transparent 88%); }
.fj .shade { background: linear-gradient(90deg, rgba(5, 5, 6, .7), rgba(5, 5, 6, .92)); }
.fj .sr { background: linear-gradient(90deg, rgba(0, 0, 0, .34), rgba(0, 0, 0, 0) 22%); z-index: 2; pointer-events: none; }
.fj .seam { min-width: 1px; z-index: 4; background: linear-gradient(180deg, rgba(255, 223, 138, 0), rgba(255, 223, 138, .95) 10%, rgba(255, 223, 138, .95) 90%, rgba(255, 223, 138, 0));
  box-shadow: 0 0 1.4cqw .25cqw rgba(231, 184, 74, .5); }
.fj .ring { border: max(1.5px, .22cqw) solid var(--gold-hi); border-radius: .5cqw; z-index: 6;
  box-shadow: 0 0 1.4cqw rgba(255, 223, 138, .6), inset 0 0 .8cqw rgba(255, 223, 138, .3); }
.fj .ring.dot { border-radius: 50%; aspect-ratio: 1; background: rgba(255, 223, 138, .18); }
.fj .ring.dz { border-radius: .4cqw; background: rgba(255, 223, 138, .07); }
.fj .file span { display: block; padding: .9cqw 1cqw; font: 500 1cqw/1 var(--mono); color: var(--bone); text-align: center;
  background: linear-gradient(180deg, #24242a, #16161a); box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 1.4cqw 2.4cqw -1cqw #000; border-top: 1px solid rgba(255, 223, 138, .7); }
.fj .flip { transform-style: preserve-3d; z-index: 3; }
.fj .face { position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: linear-gradient(180deg, #111114, #0a0a0c); }
.fj .face.bk { transform: rotateY(180deg); }
.fj .face img { position: absolute; display: block; height: auto; }
.fj .face i.fs { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.fj .glv { width: max(1.5px, .28cqw); z-index: 9; background: linear-gradient(180deg, rgba(255, 223, 138, 0), var(--gold-hi) 10%, var(--gold-hi) 90%, rgba(255, 223, 138, 0)); box-shadow: 0 0 1.4cqw rgba(255, 223, 138, .9); }
/* a rule lights across both pages */
.fj .rl { z-index: 4; pointer-events: none; background: linear-gradient(90deg, rgba(255, 223, 138, .02), rgba(255, 223, 138, .2) 50%, rgba(255, 223, 138, .02));
  box-shadow: inset 0 1px 0 rgba(255, 223, 138, .55), inset 0 -1px 0 rgba(255, 223, 138, .55); }
/* the kept ring draws to 3 of 5 */
.fj .arc { z-index: 5; }
.fj .arc svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.fj .arc circle { fill: none; stroke: rgb(225, 182, 78); stroke-width: 6; stroke-dasharray: 226.2; stroke-dashoffset: 90.5; }

/* the moves that are keyframes rather than a to b */
.fj-anim .fj .play .peak { animation: fj-pk var(--u) linear var(--d) both; }
.fj-anim .fj .play .face i.fs { animation: fj-fsd var(--u) var(--e2) var(--d) both; }
.fj-anim .fj .play .rl { animation: fj-rlf var(--u) var(--e2) var(--d) both; }
.fj-anim .fj .arc circle { stroke-dashoffset: 226.2; }
.fj-anim .fj .play .arc circle { stroke-dashoffset: 90.5; transition: stroke-dashoffset var(--u) var(--e2) var(--d); }
@keyframes fj-pk { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes fj-fsd { 0% { opacity: 0; } 50% { opacity: .85; } 100% { opacity: 0; } }
@keyframes fj-rlf { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: .38; } }

/* ---- words ---- */
.fj .tx { color: var(--label); font-size: var(--fs); z-index: 8; }
.fj .tx.c { text-align: center; }
.fj .tx .h1 { font: 700 3.3em/.98 var(--display); font-stretch: 84%; letter-spacing: -.01em; color: var(--bone); }
.fj .tx h2 { font: 700 1.85em/1.06 var(--display); font-stretch: 86%; color: var(--bone); text-wrap: balance; }
.fj .tx p { margin-top: .55em; line-height: 1.42; color: var(--soft); }
.fj .tx.c p { margin-left: auto; margin-right: auto; }
.fj .tx .lead { font-size: 1.12em; color: var(--label); max-width: 40em; }
.fj .tx .q { font-size: .86em; color: var(--quiet); }
.fj .tx .ah { font: 500 .82em/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--soft); max-width: 19em; text-wrap: balance; }
.fj .tx .fine { margin-top: 1.4em; font-size: .78em; color: var(--quiet); }
.fj .tx .btn, .fj-bar .btn { display: inline-block; margin: 1.1em 0 0; font: 600 1em/1 var(--body); color: #171006; text-decoration: none; background: var(--metal);
  padding: .85em 1.4em; clip-path: polygon(.5em 0, 100% 0, 100% calc(100% - .5em), calc(100% - .5em) 100%, 0 100%, 0 .5em); }
.fj .tx .btn:hover, .fj-bar .btn:hover { filter: brightness(1.1); }
.fj .tx .btn:focus-visible, .fj-bar .btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px rgba(23, 16, 6, .9); filter: brightness(1.1); }

/* the hero's words (design B, picked by the keeper on 1 Dec 2026): a small quiet tag, a bigger heading, a shorter lead */
.fj .tx .fj-eb { display: inline-flex; align-items: center; gap: .7em; margin: 0 0 1.2em; padding: .55em .9em;
  font: 500 .64em/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: rgba(231, 184, 74, .86);
  background: rgba(231, 184, 74, .03); box-shadow: inset 0 0 0 1px rgba(231, 184, 74, .2); }
.fj .tx .fj-eb::before { content: ""; width: .5em; height: .5em; background: var(--gold); transform: rotate(45deg); opacity: .85; }
.fj-s1 .tx .h1 { font-size: 3.8em; line-height: .96; }
.fj-s1 .tx .lead { font-size: 1em; line-height: 1.55; max-width: 29em; margin-top: .95em; color: var(--quiet); text-wrap: balance; }
.fj-s1 .tx .btn { padding: .95em 2.1em; margin-top: 1.9em; }
.fj-s1 .tx .q { font-size: .8em; margin-top: 1.25em; }

/* Sample data, one per screen, bottom centre */
.fj .tag { position: absolute; bottom: 1.6cqw; left: 50%; transform: translateX(-50%); z-index: 35; display: flex; align-items: center; gap: .6cqw;
  font: 500 .95cqw/1 var(--mono); letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
  color: var(--label); background: rgba(8, 8, 10, .86); padding: .7cqw 1cqw; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.fj .tag::before { content: ""; flex: none; width: .55cqw; height: .55cqw; background: var(--gold); transform: rotate(45deg); }

/* ---- the close: what you just saw, as pictures, then the button ---- */
.fj .cl2 { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fj .tx .kk { margin: 0 0 .9em; font: 500 .82em/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.fj .cl2 h2.big { font-size: 2.9em; }
.fj .thr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.6cqw; width: 86cqw; margin: 2.2cqw auto 0; }
.fj .th { display: flex; flex-direction: column; align-items: center; gap: .9cqw; }
.fj .th .im { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #0a0a0c;
  box-shadow: 0 0 0 1px rgba(231, 184, 74, .5), 0 0 2.2cqw rgba(231, 184, 74, .14), 0 2cqw 3.4cqw -1.4cqw #000; }
.fj .th .im::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; z-index: 2;
  background: linear-gradient(90deg, rgba(255, 255, 255, .6), rgba(255, 223, 138, .55) 40%, transparent); }
.fj .th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fj .th span { font: 600 1.02em/1 var(--body); color: var(--bone); }
.fj .ck { position: absolute; right: .8cqw; top: .8cqw; z-index: 3; width: 2.2cqw; height: 2.2cqw; border-radius: 50%; display: grid; place-items: center;
  font: 700 1.15cqw/1 var(--body); color: #171006; background: var(--metal); box-shadow: 0 0 1.2cqw rgba(255, 223, 138, .55); }
.fj .cl2 .btn { margin: 2.4cqw 0 0; }
.fj .cl2 .fine { margin-top: 1.2em; }
.fj-anim .fj .th, .fj-anim .fj .ck { opacity: 0; }
.fj-anim .fj .play .th { animation: fj-thin .8s var(--e2) var(--dd) both; }
.fj-anim .fj .play .ck { animation: fj-ckp .5s cubic-bezier(.3, 1.7, .5, 1) calc(var(--dd) + .55s) both; }
.fj-anim .fj .play .cl2 .btn { animation: fj-bgl 1.4s ease 1.9s both; }
@keyframes fj-thin { from { opacity: 0; transform: translateY(1.6cqw); } to { opacity: 1; transform: none; } }
@keyframes fj-ckp { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes fj-bgl { 0%, 100% { filter: none; } 45% { filter: brightness(1.3); } }

/* ---- questions, after the story ---- */
.fj-more { padding: clamp(64px, 9vw, 120px) 0 clamp(56px, 7vw, 96px); background: var(--ground); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.fj-wrap { width: 100%; max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.fj-h2 { font: 700 clamp(30px, 3.4vw, 44px)/1.05 var(--brand); font-stretch: 86%; color: var(--bone); text-align: center; }
.fj-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; margin-top: clamp(32px, 4vw, 48px); }
.fj-faq > div { padding: 22px 0 24px; border-top: 1px solid var(--hair); }
.fj-faq dt { font-weight: 600; color: var(--bone); }
.fj-faq dd { margin-top: 8px; font-size: 16px; line-height: 1.55; color: var(--soft); }
.fj-note { margin-top: 28px; font-size: 13px; color: var(--quiet); text-align: center; }

/* ---- the phone bar: Start free stays in reach between the first and last button ---- */
.fj-bar { display: none; }

/* ---- narrow or short screens: words on top, the book in a window under them ---- */
@media (max-width: 899px), (max-height: 559px) {
  .fj-scr { display: block; min-height: 0; padding: 48px 0 44px; }
  .fj-s1 { padding-top: 34px; }
  .fj-frame { width: 100%; aspect-ratio: auto; overflow: visible; --fs: clamp(14px, 3.7vw, 17px); }
  .fj .fj-words, .fj .cl2 { position: relative; left: auto !important; top: auto !important; width: auto !important; height: auto !important;
    max-width: 640px; margin: 0 auto; padding: 0 20px; }
  .fj .tx .h1, .fj-s1 .tx .h1 { font-size: 3.1em; }
  .fj-s1 .tx .lead { font-size: 1.02em; }
  .fj-glow { inset: 0; width: auto; aspect-ratio: auto; transform: none; --k: var(--ps); --ty: 50%; }
  .fj-glow > * { left: var(--px); top: auto; bottom: var(--pb); }
  .fj .tx h2 { font-size: 1.75em; }
  .fj .tx .q { font-size: .9em; }
  .fj-crop { position: relative; inset: auto; width: calc(100% - 24px); max-width: 760px; margin: 26px auto 0; aspect-ratio: 1.8; overflow: hidden; container-type: inline-size; }
  .fj-st { inset: auto; left: -12.5%; width: 125%; aspect-ratio: 16 / 10; top: calc(2.78cqw - var(--cy) * .78125cqw); }
  .fj .tag { position: relative; left: auto; bottom: auto; transform: none; width: max-content; margin: 16px auto 0; gap: 8px; font-size: 11px; padding: 7px 10px; }
  .fj .tag::before { width: 6px; height: 6px; }
  .fj-s1 .fj-crop { aspect-ratio: 2; }
  .fj-s4 .fj-crop { display: none; }
  .fj-pcard { display: block; position: relative; width: calc(100% - 32px); max-width: 420px; margin: 26px auto 0; aspect-ratio: 94 / 114.1;
    overflow: hidden; border-radius: 12px; background: #0d0d10; container-type: inline-size;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 22px 40px -18px #000; }
  .fj .thr { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 520px; gap: 20px 14px; margin-top: 24px; }
  .fj .th { gap: 9px; }
  .fj .th .im { box-shadow: 0 0 0 1px rgba(231, 184, 74, .5), 0 0 14px rgba(231, 184, 74, .14), 0 14px 22px -10px #000; }
  .fj .ck { right: 8px; top: 8px; width: 24px; height: 24px; font-size: 13px; box-shadow: 0 0 10px rgba(255, 223, 138, .55); }
  .fj .cl2 .btn { margin-top: 26px; }
  @keyframes fj-thin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .fj-faq { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .fj-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 11px 16px calc(11px + env(safe-area-inset-bottom)); font-size: 14px; color: #c8c2b4;
    background: rgba(13, 13, 16, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    transform: translateY(110%); visibility: hidden; transition: transform .4s var(--ease), visibility 0s linear .4s; }
  .fj-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255, 223, 138, .85) 50%, transparent); }
  .fj-bar.on { transform: none; visibility: visible; transition: transform .4s var(--ease); }
  .fj-bar .btn { margin: 0; font-size: 15px; --e2: cubic-bezier(.55, .06, .22, 1); }
}
@media (prefers-reduced-motion: reduce) { .fj-bar, .fj-bar.on { transition: none; } }
