/* ============================================================
   GOLD ANALYSIS — the weekly liquidity report.

   The study is long and it is read slowly, often on a phone, often
   while the reader has the chart open beside it. So: one column, a
   wide measure for the annotated images and a narrow one for the
   prose, numbered beats that look like the numbers drawn on the
   chart, and nothing that moves while you are trying to read.

   It borrows the site's tokens rather than inventing colours, so
   it stays in step when the theme changes.
   ============================================================ */

.ga-wrap { max-width: 860px; padding-bottom: 10vh; position: relative; z-index: 1; }

/* ============================================================
   THE BACKGROUND

   A long study is read slowly, often on a phone, often while the
   reader has a chart open beside it. So the ambience has to be felt
   and not noticed: nothing that moves in the corner of the eye while
   someone is reading a paragraph about stop placement.

   This is why it is three drifting radial gradients and a slow grid
   rather than a canvas particle field. Particles are the obvious
   choice and the wrong one here — they need a script, they repaint
   constantly, they cost battery on exactly the phone this is read
   on, and they would undo the Core Web Vitals work. Everything below
   animates only transform and opacity, so the compositor handles it
   on the GPU and the main thread stays free for reading.

   Cycles are 40–70 seconds and deliberately out of step with each
   other, so the field never visibly repeats.
   ============================================================ */
.ga-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  pointer-events: none; contain: strict;
}
.ga-bg i {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(80px); opacity: .5;
  will-change: transform;
}
.ga-bg i:nth-child(1) {
  width: 58vmax; height: 58vmax; left: -18vmax; top: -22vmax;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in oklab, var(--sig) 26%, transparent), transparent 68%);
  animation: ga-drift-a 54s var(--ez2, ease-in-out) infinite;
}
.ga-bg i:nth-child(2) {
  width: 46vmax; height: 46vmax; right: -16vmax; top: 18vh;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in oklab, var(--viol, #7c5cff) 22%, transparent), transparent 70%);
  animation: ga-drift-b 68s var(--ez2, ease-in-out) infinite;
}
.ga-bg i:nth-child(3) {
  width: 52vmax; height: 52vmax; left: 12vw; bottom: -26vmax;
  background: radial-gradient(circle at 50% 50%,
    color-mix(in oklab, var(--sig) 16%, transparent), transparent 72%);
  animation: ga-drift-c 61s var(--ez2, ease-in-out) infinite;
}

/* The faint rule grid of a chart, drifting upward slowly enough that
   you only notice it if you look for it. */
.ga-bg u {
  position: absolute; inset: -10% -10% -10% -10%; display: block;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--t-1) 4%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--t-1) 4%, transparent) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 78%);
  animation: ga-grid 90s linear infinite;
}

/* Keeps the prose legible over all of it. */
.ga-bg s {
  position: absolute; inset: 0; display: block; text-decoration: none;
  background: radial-gradient(ellipse 90% 70% at 50% 30%,
    transparent, color-mix(in oklab, var(--void) 78%, transparent) 75%);
}

@keyframes ga-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33%      { transform: translate3d(7vw, 5vh, 0) scale(1.14); }
  66%      { transform: translate3d(-4vw, 9vh, 0) scale(.94); }
}
@keyframes ga-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  40%      { transform: translate3d(-9vw, 7vh, 0) scale(1.18); }
  75%      { transform: translate3d(3vw, -5vh, 0) scale(.9); }
}
@keyframes ga-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.04); }
  50%      { transform: translate3d(8vw, -8vh, 0) scale(.88); }
}
@keyframes ga-grid {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(0, -72px, 0); }
}

/* ---------- breadcrumb ---------- */
.ga-crumb {
  font-size: .82rem; color: var(--t-3);
  padding: 22px 0 6px; letter-spacing: .02em;
}
.ga-crumb a { color: var(--t-2); text-decoration: none; }
.ga-crumb a:hover { color: var(--sig); }

/* ---------- header ---------- */
.ga-head { padding: 10px 0 26px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.ga-kicker {
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--sig); margin-bottom: 14px;
}
.ga-head h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.08;
  margin-bottom: 16px; letter-spacing: -.02em;
}
.ga-meta { font-size: .82rem; color: var(--t-3); margin-top: 14px; }

