/* Method — the opener, the sequence, SMT and time. The models, the glossary, the library and the closing line are in
   method-models.css. The kit's charts sit straight on their section's ground: --c-bg is set to that ground so label
   halos, tags and fill marks match it. Mobile first; desktop from 900 px. */

[data-slot] > .tu-ch { width: 100%; height: 100%; }
.tu-ch--light { --c-bg: var(--paper); }
.smt .tu-ch { --c-bg: var(--ink); }
/* the zones the method adds: premium (the shorts' side) and discount (the longs' side) */
.tu-ch-zone--prem { fill: rgba(184, 50, 43, .04); }
.tu-ch-zone--disc { fill: rgba(11, 122, 87, .045); }

/* a progress hairline over a step's top rule (opener steps, sequence rail) */
.mo-steps i, .sq-rail i { position: absolute; left: 0; right: 0; top: -1px; height: 2px; }
.mo-steps b, .sq-rail b { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- 1. opener: the H1, the six steps, and the two days they draw ---------- */
.mo { min-height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: calc(var(--hdr) + clamp(28px, 5vh, 56px)) 0 clamp(20px, 3.5vh, 40px); }
.mo-head { display: grid; gap: 16px; }
.mo-h1 { font-family: var(--serif); font-weight: 400; font-size: var(--t-h1); line-height: .94; letter-spacing: -.014em; }
.mo-h1 span { display: block; }
.mo-sub { max-width: 30ch; font-size: var(--t-lead); line-height: 1.45; letter-spacing: -.012em; color: var(--ink-soft); text-wrap: pretty; }
.mo-plate { display: grid; grid-template-rows: auto minmax(0, 1fr); margin-top: clamp(28px, 4.5vh, 52px); }
.mo-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 5px; }
.mo-steps li { position: relative; display: grid; gap: 1px; padding-top: 9px; border-top: 1px solid var(--rule); font-size: 11.5px; font-weight: 500; letter-spacing: -.01em; color: var(--ink-mute); white-space: nowrap; overflow: hidden; transition: color .4s var(--ease); }
.mo-steps .mono { font-size: 10.5px; font-weight: 400; }
.mo-steps li.is-done { color: var(--ink-soft); }
.mo-steps li.is-on { color: var(--ink); }
.mo-steps li.is-done b { transform: none; }
.mo-steps li.is-on b { transform: none; transition: transform var(--bar, 1.7s) linear; }
.mo-days { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 18px; min-height: 340px; margin-top: 18px; }
.mo-day { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 6px; min-height: 0; }
.mo-cap { display: flex; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.mo-cap .mono { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--ink-mute); }
.mo-side { font-weight: 600; }
.mo-ch { min-height: 0; overflow: hidden; }
/* the bias zones reach past the price range; the charts are drawn with fs 11 and no session labels, so the plot
   starts 9 px down (chart.js layout): clip there */
.mo-ch > .tu-ch { clip-path: inset(9px 0 0 0); }
.js .mo-h1 span { opacity: 0; transform: translateY(.16em); transition: opacity .9s var(--ease), transform 1.2s var(--ease); }
.js .mo-h1 span + span { transition-delay: .09s; }
.js .mo-sub, .js .mo-plate { opacity: 0; transition: opacity 1s var(--ease) .3s; }
.js .mo.is-in .mo-h1 span, .js .mo.is-in .mo-sub, .js .mo.is-in .mo-plate { opacity: 1; transform: none; }
.rm .mo-h1 span, .rm .mo-sub, .rm .mo-plate { opacity: 1 !important; transform: none !important; transition: none !important; }
@media (min-width: 900px) {
  .mo { min-height: clamp(660px, 100svh, 1100px); }
  .mo-head { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  /* the H1 runs the full width; the line sits beside its shorter second line */
  .mo-h1 { grid-column: 1 / -1; grid-row: 1; }
  .mo-sub { grid-column: 10 / span 3; grid-row: 1; padding-bottom: .4em; }
  .mo-steps { gap: 0 var(--gap); }
  .mo-steps li { grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; padding-top: 13px; font-size: 15px; }
  .mo-steps .mono { font-size: 12px; }
  .mo-days { grid-template-rows: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); min-height: 260px; margin-top: clamp(22px, 3.2vh, 36px); }
  .mo-day { gap: 10px; }
}

