/* 248 Anthems — Spyglass Hill · /strategy — "Course Management"
 * Loaded after style.css. Reuses the site's tokens, masthead, section
 * scaffolding, stripe and footer; adds the decision clock and the
 * across-the-seam comparison.
 *
 * Same rule as the course page: dune and forest never share a band. */

.sg-clock, .seam, .rules, .fits { padding-block: clamp(4rem, 9vh, 7.5rem); }

/* ---------- hero ---------- */
.hero-strategy { padding-bottom: clamp(2rem, 4vh, 3rem); }
.thesis {
  margin-top: clamp(2.2rem, 5vh, 3.4rem);
  border-left: 3px solid var(--lime);
  padding: .2rem 0 .2rem 1.4rem;
  max-width: 68ch;
}
.thesis p { font-size: clamp(1.05rem, 1.5vw, 1.24rem); line-height: 1.5; color: var(--charcoal); font-variation-settings: 'wght' 500; }

/* ---------- 01 · the decision clock ---------- */
.sg-clock { background: var(--charcoal); color: var(--bone); }
.sg-clock .sec-no, .sg-clock .sec-kicker { color: color-mix(in srgb, var(--bone) 55%, transparent); }
.sg-clock .sec-rule { background: color-mix(in srgb, var(--bone) 16%, transparent); }
.sg-clock .sec-intro h2 { color: var(--bone); }
.sg-clock .sec-sub { color: color-mix(in srgb, var(--bone) 72%, transparent); }
.sg-clock :focus-visible { outline-color: var(--lime); }

.clock {
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
  background: var(--graphite);
  border: 1px solid color-mix(in srgb, var(--bone) 13%, transparent);
  padding: clamp(1.2rem, 3vw, 2.2rem);
}
.clock-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.clock-run {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; font-size: .72rem; text-transform: uppercase;
  color: var(--charcoal); background: var(--lime);
  padding: .8rem 1.4rem;
}
.clock-run[aria-pressed="true"] { background: var(--bone); }
.clock-run svg { width: 13px; height: 13px; }
.clock-readout { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: color-mix(in srgb, var(--bone) 62%, transparent); }
.clock-readout b { color: var(--lime); font-weight: 500; font-variant-numeric: tabular-nums; }

/* the bar: 32 unit cells, 24 structure + 8 conversion */
.clock-bar { position: relative; display: grid; grid-template-columns: repeat(32, 1fr); gap: 3px; height: 74px; }
.unit { background: color-mix(in srgb, var(--bone) 11%, transparent); transition: background .12s linear; }
.unit.u-down { background: color-mix(in srgb, var(--lime) 20%, transparent); }
.unit.on { background: color-mix(in srgb, var(--bone) 62%, transparent); }
.unit.u-down.on { background: var(--lime); }
.clock-playhead {
  position: absolute; top: -6px; bottom: -6px; width: 2px; left: 0;
  background: var(--orange); opacity: 0; pointer-events: none;
}
.clock.is-running .clock-playhead { opacity: 1; }
.clock-scale { display: grid; grid-template-columns: 24fr 8fr; gap: 3px; margin-top: .6rem; font-size: .58rem; color: color-mix(in srgb, var(--bone) 52%, transparent); }
.clock-scale span { display: block; padding-top: .45rem; border-top: 1px solid color-mix(in srgb, var(--bone) 22%, transparent); }
.clock-scale .conv { border-top-color: var(--lime); color: var(--lime); }

/* Progressive enhancement: the fully-labelled static list is the baseline that
   ships in the HTML. js/strategy.js adds `.js` to the clock — and only when
   motion is allowed — which swaps in the interactive phase strip. */
.clock-run, .phases, .phase-detail { display: none; }
.clock.js .clock-run { display: inline-flex; }
.clock.js .phases { display: grid; }
.clock.js .phase-detail { display: block; }
.clock.js .phases-static { display: none; }

