/* v51 · the integration's own lines: issue of the day, subscribe + Home Screen steps, «recount it yourself», cross-links,
   modules placed inside our cards, Brief / In full. Only the page tokens (--ink, --line, --acc …), both themes, 360 px. */
.v51-issue{padding:28px 0 8px;border-top:1px solid var(--line)}
.v51-issue>.phc{max-width:none}
.hero>.v51-issue{margin-top:32px}
.v51-issue-side{display:grid;gap:16px;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));margin-top:16px;align-items:start}
.v51-perma{margin-top:8px}
.v51-xref{font-size:14px;margin:10px 0 0;line-height:1.6;color:var(--ink2);overflow-wrap:anywhere}
.v51-xref a{color:var(--acc);text-decoration:none;border-bottom:1px solid var(--line2)}
.v51-xref a:hover{border-bottom-color:var(--acc)}
.v51-sub,.v51-card{border:1px solid var(--line);border-radius:14px;background:var(--card);padding:16px;min-width:0}
.v51-home{margin-top:10px}
.v51-home ol{margin:8px 0 0 18px;padding:0;font-size:14px;color:var(--ink2);line-height:1.55}
.v51-home li{margin:6px 0}
.v51-home li.on{color:var(--ink);font-weight:600}
.v51-dl{margin:14px 0 4px;font-size:14px;color:var(--ink2);display:flex;flex-wrap:wrap;gap:4px 8px;align-items:baseline}
.v51-dl a{color:var(--acc)}
.v51-dl details{display:inline-block}
.v51-dl summary{cursor:pointer;color:var(--acc);display:inline}
.v51-dl details p{margin:6px 0 0;font-size:13.5px;max-width:720px}
.v51-nest{margin-top:14px;padding-top:12px;border-top:1px dashed var(--line2);min-width:0;max-width:100%;overflow-x:auto}
.panel,.mod{min-width:0}
.v51-dated{margin-top:12px}
.v51-games{grid-column:1/-1}
.phc-seal{font-size:13px;color:var(--ink2);margin:10px 0 0;overflow-wrap:anywhere}
.phc-seal a{color:var(--acc)}
.phc-2m .wi{display:block;font-size:13px;color:var(--ink2);margin-top:4px;padding-left:10px;border-left:2px solid var(--gold)}
/* Brief / In full */
.v51-depth{display:inline-flex;border:1px solid var(--line2);border-radius:999px;overflow:hidden;margin-left:auto;font-size:12.5px;flex:none}
.v51-depth button{border:0;background:transparent;color:var(--ink2);padding:5px 11px;cursor:pointer;font:inherit}
.v51-depth button[aria-pressed="true"]{background:var(--ink);color:var(--bg)}
html.depth-brief main details.more:not(.v51-keep){display:none}
html.depth-brief main :is(.phc,.mkl,.ym,.rc-mod) details.more{display:block}
html.depth-brief main .deliv{display:none}
/* the issue page */
.v51-ipage{padding:36px 0 24px}
.v51-ipage h1{font-size:clamp(30px,6vw,52px);letter-spacing:-.02em;line-height:1.08;margin:0 0 6px}
.v51-arch{list-style:none;padding:0;margin:12px 0 0;display:flex;flex-wrap:wrap;gap:6px}
.v51-arch a{display:inline-block;padding:4px 10px;border:1px solid var(--line2);border-radius:999px;font-size:13px;color:var(--ink);text-decoration:none}
.v51-arch a[aria-current]{background:var(--ink);color:var(--bg)}
/* phone: the issue on the first or second screen; nothing wider than the screen */
@media (max-width:640px){
  .hero{padding-bottom:20px}
  .v51-issue{padding-top:18px}
  /* the issue of the day right after the first-screen text: the Desk preview and the counters follow it */
  .hero{display:flex;flex-direction:column}
  .hero>.hgrid{display:contents}
  .hero>.hgrid>:first-child{order:1}
  .hero>.v51-issue{order:2;margin-top:8px}
  .hero>.v51-tour{order:2}  /* v52: the tour right after the issue, not above the first screen */
  .hero>.hgrid>.desk{order:3;margin-top:24px}
  .hero>.stats{order:4}
  main .phc,main .mkl,main .ym,main .rc-mod{max-width:100%;min-width:0}
  main table{max-width:100%}
  #replay,.rp{max-width:100%;overflow-x:auto}
}