/* ---------- language toggle ---------- */
.ga-lang { display: inline-flex; gap: 2px; margin-top: 20px; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.ga-lang button {
  border: 0; background: none; color: var(--t-2); cursor: pointer;
  font: inherit; font-size: .84rem; padding: 7px 18px; border-radius: 999px;
  transition: background .18s var(--ez), color .18s var(--ez);
}
.ga-lang button.on { background: var(--sig); color: #14100a; font-weight: 600; }
.ga-lang button:not(.on):hover { color: var(--t-1); }

/* ---------- the standing note ---------- */
.ga-note {
  border-left: 2px solid var(--sig-lo);
  background: color-mix(in oklab, var(--sig) 5%, transparent);
  padding: 16px 20px; border-radius: 0 var(--r-xs) var(--r-xs) 0;
  margin-bottom: 36px;
}
.ga-note p { font-size: .88rem; color: var(--t-2); line-height: 1.6; }
.ga-note p + p { margin-top: 10px; }
.ga-small { font-size: .8rem; color: var(--t-3); line-height: 1.6; }

/* ---------- annotated charts ---------- */
.ga-fig { margin: 0 0 30px; }
.ga-fig img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line-2); border-radius: var(--r-xs);
  background: var(--void);
}
.ga-fig figcaption { font-size: .82rem; color: var(--t-3); margin-top: 10px; line-height: 1.6; }

/* Full-bleed on a phone: the annotations are small and every pixel
   of width is worth having. */
@media (max-width: 640px) {
  .ga-fig { margin-left: -16px; margin-right: -16px; }
  .ga-fig img { border-radius: 0; border-left: 0; border-right: 0; }
  .ga-fig figcaption { padding: 0 16px; }
}

/* ---------- the numbered beats ---------- */
.ga-marks { list-style: none; counter-reset: none; padding: 0; margin: 0 0 40px; }
.ga-mark {
  display: grid; grid-template-columns: 40px 1fr; gap: 16px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.ga-mark:last-child { border-bottom: 0; }
.ga-n {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sig); color: #14100a;
  font-weight: 700; font-size: .92rem; font-variant-numeric: tabular-nums;
}
.ga-mark h3 { font-size: 1.02rem; margin-bottom: 8px; line-height: 1.4; }
.ga-mark p { color: var(--t-2); line-height: 1.75; }
.ga-flow {
  display: inline-block; font-size: .78rem; letter-spacing: .04em;
  color: var(--t-3); margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}
.ga-flow b { color: var(--t-2); font-weight: 600; }

/* ---------- levels table ---------- */
.ga-levels { margin: 0 0 40px; }
.ga-levels h2 { font-size: 1.3rem; margin-bottom: 14px; }
.ga-levels table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ga-levels th {
  text-align: left; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--t-3); font-weight: 600; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line-2);
}
.ga-levels td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); color: var(--t-2); vertical-align: top; }
.ga-px { color: var(--sig); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- prose sections ---------- */
.ga-sec { margin: 0 0 40px; }
.ga-sec h2 { font-size: 1.3rem; margin-bottom: 14px; }
.ga-sec p { color: var(--t-2); line-height: 1.8; }
.ga-sec p + p { margin-top: 14px; }

/* ---------- scenarios ---------- */
.ga-scen { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.ga-card {
  border: 1px solid var(--line-2); border-radius: var(--r-xs);
  padding: 18px; background: var(--s-1);
}
.ga-card h3 { font-size: .98rem; margin-bottom: 8px; }
.ga-card p { font-size: .9rem; color: var(--t-2); line-height: 1.7; }
.ga-up      { border-color: color-mix(in oklab, var(--up) 40%, var(--line-2)); }
.ga-down    { border-color: color-mix(in oklab, var(--dn) 40%, var(--line-2)); }
.ga-invalid { border-color: color-mix(in oklab, var(--viol) 40%, var(--line-2)); }

/* ---------- lessons ---------- */
.ga-lessons ol { padding-left: 22px; }
.ga-lessons li { color: var(--t-2); line-height: 1.8; margin-bottom: 12px; }

/* ---------- week close stats ---------- */
.ga-stats { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--line); border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden; }
.ga-stats > div { background: var(--s-1); padding: 14px 16px; }
.ga-stats dt { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--t-3); margin-bottom: 6px; }
.ga-stats dd { font-size: 1.05rem; color: var(--t-1); font-variant-numeric: tabular-nums; }