/* ---------- 2. the sequence: a sticky stage; scroll picks the step ---------- */
.sq { padding-top: var(--sec); }
.sq-head { display: grid; gap: 14px; }
.sq-head .lead { max-width: 28ch; }
.sq-track { position: relative; height: calc(100svh + 6 * 64svh); margin-top: clamp(12px, 2vw, 32px); }
.sq-stage { position: sticky; top: 0; height: 100svh; padding: calc(var(--hdr) + 14px) 0 calc(20px + env(safe-area-inset-bottom)); }
.sq-grid { height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 18px; }
.sq-rail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 5px; }
.sq-rail button {
  position: relative; display: grid; align-content: start; gap: 1px; min-height: 44px; padding-top: 9px; text-align: left;
  border-top: 1px solid var(--rule); color: var(--ink-mute); font-size: 11.5px; font-weight: 500; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; transition: color .3s var(--ease);
}
.sq-rail .mono { font-size: 10.5px; font-weight: 400; }
.sq-rail b { transform: scaleX(var(--p, 0)); }
.sq-rail button.is-done { color: var(--ink-soft); }
.sq-rail button.is-done b { transform: none; }
.sq-rail button[aria-pressed="true"] { color: var(--ink); }
.rm .sq-rail button[aria-pressed="true"] b { transform: none; }
.sq-fig { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; min-height: 0; }
.sq-cap, .smt-cap, .md-ex-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; font-size: 13px; color: var(--ink-mute); }
.sq-cap span:first-child, .smt-cap span:first-child, .md-ex-top span:first-child { color: var(--ink); font-weight: 500; letter-spacing: -.01em; }
.sq-cap .mono, .smt-cap .mono, .md-ex-top .mono { font-size: 12px; }
.sq-chart { min-height: 0; }
.sq-stage[data-s="2"] .tu-ch-sess--ny { fill: rgba(11, 11, 12, .1); }
.sq-steps { display: grid; }
.sq-steps li { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s var(--ease), transform .5s var(--ease), visibility 0s .3s; }
.sq-steps li.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s var(--ease) .06s, transform .8s var(--ease) .06s; }
.sq-n { display: block; font-size: 12px; color: var(--ink-mute); }
.sq-steps h3 { margin-top: 6px; font-size: clamp(26px, 7.2vw, 34px); font-weight: 500; line-height: 1.04; letter-spacing: -.035em; }
.sq-steps p { margin-top: 8px; max-width: 36ch; min-height: 2.9em; font-size: 16px; line-height: 1.45; letter-spacing: -.01em; color: var(--ink-soft); text-wrap: pretty; }
.rm .sq-steps li { transition: none; transform: none; }
@media (min-width: 900px) {
  .sq-head { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: end; }
  .sq-head .h2 { grid-column: 1 / span 7; }
  .sq-head .lead { grid-column: 9 / span 4; padding-bottom: .3em; }
  .sq-stage { padding: calc(var(--hdr) + 6svh) 0 7svh; }
  .sq-grid { grid-template-columns: repeat(12, 1fr); grid-template-rows: auto minmax(0, 1fr); column-gap: var(--gap); row-gap: 0; }
  .sq-rail { grid-column: 1 / span 4; grid-row: 1; grid-template-columns: 1fr; }
  .sq-rail button { display: flex; align-items: baseline; gap: 0; min-height: 0; padding: 13px 0 12px; font-size: var(--t-h3); letter-spacing: -.02em; }
  .sq-rail button .mono { flex: none; width: 40px; font-size: 12px; letter-spacing: 0; }
  .sq-rail button:hover { color: var(--ink); }
  .sq-rail button:last-of-type { border-bottom: 1px solid var(--rule); }
  .sq-fig { grid-column: 6 / span 7; grid-row: 1 / span 2; gap: 14px; }
  .sq-steps { grid-column: 1 / span 4; grid-row: 2; align-self: end; }
  .sq-steps h3 { margin-top: 10px; font-size: clamp(34px, 3.2vw, 50px); letter-spacing: -.04em; }
  .sq-steps p { margin-top: 14px; max-width: 30ch; font-size: var(--t-lead); }
}
.rm .sq-track { height: auto; }
.rm .sq-stage { position: relative; height: auto; }
.rm .sq-grid { grid-template-rows: auto 64svh auto; }
@media (min-width: 900px) { .rm .sq-grid { grid-template-rows: auto minmax(0, 1fr); height: 82svh; } }