/* ribbon of sections (/markets/, /products/) and chapters (/all/): sticky under the header, scrolls sideways on a phone */
.v51-rib{position:sticky;z-index:19;background:color-mix(in oklab,var(--bg) 88%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.v51-rib::-webkit-scrollbar{display:none}
.v51-rib-in{display:flex;gap:6px;padding-top:6px;padding-bottom:6px;white-space:nowrap}
.v51-rib a{flex:none;font-size:13px;color:var(--ink2);text-decoration:none;padding:6px 10px;border-radius:999px;border:1px solid transparent;min-height:32px;display:inline-flex;align-items:center}
.v51-rib a.on{border-color:var(--acc);color:var(--ink);font-weight:600}
[id]{scroll-margin-top:110px}
/* phone: touch targets and readable small print (live check on phone and iPad, 17.11) */
@media (max-width:640px){
  .bd-grid{overflow-x:auto;-webkit-overflow-scrolling:touch}
  .bd-t .bd-c{min-width:44px;min-height:44px;display:inline-flex;align-items:center;justify-content:center}
  .bd-t .bd-c.bd-h{justify-content:flex-start}
  main :is(.mkl-bar button,.phc-chip,.phc-hz button,.bd-v,.ym-b,.v51-depth button){min-height:44px}
  main :is(.mkl-bar button.on,.mkl-bar button[aria-pressed="true"],.phc-chip.on,.phc-chip[aria-pressed="true"],.phc-hz button[aria-pressed="true"],.bd-v[aria-pressed="true"]){border:2px solid var(--acc);box-shadow:0 0 0 2px var(--glow)}
  main :is(.k,.tag,small,.tb,.pr-lv,.bd-asof,.bd-cap,.bd-ex,.mkl-sub,.phc-src,.ym-meta){font-size:max(12px,1em)}
  main [style*="font-size:9px"],main [style*="font-size:10px"],main [style*="font-size:11px"]{font-size:12.5px!important}
  main .k,main .tag,main small{font-size:12px!important}
  .v51-rib a{min-height:40px}
}
/* iPad on its side: two columns wherever a card is not full width */
@media (min-width:700px) and (max-width:1366px) and (orientation:landscape){
  .bento>.mod:not(.w6):not(.w4),.bento>.mod.w3{grid-column:span 3}
  .v51-issue .phc-2m{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px}
}

.v51-coll{margin-left:8px;cursor:pointer}
.v51-coll-rib{flex:none;border:1px solid var(--line2);border-radius:999px;background:var(--card);color:var(--ink);font-size:13px;padding:6px 12px;min-height:32px}

.v51-hsub{font-size:clamp(17px,2.2vw,21px);line-height:1.4;color:var(--ink2);margin:10px 0 0;max-width:640px}
.v51-first{margin:4px 0 12px;font-size:15px}
.v51-save{margin-top:8px}
.v51-save a{font-weight:600}
.v51-clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.v51-more{border:0;background:none;color:var(--acc);font:inherit;font-size:14px;padding:4px 0;cursor:pointer;min-height:32px}
/* explicit states of every switch (markets3): the chosen one is filled and outlined */
main :is(.mkl,.phc,.ym,.rc-mod) button[aria-pressed="true"],main .bd-v[aria-pressed="true"],main .tab[aria-selected="true"]{border-color:var(--acc)!important;box-shadow:inset 0 0 0 1px var(--acc);color:var(--ink);font-weight:600}
/* compact scenario cards (base / upside / downside) */
.sc3{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:8px}
.sc3>div{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--card);font-size:14px}
/* v52: the 2-minute tour, questions and answers */
.v51-tour{margin:18px 0 8px;max-width:620px}.v51-tour h3{margin:0 0 8px;font-size:18px}.v51-tour p{font-size:15px;line-height:1.5;color:var(--ink2);margin:8px 0 0}
.v51-vid{margin:0}.v51-vid button,.v51-vid iframe{position:relative;display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:12px;overflow:hidden;background:#000;padding:0;cursor:pointer}
.v51-vid img{width:100%;height:100%;object-fit:cover;display:block;opacity:.9}.v51-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:64px;height:64px;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:26px;line-height:64px;text-align:center}
.v51-vid figcaption{font-size:13px;color:var(--ink3);margin-top:6px}
.v51-faq{max-width:860px;margin:28px auto 8px;padding:0 16px}.v51-faq h2{font-size:22px;margin:0 0 8px}.v51-faq h3{font-size:16px;margin:14px 0 4px}.v51-faq p{margin:0;color:var(--ink2);line-height:1.5}
