/* Market pages: loading state and polish. Loaded last (pulse-runtime/presentation/handler.mjs).
   The server marks <html data-market-state="loading">; lib/navigation.mjs shell() sets "ready" once the shared header
   is built. Until then the page shows the header frame, skeleton blocks and, if loading stalls, a reload note. */

/* ---- Loading state ------------------------------------------------------------------------------------------- */
html[data-market-state=loading] body>header{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;width:min(1376px,calc(100% - 64px));height:64px;min-height:64px;margin:12px auto 0;padding:0 20px!important;border:1px solid #2c2927;border-radius:18px;background:rgba(20,18,16,.86)}
html[data-market-state=loading] body>header img{width:132px;height:auto}
html[data-market-state=loading] :is(.sector-intro,.intro){display:block}
html[data-market-state=loading] :is(#sector-stamp,#stamp){margin-top:12px;max-width:420px}
html[data-market-state=loading] body>header>nav{visibility:hidden}
/* Controls are placed by the page script; before it runs they would sit in the wrong place, empty. */
html[data-market-state=loading] :is(#sector-filters,#survey-controls,#event-controls,#filters,.screen-note,#active-selection){display:none}
html[data-market-state=loading] :is(#sector-stamp,#stamp){color:transparent;min-width:220px;height:14px;border-radius:6px;background:linear-gradient(90deg,#1a1815,#24211d,#1a1815);background-size:200% 100%;animation:market-sk 1.2s ease-in-out infinite}
:is(#sector-app,#app)[aria-busy=true]>:is(.empty,.notice)[role=status]{position:relative;min-height:260px;margin:12px 0 0;padding:0;border:0;color:transparent;background:
 linear-gradient(#1a1815,#1a1815) 0 0/100% 92px no-repeat,
 linear-gradient(#1a1815,#1a1815) 0 112px/64% 18px no-repeat,
 linear-gradient(#1a1815,#1a1815) 0 142px/100% 118px no-repeat;border-radius:14px;animation:market-sk-fade 1.2s ease-in-out infinite alternate}
@keyframes market-sk{from{background-position:200% 0}to{background-position:-200% 0}}
@keyframes market-sk-fade{from{opacity:.55}to{opacity:1}}
.market-stall{display:none}
html[data-market-state=loading] .market-stall{display:block;visibility:hidden;width:min(1376px,calc(100% - 64px));margin:18px auto 0;padding:12px 16px;border:1px solid rgba(242,100,61,.35);border-radius:12px;background:rgba(242,100,61,.07);color:#f2c3b4;font-size:14px;animation:market-stall-show 0s 8s forwards}
.market-stall a{color:#e9ebef;font-weight:600;text-underline-offset:3px}
@keyframes market-stall-show{to{visibility:visible}}
@media(max-width:700px){html[data-market-state=loading] body>header,html[data-market-state=loading] .market-stall{width:calc(100% - 28px)}}
@media(prefers-reduced-motion:reduce){html[data-market-state=loading] :is(#sector-stamp,#stamp),:is(#sector-app,#app)[aria-busy=true]>:is(.empty,.notice)[role=status]{animation:none}}

/* ---- Overview: the dated stamp belongs under the subtitle, not floating at the far right -------------------- */
body[data-market-section] .sector-intro{display:block}
body[data-market-section] .sector-intro .stamp{margin-top:10px;text-align:left;font-size:12px;line-height:1.55;color:#8f8a84}

/* ---- Latest News and Funding & Deals ---------------------------------------------------------------------- */
body:is([data-market-section=developments],[data-market-section=funding]) .reviewed-records>.context{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px 10px;align-items:center}
.context-due{display:inline-flex;align-items:center;height:20px;padding:0 8px;border-radius:999px;background:rgba(242,100,61,.12);color:#fb866a;font-size:11.5px;font-weight:600}
/* Filters: one compact block, search on top, the four selects and Reset on one row. */
.news-filter-details{border:1px solid #2c2927!important;border-radius:14px;padding:0 16px!important;margin:16px 0!important;background:#13110e}
.news-filter-details>summary{font-size:13.5px!important;font-weight:600!important;color:#c9c4bd}
body[data-market-section] .news-filter-details .development-filters{grid-template-columns:repeat(4,minmax(0,1fr)) auto;gap:12px;margin:4px 0 14px}
body[data-market-section] .news-filter-details .development-filters label:has(#query){grid-column:1/-1}
body[data-market-section] .news-filter-details .development-filters button[type=reset]{min-height:42px;align-self:end}
body[data-market-section] .news-filter-details .screen-note{margin:0 0 14px;color:#8f8a84;font-size:12.5px}
/* Records: one card per development; title and summary use the full width; the source link sits top right. */
body:is([data-market-section=developments],[data-market-section=funding]) .event-list{display:grid;gap:10px;margin-top:14px}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event{display:grid!important;grid-template-columns:104px minmax(0,1fr) auto!important;gap:4px 20px;padding:18px 20px;border:1px solid #2c2927;border-radius:14px;background:#13110e;transition:border-color .15s ease,background-color .15s ease}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event:hover{border-color:#3a3530;background:#16130f}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event time{grid-column:1;grid-row:1/span 2;margin:3px 0 0;color:#8f8a84;font-size:12.5px;font-variant-numeric:tabular-nums}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event>div:not(.source){grid-column:2;min-width:0}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event .label{color:#fb866a;font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event h3{margin:6px 0 6px;font-size:19px;line-height:1.3}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event p{max-width:none;margin:0 0 8px;color:#b9b5b0;font-size:14px;line-height:1.55}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event .meta{color:#8f8a84}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event .source{grid-column:3;grid-row:1;align-self:start}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .source a{min-height:0;padding:6px 10px;border:1px solid #2c2927;border-radius:9px;color:#d6d1ca;font-size:12px;text-decoration:none}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .source a:hover{border-color:#3a3530;color:#e9ebef}
@media(max-width:900px){
 body[data-market-section] .news-filter-details .development-filters{grid-template-columns:1fr 1fr}
 body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event{grid-template-columns:minmax(0,1fr)!important;padding:16px}
 body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event>time,
 body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event>div{grid-column:1!important;grid-row:auto!important}
 body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event>time{margin:0}
 body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event .source{margin-top:6px}
}
@media(max-width:560px){body[data-market-section] .news-filter-details .development-filters{grid-template-columns:1fr}}

/* ---- Consistency with the app pages (DESIGN.md §7.3, §8) ---------------------------------------------------- */
body[data-market-section]{--pulse-line:#2c2927;font-size:16px}
/* Market tabs: the token page's tab style (text tabs on a hairline, orange underline on the current page), inside
   the page frame, not a full-width sticky bar. The "Market" label repeats the eyebrow and is dropped. */
body[data-market-section] .pulse-nav{position:static;display:flex!important;align-items:flex-end;gap:2px;box-sizing:border-box;width:min(1376px,calc(100% - 64px));margin:22px auto 0;padding:0!important;border:0!important;border-bottom:1px solid rgba(255,255,255,.07)!important;background:transparent;overflow-x:auto;scrollbar-width:none}
body[data-market-section] .pulse-nav::-webkit-scrollbar{display:none}
body[data-market-section] .pulse-nav .pulse-brand-label{display:none!important}
body[data-market-section] .pulse-nav .market-tabs{display:flex;flex-wrap:nowrap!important;gap:2px!important;width:auto!important;margin-left:-12px}
body[data-market-section] .pulse-nav .market-tabs a{position:relative;display:inline-flex;align-items:center;min-height:44px!important;margin:0 0 4px;padding:8px 12px;border:0;border-radius:9px;color:#8f8a84;font-size:14px;font-weight:500;text-decoration:none;white-space:nowrap;transition:color .16s ease,background-color .16s ease}
body[data-market-section] .pulse-nav .market-tabs a:hover{color:#e9ebef;background:rgba(255,255,255,.035)}
body[data-market-section] .pulse-nav .market-tabs a[aria-current=page]{color:#e9ebef;font-weight:600}
body[data-market-section] .pulse-nav .market-tabs a[aria-current=page]::after{content:'';position:absolute;left:0;right:0;bottom:-5px;height:2px;border-radius:2px;background:#f2643d;box-shadow:0 0 10px rgba(242,100,61,.45)}
body[data-market-section] .pulse-nav .sources-link{margin:0 0 4px auto!important;min-height:44px!important;padding:8px 0 8px 12px;border:0;background:none;color:#8f8a84;font-size:13px;white-space:nowrap;flex:none}
body[data-market-section] .pulse-nav .sources-link:hover{color:#e9ebef}
/* Same title position on every Market page (Overview used one intro class, the others another). */
body[data-market-section] main{padding-top:0!important}
body[data-market-section] :is(.sector-intro,.intro){padding:28px 0 18px!important}
/* Inputs: 16px on phones (smaller text makes iOS zoom the page on focus), as on the app pages. */
@media(max-width:700px){
 body[data-market-section] :is(input,select,textarea){font-size:16px!important}
 body[data-market-section] :is(input:not([type=checkbox],[type=radio]),select){height:auto!important;min-height:44px;line-height:1.3!important}
 body[data-market-section] .pulse-nav{width:calc(100% - 28px);margin-top:14px}
 body[data-market-section] .pulse-nav .sources-link{display:none}
}
body[data-market-section] :is(.sector-intro,.intro)>div:first-child{margin:0;padding:0}
body[data-market-section] :is(.sector-intro,.intro) .eyebrow{margin:0 0 8px!important}
body[data-market-section] :is(.sector-intro,.intro) h1{margin:0 0 10px!important}

/* ---- Clean pages, like Launch, Earnings, Agents and Directory (19 Nov) ------------------------------------------
   The shared headline (centered, 62px, no eyebrow or orange full stop, quiet 15px subtitle), centered Market tabs,
   one card surface for every panel, and grey section labels so the figures carry the page. */
body[data-market-section] .pulse-nav{position:relative}
body[data-market-section] .pulse-nav .market-tabs{margin-inline:auto!important}
body[data-market-section] .pulse-nav .market-nav-tools{position:absolute;right:0;top:0;bottom:5px;display:flex;align-items:center;margin:0!important}
body[data-market-section] .pulse-nav .sources-link{margin:0!important}
body[data-market-section] :is(.sector-intro,.intro){display:flex!important;flex-direction:column;align-items:center;text-align:center;padding:54px 0 36px!important}
body[data-market-section] :is(.sector-intro,.intro){gap:0!important}
body[data-market-section] :is(.sector-intro,.intro)>div:first-child{display:flex;flex-direction:column;align-items:center;margin:0!important}
body[data-market-section] :is(.sector-intro,.intro) :is(.eyebrow,h1 .dot){display:none!important}
body[data-market-section] :is(.sector-intro,.intro) h1{font-size:clamp(40px,5.2vw,62px)!important;line-height:1.1!important;letter-spacing:-.04em!important;text-wrap:balance}
body[data-market-section] :is(.sector-intro,.intro) h1+p{max-width:600px;margin:0!important;color:#aaa59e!important;font-size:15px!important;line-height:1.55}
body[data-market-section] :is(.sector-intro,.intro) :is(.stamp,#stamp,#sector-stamp){max-width:640px;margin:12px auto 0!important;text-align:center!important;color:#7d7872!important;font-size:12px!important}
/* Overview: the application picker, Directory link and source checks read as one centered toolbar. */
body[data-market-section=overview] #sector-filters{justify-content:center;align-items:center;margin-inline:auto}
/* The select already reads "All applications": its caption stays for screen readers only. */
body[data-market-section=overview] #sector-filters label{font-size:0;gap:0}
body[data-market-section=overview] #sector-filters select{font-size:14px;min-width:240px}
body[data-market-section=overview] #sector-filters>p{color:#7d7872;font-size:12.5px}
body[data-market-section=overview] #sector-app>.context-links{justify-content:center;text-align:center}
body[data-market-section=overview] #sector-app>.freshness-detail>summary{justify-content:center;text-align:center}
/* One card surface for every panel and figure strip. */
body[data-market-section] :is(.panel,.macro-strip,.news-filter-details){border:1px solid #2a2724!important;border-radius:16px!important;background:linear-gradient(180deg,#161412,#110f0d)!important}
body[data-market-section] .macro-strip .macro{border-color:#24211e!important;background:transparent!important}
body[data-market-section] :is(.panel-top .label,.macro .label,.panel>.label){color:#7d7872!important;font-size:11px!important;font-weight:600!important;letter-spacing:.08em!important}
body[data-market-section] :is(.panel h2,.panel-top h2){letter-spacing:-.02em}
body[data-market-section] .screen-note{color:#8f8a84}
body:is([data-market-section=developments],[data-market-section=funding]) .event-list .event{border-color:#2a2724;border-radius:16px;background:linear-gradient(180deg,#161412,#110f0d)}
@media(max-width:700px){
 body[data-market-section] :is(.sector-intro,.intro){padding:40px 0 26px!important}
 body[data-market-section] :is(.sector-intro,.intro) h1{font-size:clamp(34px,9vw,40px)!important}
 body[data-market-section] :is(.sector-intro,.intro) h1+p{font-size:14.5px!important}
}
/* Overview: the toolbar sits close under the dated stamp; select and Reset share one height; the helper line is
   for screen readers (the select already says what it does). */
body[data-market-section=overview] .sector-intro{padding-bottom:20px!important}
body[data-market-section=overview] #sector-stamp{padding-bottom:0!important}
body[data-market-section=overview] #sector-filters :is(select,button){height:44px!important;min-height:44px!important;margin:0!important;box-sizing:border-box}
body[data-market-section=overview] #sector-filters>p{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* Research: the paper date was alone on a ruled bar; it becomes a quiet line under the subtitle. */
body[data-market-section=research] main>.controls:has(>#filters:empty){justify-content:center;margin:-22px 0 40px!important;padding:0!important;border:0!important}
body[data-market-section=research] main>.controls>#stamp{color:#7d7872;font-size:12px}
/* The recovery screen still replaces the whole page (market-recovery.css), over the layout rules above. */
body[data-market-section] main.market-recovery-main>:not([data-market-recovery-host]){display:none!important}
body[data-market-section] .pulse-nav .market-nav-tools[hidden]{display:none!important}
/* Pager (News, Funding & Deals, Research): ← Previous · numbered pages · Next →, centered under the list. */
.market-pager{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;margin:28px 0 8px}
.market-pager-pages{display:flex;align-items:center;gap:4px}
.market-pager button{min-width:40px;height:40px;padding:0 12px;border:1px solid #2a2724;border-radius:12px;background:#13110e;color:#d6d1ca;font:inherit;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;cursor:pointer;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
.market-pager button:hover:not(:disabled){border-color:#3a3530;background:#1a1815;color:#fff}
.market-pager button[aria-current=page]{border-color:rgba(242,100,61,.55);background:rgba(242,100,61,.12);color:#fb866a}
.market-pager button:disabled{opacity:.4;cursor:default}
.market-pager button:focus-visible{outline:2px solid #f2643d;outline-offset:2px}
.market-pager-gap{min-width:24px;color:#7d7872;text-align:center}
#paper-pagination:empty{display:none}
@media(max-width:560px){.market-pager{gap:6px}.market-pager-step{flex:1 1 calc(50% - 6px);order:2}.market-pager-pages{order:1;flex:1 1 100%;justify-content:center}}
