/* The site's own pages around the app: the welcome page (index.html), about.html and discussion.html.
   Everything else comes from app.css: its tokens, header, disclaimer strip, buttons, chips and guide cards. */

/* the app's #app grid fills the window; these pages scroll as documents instead */
body.site{height:auto;min-height:100%;display:flex;flex-direction:column}
body.site main{flex:1 0 auto;display:block}

/* ---------- header: the brand; the nav itself is styled in app.css, as it is the same on every page ---------- */
.wordmark{font-size:28px;line-height:1;font-weight:820;font-stretch:125%;letter-spacing:-0.01em;color:var(--ink);text-decoration:none}
.site header.top{align-items:flex-end}
.site .brand{padding-bottom:12px}

/* ---------- hero: the copy in a band on top, the frontier map filling the rest. Nothing sits over the map. ---------- */
/* --edge lines the copy and the plot up with the .doc sections below: their 1180px column, less its 22px padding */
.hero{--edge:max(22px,calc((100% - 1136px) / 2));display:flex;flex-direction:column;min-height:clamp(600px,calc(100svh - 108px),840px);background:var(--surface);
  border-bottom:1px solid var(--rule);overflow:hidden}
.herocopy{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:center;gap:12px clamp(28px,5vw,72px);
  padding:clamp(18px,3vh,30px) var(--edge) clamp(16px,2.6vh,26px);border-bottom:1px solid var(--rule)}
.hero h1{margin:0;font-size:clamp(28px,2.7vw,38px);line-height:1;font-weight:820;font-stretch:125%;letter-spacing:-0.015em}
/* each sentence starts its own line */
.hero h1 span{display:block;text-wrap:balance}
.herosub{margin:0;max-width:58ch;font-size:16px;line-height:1.5;color:var(--muted);text-wrap:pretty}
.cta{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.cta .btn{display:inline-flex;align-items:center;padding:12px 22px;font-size:15.5px;font-weight:620;border-radius:6px;text-decoration:none;
  color:var(--ink);background:var(--paper);transition:border-color .15s ease-out}
.cta .btn.primary{color:var(--surface);background:var(--accent)}
.cta .btn:not(.primary):hover{border-color:var(--accent)}

/* the map: until hero.js takes over (.live) the band is plain chart paper */
.heromap{position:relative;flex:1;min-height:420px;display:flex;flex-direction:column}
.heroplot{position:relative;flex:1;min-height:0;
  background:repeating-linear-gradient(0deg,transparent 0 63px,rgb(128 128 128 / .14) 63px 64px),
    repeating-linear-gradient(90deg,transparent 0 95px,rgb(128 128 128 / .14) 95px 96px)}
.hero.live .heroplot{background:none}
.heroplot canvas{position:absolute;inset:0;width:100%;height:100%;z-index:1;touch-action:pan-y}
.heroplot .tip{display:block;z-index:3}
.heroplot .tip[hidden]{display:none}
/* the month on the map, big and faint behind the points, low in the right where the plot is quietest */
.heromonth{position:absolute;z-index:0;right:var(--edge);top:22px;margin:0;font-size:clamp(44px,6vw,96px);line-height:.9;font-weight:820;
  font-stretch:125%;letter-spacing:-0.02em;color:var(--ink);opacity:.08;white-space:nowrap;pointer-events:none;user-select:none}

/* under the plot: the playback on the left, the key and caption on the right */
.herobar{position:relative;z-index:2;padding:0 var(--edge) 18px;display:flex;align-items:flex-end;justify-content:space-between;gap:16px 40px}
.hero:not(.live) .pbar,.hero:not(.live) .legend{visibility:hidden}
.pbar{display:flex;align-items:flex-start;gap:12px}
.heroplay{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 14px 0 12px;background:var(--paper);color:var(--ink);font-weight:620;
  min-width:7.6em;transition:border-color .15s ease-out}
.heroplay:hover{border-color:var(--accent)}
.heroplay svg{flex:none;display:none}
.heroplay[data-mode="play"] .i-play,.heroplay[data-mode="pause"] .i-pause,.heroplay[data-mode="replay"] .i-replay{display:block}
.scrub{width:clamp(200px,24vw,340px);padding-top:8px}
.scrub input{--fill:0%;display:block;width:100%;height:20px;margin:0;background:none;-webkit-appearance:none;appearance:none;cursor:pointer}
.scrub input::-webkit-slider-runnable-track{height:4px;border-radius:2px;background:linear-gradient(90deg,var(--accent) var(--fill),var(--rule) var(--fill))}
.scrub input::-moz-range-track{height:4px;border-radius:2px;background:linear-gradient(90deg,var(--accent) var(--fill),var(--rule) var(--fill))}
.scrub input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;margin-top:-6px;border-radius:50%;background:var(--ink);border:3px solid var(--surface);
  box-shadow:0 0 0 1px var(--ink)}