/* ---------- the gate ---------- */
.ga-gate {
  border: 1px solid var(--line-2); border-radius: var(--r-xs);
  padding: 44px 28px; text-align: center; background: var(--s-1);
  margin-bottom: 40px;
}
.ga-gate h2 { font-size: 1.4rem; margin-bottom: 10px; }
.ga-gate p { color: var(--t-2); margin-bottom: 18px; }
.ga-gate .btn { margin: 4px; }

/* ---------- footer ---------- */
.ga-foot { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 30px; border-top: 1px solid var(--line); }

/* ---------- the index page ---------- */
.ga-month { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--r-xs); overflow: hidden; }
.ga-month > summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--s-1);
}
.ga-month > summary::-webkit-details-marker { display: none; }
.ga-month > summary::after { content: "▾"; color: var(--t-3); transition: transform .2s var(--ez); }
.ga-month[open] > summary::after { transform: rotate(180deg); }
.ga-month-n { font-size: .76rem; color: var(--t-3); font-weight: 400; }

/* ---------- a week, as something you obviously tap ----------
   The first build listed the weeks as rows. They read as a table of
   contents: accurate, and nobody tapped them, because nothing said
   what happens if you do. A row now states the payoff and carries a
   lit control, and the whole card is the target. */
.ga-week {
  display: grid; grid-template-columns: 124px 1fr auto; gap: 18px; align-items: center;
  padding: 20px; border-top: 1px solid var(--line);
  text-decoration: none; color: inherit; position: relative;
  transition: background .18s var(--ez), box-shadow .18s var(--ez);
}
.ga-week::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--sig); opacity: 0; transition: opacity .18s var(--ez);
}
.ga-week:hover, .ga-week:focus-visible {
  background: color-mix(in oklab, var(--sig) 6%, var(--s-2));
  outline: none;
}
.ga-week:hover::before, .ga-week:focus-visible::before { opacity: 1; }

.ga-week-date { font-size: .8rem; color: var(--t-3); font-variant-numeric: tabular-nums; }
.ga-week-t { font-size: 1.04rem; margin-bottom: 6px; line-height: 1.35; display: block; }
.ga-week-s { font-size: .86rem; color: var(--t-3); line-height: 1.55; display: block; }

/* The badge: which week this is, not what the viewer may read. */
.ga-badge {
  display: inline-block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; font-weight: 600;
}
.ga-badge-new {
  color: #14100a; background: var(--sig);
  box-shadow: 0 0 14px color-mix(in oklab, var(--sig) 55%, transparent);
}
.ga-badge-free { color: var(--t-3); border: 1px solid var(--line-2); }

/* The lit control. Neon here means a real glow that strengthens on
   hover, not a colour that shouts from the first frame. */
.ga-cta {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700;
  padding: 11px 18px; border-radius: 999px;
  color: var(--sig);
  border: 1px solid color-mix(in oklab, var(--sig) 45%, transparent);
  background: color-mix(in oklab, var(--sig) 8%, transparent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--sig) 40%, transparent),
              inset 0 0 18px color-mix(in oklab, var(--sig) 10%, transparent);
  text-shadow: 0 0 12px color-mix(in oklab, var(--sig) 60%, transparent);
  animation: ga-pulse 3.2s var(--ez2, ease-in-out) infinite;
  transition: background .18s var(--ez), color .18s var(--ez), box-shadow .18s var(--ez);
}
.ga-cta span { transition: transform .18s var(--ez); }
.ga-week:hover .ga-cta, .ga-week:focus-visible .ga-cta {
  background: var(--sig); color: #14100a; animation: none;
  text-shadow: none;
  box-shadow: 0 0 26px color-mix(in oklab, var(--sig) 65%, transparent);
}
.ga-week:hover .ga-cta span { transform: translateX(3px); }

/* A breath, not a blink. It draws the eye once and then stops
   competing with the words beside it. */
@keyframes ga-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--sig) 34%, transparent),
                         inset 0 0 18px color-mix(in oklab, var(--sig) 10%, transparent); }
  50%      { box-shadow: 0 0 22px 2px color-mix(in oklab, var(--sig) 30%, transparent),
                         inset 0 0 22px color-mix(in oklab, var(--sig) 16%, transparent); }
}

.ga-cta-lock { color: var(--t-2); border-color: var(--line-2); background: transparent; animation: none; text-shadow: none; }
.ga-week:hover .ga-cta-lock { background: var(--t-2); color: var(--void); box-shadow: none; }