/* phase buttons, sized by their share of the 32 units */
.phases { grid-template-columns: 6fr 5fr 4fr 5fr 4fr 4fr 4fr; gap: 3px; margin-top: 1.4rem; }
.phase {
  text-align: left; padding: .85rem .9rem 1rem;
  background: color-mix(in srgb, var(--bone) 6%, transparent);
  border-top: 2px solid color-mix(in srgb, var(--bone) 22%, transparent);
  transition: background .2s ease, border-color .2s ease;
}
.phase:hover { background: color-mix(in srgb, var(--bone) 12%, transparent); }
.phase[aria-selected="true"] { background: color-mix(in srgb, var(--bone) 15%, transparent); border-top-color: var(--bone); }
.phase.is-conv { border-top-color: color-mix(in srgb, var(--lime) 55%, transparent); }
.phase.is-conv[aria-selected="true"] { border-top-color: var(--lime); }
.phase.is-live { background: color-mix(in srgb, var(--bone) 18%, transparent); }
.phase-units { display: block; font-family: var(--font-mono); font-size: .56rem; letter-spacing: .14em; color: color-mix(in srgb, var(--bone) 55%, transparent); }
.phase.is-conv .phase-units { color: var(--lime); }
.phase-name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .02em; margin-top: .35rem; color: var(--bone); line-height: 1.05; }

.phase-detail {
  margin-top: 1.2rem; border-top: 1px solid color-mix(in srgb, var(--bone) 18%, transparent);
  padding-top: 1.2rem; min-height: 6.5rem;
}
.phase-detail .mono { font-size: .58rem; color: var(--lime); }
.phase-detail h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--bone); margin: .5rem 0 .6rem; }
.phase-detail p { max-width: 62ch; color: color-mix(in srgb, var(--bone) 80%, transparent); font-size: .98rem; }
.phase-detail .secs { margin-top: .8rem; font-family: var(--font-mono); font-size: .58rem; letter-spacing: .12em; color: color-mix(in srgb, var(--bone) 50%, transparent); }

/* the baseline: every phase reads at once, nothing hidden behind interaction */
.phases-static { display: grid; gap: 1px; background: color-mix(in srgb, var(--bone) 18%, transparent); margin-top: 1.4rem; grid-template-columns: repeat(2, 1fr); }
.phases-static > div { background: var(--graphite); padding: 1rem 1.1rem 1.2rem; }
.phases-static .mono { display: block; font-size: .56rem; letter-spacing: .14em; color: color-mix(in srgb, var(--bone) 55%, transparent); }
.phases-static .conv { color: var(--lime); }
.phases-static h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; color: var(--bone); margin: .3rem 0 .4rem; }
.phases-static p { font-size: .93rem; color: color-mix(in srgb, var(--bone) 80%, transparent); max-width: 62ch; }
.clock-note { margin-top: 1.4rem; font-size: .82rem; color: color-mix(in srgb, var(--bone) 62%, transparent); max-width: 74ch; }
.clock-note strong { color: var(--bone); font-variation-settings: 'wght' 600; }