/* ---------- 3. SMT on ink: the heading, the two markets in the kit chart's two panes, then what they show ---------- */
.smt { background: var(--ink); color: var(--on-ink); padding: var(--sec) 0; }
.smt-grid { display: grid; }
.smt-fig { margin-top: clamp(32px, 4.5vw, 72px); }
.smt-cap { padding-bottom: 12px; border-bottom: 1px solid var(--rule-ink); color: var(--on-ink-mute); }
.smt-cap span:first-child { color: var(--on-ink); }
.smt-ch { height: min(132vw, 560px); margin-top: 14px; }
/* the copy's panel titles ride on the kit's pane labels, either side of the divider */
.smt-ch .tu-ch-panelbl { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: -.015em; fill: var(--on-ink); }
.smt-copy { margin-top: 28px; display: grid; gap: 10px; }
.smt-s1 { max-width: 26ch; font-size: clamp(21px, 2vw, 30px); font-weight: 500; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.smt-s2 { max-width: 34ch; font-size: var(--t-body); line-height: 1.5; color: var(--on-ink-soft); }
@media (min-width: 900px) {
  .smt-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .smt-h { grid-column: 1 / span 8; grid-row: 1; }
  .smt-fig { grid-column: 1 / -1; grid-row: 2; }
  .smt-ch { height: clamp(460px, 42vw, 660px); margin-top: 18px; }
  .smt-ch .tu-ch-panelbl { font-size: 17px; }
  .smt-copy { grid-column: 1 / -1; grid-row: 3; grid-template-columns: subgrid; align-items: baseline; margin-top: clamp(28px, 3vw, 44px); }
  .smt-s1 { grid-column: 1 / span 6; }
  .smt-s2 { grid-column: 8 / span 4; }
}

/* ---------- 4. time: the day over a 24-hour band; drag the chart or the band to move the clock ---------- */
.tm { padding: var(--sec) 0; }
.tm-grid { display: grid; }
.tm-head { display: grid; gap: 14px; }
.tm-head .lead { max-width: 28ch; }
.tm-scrub { order: 1; }
.tm-amd { order: 2; }
.tm-defs { order: 3; display: grid; gap: 22px; margin-top: 44px; }
.tm-defs div { padding-top: 12px; border-top: 1px solid var(--ink); }
.tm-defs dt { font-size: var(--t-h3); font-weight: 500; letter-spacing: -.02em; }
.tm-defs dd { margin-top: 6px; max-width: 40ch; font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.tm-scrub {
  --x: 0; --plot-w: 100%; --band: 64px; position: relative; margin-top: clamp(40px, 5vw, 80px); padding-top: 42px;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize;
}
.tm-chart { height: min(82vw, 440px); }
.tm-band { position: relative; width: var(--plot-w); height: var(--band); margin-top: 6px; border-top: 1px solid var(--ink); }
.tm-win { font-style: normal; position: absolute; top: 9px; left: calc(var(--a) / 24 * 100%); width: calc((var(--b) - var(--a)) / 24 * 100%); height: 8px; border-radius: 2px; background: var(--paper-3); transition: background-color .3s var(--ease); }
.tm-win b { display: none; }
.tm-win.is-on { background: var(--ink); }
.tm-q { position: absolute; left: 0; right: 0; top: 26px; display: grid; grid-template-columns: repeat(4, 1fr); font: 400 11px/1 var(--mono); color: var(--ink-mute); }
.tm-q i { height: 16px; padding: 3px 0 0 6px; font-style: normal; border-left: 1px solid var(--rule); transition: color .3s, border-color .3s; }
.tm-scrub[data-q="0"] .tm-q i:nth-child(1), .tm-scrub[data-q="1"] .tm-q i:nth-child(2),
.tm-scrub[data-q="2"] .tm-q i:nth-child(3), .tm-scrub[data-q="3"] .tm-q i:nth-child(4) { color: var(--ink); border-left-color: var(--ink); }
.tm-to { position: absolute; left: 25%; top: 45px; padding-left: 6px; font-size: 11px; font-weight: 500; color: var(--ink-mute); white-space: nowrap; transition: color .3s; }
.tm-scrub.is-to .tm-to { color: var(--ink); }
.tm-play { position: absolute; top: 34px; bottom: 0; left: calc(var(--x) * var(--plot-w)); width: 0; border-left: 1px solid var(--ink); pointer-events: none; }
.tm-clock { position: absolute; top: -30px; left: 0; transform: translateX(calc(var(--x) * -100%)); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1.2; white-space: nowrap; }
.tm-play::after { content: ""; position: absolute; left: -8.5px; bottom: calc(var(--band) - 21px); width: 16px; height: 16px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--ink), 0 2px 8px rgba(11, 11, 12, .16); transition: transform .25s var(--ease); }
.tm-scrub.is-drag .tm-play::after { transform: scale(1.2); }
.tm-scrub.is-drag .tm-clock { box-shadow: 0 0 0 4px rgba(11, 11, 12, .1); }
.tm-range { position: absolute; left: 0; bottom: 0; width: var(--plot-w); height: var(--band); margin: 0; opacity: 0; pointer-events: none; }
.tm-scrub:has(.tm-range:focus-visible) .tm-clock { outline: 2px solid var(--ink); outline-offset: 3px; }
.tm-amd { width: 100%; margin-top: 28px; border-top: 1px solid var(--ink); }
.tm-amd th, .tm-amd td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule-2); text-align: left; vertical-align: baseline; font-weight: 400; }
.tm-amd thead th { padding: 11px 12px 9px 0; font-size: 13px; color: var(--ink-mute); }
.tm-amd tbody tr { color: var(--ink-mute); transition: color .3s var(--ease); }
.tm-amd tbody th { font-size: 16px; font-weight: 500; letter-spacing: -.015em; white-space: nowrap; }
.tm-amd td.mono { font-size: 13px; white-space: nowrap; }
.tm-k { display: block; font-size: 16px; font-weight: 500; letter-spacing: -.015em; }
.tm-v { display: block; margin-top: 2px; font-size: 14px; line-height: 1.4; }
.tm-amd tbody tr.is-on { color: var(--ink); }
.tm-amd tbody tr.is-on .tm-v { color: var(--ink-soft); }
@media (min-width: 900px) {
  .tm-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .tm-head { grid-column: 1 / span 6; grid-row: 1; align-self: end; }
  .tm-defs { order: 0; grid-column: 8 / span 5; grid-row: 1; align-self: end; grid-template-columns: 1fr 1fr; column-gap: var(--gap); margin: 0; }
  .tm-scrub, .tm-amd { grid-column: 1 / -1; }
  .tm-scrub { --band: 72px; padding-top: 48px; }
  .tm-play { top: 40px; }
  .tm-chart { height: clamp(380px, 34vw, 520px); }
  .tm-win { top: 9px; height: 26px; border-radius: 4px; }
  .tm-win b { display: block; padding: 5px 9px; overflow: hidden; font-size: 13px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; color: var(--ink); }
  .tm-win.is-on b { color: var(--paper); }
  .tm-q { top: 43px; }
  .tm-to { top: 60px; }
  .tm-play::after { bottom: calc(var(--band) - 30px); }
  .tm-amd { margin-top: 40px; }
  .tm-amd th:first-child { width: 22%; }
  .tm-amd td.mono { width: 22%; }
  .tm-k { display: inline; }
  .tm-v { display: inline; margin: 0 0 0 16px; font-size: 15px; }
}