.scrub input::-moz-range-thumb{width:10px;height:10px;border-radius:50%;background:var(--ink);border:3px solid var(--surface);box-shadow:0 0 0 1px var(--ink)}
.scrub input:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.ends{display:flex;justify-content:space-between;margin:2px 0 0;color:var(--muted);font-size:12px;font-stretch:88%}
/* signed out: the earlier months as one locked segment before the slider (app.css .pblocked), and a note under it */
.herotrack{display:flex;align-items:center;gap:6px}
.scrub:has(.herotrack){width:clamp(260px,30vw,420px)}   /* the segment takes a third: the open months keep their room */
.herotrack input{flex:1 1 auto;min-width:60px}
.herolockslot{flex:0 0 34%}
.herolockslot .pblocked{min-height:24px}
.herotrack + .ends{margin-left:calc(34% + 6px)}
.herolock{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:8px 0 0;max-width:34em;color:var(--muted);font-size:12.5px;line-height:1.4}
.herokey{text-align:right;min-width:0}
.legend{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:4px 16px;margin:0;font-size:12.5px;font-stretch:88%;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.legend i{display:block;flex:none;width:9px;height:9px;border-radius:50%}
.legend .k-etf{background:var(--etf)}
.legend .k-stock{background:var(--stock)}
.legend .k-list{width:12px;height:12px;border:1.8px solid var(--gold)}
.legend .k-edge{width:16px;height:2px;border-radius:1px;background:var(--accent)}
.legend .k-rest{width:6px;height:6px;background:var(--muted);opacity:.5}
.herocap{margin:6px 0 0;color:var(--muted);font-size:12px;font-stretch:88%}
.herocap span{white-space:nowrap}
.herostatus{position:absolute;z-index:2;right:var(--edge);bottom:90px;margin:0;color:var(--muted);font-size:13px;font-stretch:92%}
.herostatus:empty{display:none}
.hero ::selection{background:rgb(var(--accent-rgb) / .22)}

/* ---------- sections below ---------- */
.site .doc{padding-top:44px;padding-bottom:12px}
.site .doc + .doc{padding-top:72px}
.site .doc .lede{margin-bottom:20px}
.moves .movers{gap:28px}
.moves h3{margin:0 0 10px;font-size:14px;font-stretch:88%;font-weight:680}
.moves a.tick{display:inline-block;margin:0 5px 6px 0;padding:3px 10px;border:1px solid var(--rule);border-radius:999px;background:var(--surface);
  font-weight:600;font-stretch:90%;text-decoration:none;transition:border-color .15s ease-out}
.moves a.tick:hover{border-color:var(--accent);text-decoration:none}
/* gold marks the frontier list, as the map's rings do; who left it is dashed and muted */
#joined a.tick{border:2px solid var(--gold);padding:2px 9px}
#left a.tick{color:var(--muted);border-style:dashed}
#joined a.tick:hover,#left a.tick:hover{border-color:var(--accent)}
.moves .none{margin:0;color:var(--muted)}
.learn .guidecards a:hover b{text-decoration:underline;text-underline-offset:3px}
/* the other pages to read, under the guides: quieter than the guide cards */
.more{list-style:none;margin:12px 0 0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.more a{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:12px 16px;border:1px solid var(--rule);border-radius:10px;
  background:var(--surface);color:var(--ink);text-decoration:none}
.more a:hover{border-color:var(--accent)}
.more b{font-size:15px;font-weight:700;font-stretch:104%}
.more span{color:var(--muted);font-size:12.5px;font-stretch:90%}

/* ---------- About and Discussion: the heading and intro ---------- */
.pending{padding-top:clamp(40px,8vh,96px)}
.pending h1{margin:0 0 10px;font-size:clamp(36px,5vw,64px);line-height:1;font-weight:820;font-stretch:125%;letter-spacing:-0.015em}
.pending .lede{font-size:16px;line-height:1.5}
.pending .cta{margin-top:8px}

/* ---------- About and Discussion: the list of write-ups, and one write-up (writeups.js) ---------- */
.postcards small{display:block;margin-top:10px;color:var(--muted);font-size:12px;font-stretch:90%}
.post h1{margin:0 0 10px;max-width:26ch;font-size:clamp(30px,4.2vw,48px);line-height:1.05;font-weight:820;font-stretch:118%;letter-spacing:-0.015em}
.post h1:focus{outline:none}
.postmeta{margin:0 0 14px;color:var(--muted);font-size:13px;font-stretch:92%}
.post .guidebody h2{margin:38px 0 10px;font-size:24px}
.post .guidebody h3{margin:26px 0 8px;font-size:17px}
.postend{margin-top:36px;padding-top:14px;border-top:1px solid var(--rule);max-width:72ch}

/* ---------- footer ---------- */
.foot{margin-top:56px;padding:22px 22px 28px;border-top:1px solid var(--rule);display:flex;flex-wrap:wrap;gap:8px 28px;align-items:baseline;
  color:var(--muted);font-size:12.5px;font-stretch:92%}
.foot .wordmark{font-size:16px}
.foot p{margin:0;max-width:80ch}
.foot a{color:var(--muted)}

@media (max-width:860px){
  .wordmark{font-size:22px}
  .site .brand{padding-bottom:8px}
  /* phones: the copy first, the map under it with the playback and key below the plot */
  .hero{--edge:14px;min-height:0}
  .herocopy{display:block;padding:32px 14px 20px}
  .heroask{margin-top:16px}
  .herosub{max-width:none}
  .cta{flex-direction:column}
  .cta .btn{justify-content:center}
  .heromap{min-height:0;padding-bottom:18px}
  .heroplot{flex:none;height:clamp(380px,62svh,520px)}
  .heromonth{top:10px;font-size:clamp(36px,11vw,56px)}
  .herobar{flex-direction:column;align-items:stretch;gap:14px;padding:4px 14px 0}
  .pbar{width:100%}
  .scrub{flex:1;width:auto}
  .herokey{text-align:left}
  .legend{justify-content:flex-start;gap:4px 14px}
  .herocap span{white-space:normal}
  .herostatus{position:static;padding:0 14px}
  .site .doc{padding:32px 14px 12px}
  .foot{padding:20px 14px 24px}
}
@media (prefers-reduced-motion:reduce){.cta .btn,.moves a.tick,.heroplay{transition:none}}