@media (max-width: 640px) {
  .ga-week { grid-template-columns: 1fr; gap: 6px; }
  .ga-mark { grid-template-columns: 30px 1fr; gap: 12px; }
  .ga-n { width: 26px; height: 26px; font-size: .8rem; }
}

/* Nothing on this page should animate while it is being read. The
   background becomes a still field, the control stops breathing, and
   everything else keeps working exactly as before. */
@media (prefers-reduced-motion: reduce) {
  .ga-lang button, .ga-week, .ga-month > summary::after, .ga-cta, .ga-cta span { transition: none; }
  .ga-bg i, .ga-bg u, .ga-cta { animation: none; }
}

/* Mobile: the control moves under the text rather than squeezing it
   into a column two words wide. */
@media (max-width: 640px) {
  .ga-week { grid-template-columns: 1fr; gap: 10px; padding: 18px 16px; }
  .ga-cta { width: 100%; justify-content: center; }
  .ga-bg i { filter: blur(60px); opacity: .42; }
}

/* ============================================================
   THE ANNOTATED MAP

   Drawn as an SVG from the real candles, so it colours itself from
   the theme and stays sharp at any size. Everything is sized in the
   SVG's own coordinate space, which means one set of numbers works
   from a phone to a desktop.
   ============================================================ */
.gc-fig { margin-bottom: 34px; }
.gc { width: 100%; height: auto; display: block;
  border: 1px solid var(--line-2); border-radius: var(--r-xs); }
.gc-bgrect { fill: var(--void); }

.gc-grid { stroke: color-mix(in oklab, var(--t-1) 7%, transparent); stroke-width: 1; }
.gc-day  { stroke: color-mix(in oklab, var(--t-1) 5%, transparent); stroke-width: 1; }
.gc-axis { fill: var(--t-3); font-size: 12px; font-family: inherit; font-variant-numeric: tabular-nums; }
.gc-mid  { text-anchor: middle; }
.gc-title { fill: var(--t-2); font-size: 13px; letter-spacing: .06em; font-family: inherit; }

.gc-wick { stroke-width: 1.1; }
.gc-body { stroke-width: 0; }
.gc-up   { stroke: var(--up); fill: var(--up); }
.gc-dn   { stroke: var(--dn); fill: var(--dn); }

/* A pool is liquidity still sitting there; spent is liquidity taken. */
.gc-zone        { opacity: .16; }
.gc-pool        { fill: var(--dn); }
.gc-pool-t      { fill: var(--dn); }
.gc-spent       { fill: var(--t-3); }
.gc-spent-t     { fill: var(--t-3); }
.gc-supply      { fill: var(--viol, #7c5cff); }
.gc-supply-t    { fill: var(--viol, #7c5cff); }
.gc-zlabel, .gc-llabel {
  font-size: 12px; font-family: inherit; letter-spacing: .04em; font-weight: 600;
}

.gc-line        { stroke-width: 1.4; }
.gc-ceiling     { stroke: var(--viol, #7c5cff); }
.gc-ceiling-t   { fill: var(--viol, #7c5cff); }
.gc-invalid     { stroke: var(--sig); }
.gc-invalid-t   { fill: var(--sig); }
.gc-note        { stroke: var(--t-3); }
.gc-note-t      { fill: var(--t-3); }

/* The callouts. A leader line to the exact bar, a numbered disc that
   matches the numbered beat below, and text that wraps itself. */
.gc-lead  { stroke: color-mix(in oklab, var(--sig) 55%, transparent); stroke-width: 1.2; }
.gc-dot   { fill: var(--sig); stroke: var(--void); stroke-width: 1.5; }
.gc-box   { fill: color-mix(in oklab, var(--void) 88%, var(--s-1));
            stroke: color-mix(in oklab, var(--sig) 38%, transparent); stroke-width: 1; }
.gc-num   { fill: var(--sig); }
.gc-numt  { fill: #14100a; font-size: 11px; font-weight: 700; font-family: inherit; }
.gc-ntext { fill: var(--t-2); font-size: 11.5px; font-family: inherit; }

.gc-lastbg { fill: var(--sig); }
.gc-lastt  { fill: #14100a; font-size: 11px; font-weight: 700; font-family: inherit;
             font-variant-numeric: tabular-nums; }

/* On a phone the map is read by pinching into it, so give it room
   and let it keep its proportions rather than squashing the text. */
@media (max-width: 640px) {
  .gc-fig { margin-left: -16px; margin-right: -16px; }
  .gc { border-radius: 0; border-left: 0; border-right: 0; }
}