/* ---------- 02 · the two courses ---------- */
.seam-grid { display: grid; grid-template-columns: 1fr 3px 1fr; margin-top: clamp(1.8rem, 4vh, 2.6rem); border: 1px solid var(--ash); }
.seam-col { padding: clamp(1.4rem, 3vw, 2.2rem); }
.seam-dune { background: color-mix(in srgb, var(--dune) 14%, var(--bone)); }
.seam-forest { background: color-mix(in srgb, var(--forest) 9%, var(--bone)); }
.seam-line { background: var(--orange); position: relative; }
.seam-line::after {
  content: 'THE TURN'; position: absolute; top: 3.2rem; left: 50%;
  transform: translate(-50%, -50%) rotate(90deg);
  font-family: var(--font-mono); font-weight: 500; font-size: .55rem; letter-spacing: .22em;
  color: var(--orange-deep); background: var(--bone); padding: .25em .5em; white-space: nowrap;
}
.seam-col > .mono { font-size: .58rem; color: var(--ink-dim); }
.seam-col h3 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: .4rem 0 .1rem; color: var(--charcoal); }
.seam-dune h3 { color: var(--dune-deep); }
.seam-forest h3 { color: var(--forest-deep); }
.seam-lede { font-size: .95rem; color: #3B3D3D; margin-bottom: 1.2rem; max-width: 46ch; }
.seam-list { list-style: none; padding: 0; display: grid; gap: .85rem; }
.seam-list li { position: relative; padding-left: 1.4rem; font-size: .93rem; color: #33352F; max-width: 48ch; }
.seam-list li::before { content: ''; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; }
.seam-dune .seam-list li::before { background: var(--dune-deep); }
.seam-forest .seam-list li::before { background: var(--forest-deep); }
.seam-list .method { color: var(--ink-dim); font-size: .86rem; }
.seam-list .method::before { background: var(--ash) !important; }
.seam-key { margin-top: 1.4rem; padding-top: .9rem; border-top: 1px solid var(--hairline); font-size: .58rem; color: var(--ink-dim); }

/* ---------- 03 · rules of engagement ---------- */
.rules { padding-top: 0; }
.rules-grid {
  list-style: none; padding: 0; margin: clamp(1.6rem, 4vh, 2.4rem) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--hairline); border: 1px solid var(--hairline);
}
.rule { background: var(--bone); padding: clamp(1.2rem, 2.4vw, 1.7rem); display: flex; flex-direction: column; }
.rule-no { display: block; font-size: .6rem; color: var(--ink-dim); margin-bottom: 1.4rem; }
.rule h3 { font-size: 1.3rem; margin-bottom: .5rem; line-height: 1.02; }
.rule p { font-size: .9rem; color: #3B3D3D; }

/* ---------- 04 · where the anthem fits ---------- */
.fits { padding-top: 0; }
.fits-grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(1.6rem, 4vw, 3.2rem); margin-top: clamp(1.6rem, 4vh, 2.4rem); align-items: start; }
.fits-list { list-style: none; padding: 0; display: grid; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.fits-list li { background: var(--bone-hi); padding: 1.1rem 1.3rem 1.3rem; }
.fits-list .mono { display: block; font-size: .58rem; color: var(--ink-dim); margin-bottom: .4rem; }
.fits-list h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.fits-list p { font-size: .92rem; color: #3B3D3D; max-width: 56ch; }
.fits-cta {
  background: var(--graphite); color: var(--bone);
  padding: clamp(1.4rem, 3vw, 2rem);
  border-top: 3px solid var(--lime);
}
.fits-cta h3 { font-size: 1.7rem; color: var(--bone); }
.fits-cta p { margin-top: .7rem; font-size: .92rem; color: color-mix(in srgb, var(--bone) 74%, transparent); }
.fits-cta a {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.2rem;
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; font-size: .68rem; text-transform: uppercase;
  color: var(--charcoal); background: var(--lime); padding: .8rem 1.2rem; text-decoration: none;
  transition: transform .22s ease;
}
.fits-cta a:hover { transform: translateX(4px); }

/* ---------- the honesty box ---------- */
.limits { margin-top: clamp(2rem, 5vh, 3rem); border: 1px solid var(--ash); background: var(--bone-hi); padding: clamp(1.3rem, 3vw, 2rem); }
.limits .mono { font-size: .6rem; color: var(--ink-dim); }
.limits h3 { font-size: 1.5rem; margin: .5rem 0 .7rem; color: var(--charcoal); }
.limits p { font-size: .92rem; color: #3B3D3D; max-width: 82ch; }
.limits p + p { margin-top: .7rem; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .fits-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .seam-grid { grid-template-columns: 1fr; }
  .seam-line { height: 3px; }
  .seam-line::after { top: 50%; left: 50%; transform: translate(-50%, -50%); }
}
@media (max-width: 780px) {
  .clock.js .phases { grid-template-columns: repeat(2, 1fr); }
  .phases-static { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .clock-bar { height: 54px; }
  .phase-name { font-size: 1rem; }
}
@media (max-width: 560px) {
  .rules-grid { grid-template-columns: 1fr; }
}

/* ---------- reduced motion: the clock stays the static, fully-labelled diagram ----------
   js/strategy.js never adds `.js` when reduced motion is set, so the interactive
   strip is never built and the baseline list is what renders. These rules just
   make sure nothing else animates. */
@media (prefers-reduced-motion: reduce) {
  .clock-playhead { display: none; }
  .unit, .phase, .fits-cta a { transition: none; }
}
