/* Blupoli editorial story surfaces: visual system for the approved Blog and Devlog mockups.
   Shared tokens, header, article pages, actual content and discovery behaviour remain canonical. */
body.editorial-stitch{
 --st-canvas:#F4F8FF;--st-panel:#FFFFFF;--st-panel-soft:#F0F4FF;
 --st-fg:#171A46;--st-muted:#526493;--st-line:#E0E8F7;
 --st-shadow:0 9px 28px rgba(35,58,139,.07);
 background:var(--st-canvas);color:var(--st-fg);font-family:var(--font-sans);
}
html[data-theme="dark"] body.editorial-stitch,
html:not([data-theme]) body.editorial-stitch{
 --st-canvas:#101428;--st-panel:#1B2340;--st-panel-soft:#222B4B;
 --st-fg:#F5F7FF;--st-muted:#BFCDF1;--st-line:#3C4872;
 --st-shadow:0 8px 28px rgba(0,0,0,.22);
}
body.editorial-stitch :is(.editorial-page h1,.editorial-page h2,.editorial-page h3,.editorial-stitch-page strong,.editorial-stitch-page button){
 font-family:var(--font-sans);color:var(--st-fg);
}
body.editorial-stitch .editorial-page.editorial-stitch-page{
 width:100%;max-width:none;margin:auto;padding:clamp(15px,2.2vw,30px);
 background:transparent;
}
body.editorial-stitch .editorial-hero{
 padding:0;margin:0 0 14px;background:transparent;border:0;box-shadow:none;border-radius:22px;
 overflow:visible;
}
body.editorial-stitch .editorial-hero-content{display:block;max-width:none;}
.story-masthead{
 position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,.95fr);
 gap:clamp(10px,2vw,26px);align-items:center;min-height:304px;
 overflow:hidden;border:1px solid var(--st-line);border-radius:22px;
 background:#F1F4FF;
 box-shadow:var(--st-shadow);isolation:isolate;
}
.story-masthead::before,.story-masthead::after{
 content:"";position:absolute;pointer-events:none;border-radius:50%;z-index:-1;
 background:#E0EDFF99;
}
.story-masthead::before{width:510px;height:360px;left:-90px;top:-175px;}
.story-masthead::after{width:520px;height:400px;right:-70px;bottom:-220px;background:#FFE0EC99;}
.story-masthead-copy{min-width:0;padding:clamp(22px,3.8vw,60px);padding-right:0;position:relative;z-index:2;}
.story-kicker{display:inline-flex;align-items:center;padding:7px 14px;border-radius:999px;background:#eee4ff;color:#6730C2;font-size:.72rem;font-weight:850;letter-spacing:.07em;}
body.editorial-stitch .story-masthead h1{
 margin:14px 0 11px;font-size:clamp(2.35rem,4.9vw,5.3rem);line-height:1.04;
 letter-spacing:-.065em;color:#171A46;overflow-wrap:normal;
}
.story-masthead h1 em{font-style:normal;color:#6730C2;}
.story-masthead h2{margin:0 0 12px;font-size:clamp(1rem,1.5vw,1.4rem);line-height:1.3;color:#34477D!important;font-weight:650;}
.story-masthead p{max-width:565px;margin:0;font-size:clamp(.85rem,1.05vw,1rem);line-height:1.65;color:#526493;}
.story-masthead >img{width:100%;height:100%;max-height:380px;align-self:end;object-fit:contain;object-position:bottom center;filter:drop-shadow(0 18px 20px #989ac029);}
.story-masthead-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px;}
.story-masthead-actions a{min-height:43px;display:inline-flex;align-items:center;justify-content:center;gap:10px;
 padding:10px 17px;border-radius:11px;background:var(--brand-violet);color:#fff;
 font-weight:800;font-size:.85rem;box-shadow:0 6px 15px #6730c230;}
.story-masthead-actions a+a{background:#fff;color:#6730C2;box-shadow:none;border:1px solid #DACDFF;}
.story-hero-footer{display:flex;flex-wrap:wrap;align-items:center;gap:15px;justify-content:space-between;padding:9px 3px 0;}
body.editorial-stitch .story-hero-footer .editorial-pulse{display:none;}
/* Retain semantic counts in source for existing consumers; the approved mockups
   prioritize the editorial narrative over a dashboard-style stats strip. */
body.editorial-stitch .story-hero-footer .editorial-pulse>div{flex-direction:row;align-items:baseline;gap:6px;background:var(--st-panel);border:1px solid var(--st-line);border-radius:12px;padding:7px 12px;}
body.editorial-stitch .story-hero-footer .editorial-pulse small{font-family:var(--font-sans);font-size:.69rem;}
body.editorial-stitch .story-hero-footer .editorial-pulse strong{font-family:var(--font-sans);font-size:.8rem;color:var(--brand-violet);}
body.editorial-stitch .story-hero-footer .editorial-pulse .stitch-stat-date{font-size:.72rem;}
body.editorial-stitch .story-hero-footer .editorial-hero-actions{margin:0;gap:8px;}
body.editorial-stitch .story-hero-footer .editorial-switch{gap:4px;padding:0;background:none;border:0;}
body.editorial-stitch .story-hero-footer .editorial-switch a,
body.editorial-stitch .story-hero-footer .editorial-other{min-height:37px;border-radius:10px;padding:8px 14px;
 background:var(--st-panel);border-color:var(--st-line);font-size:.78rem;color:var(--st-fg);}
body.editorial-stitch .story-hero-footer .editorial-switch a.active{
 background:var(--brand-violet);border-color:var(--brand-violet);color:#fff;
}
body.editorial-stitch .stitch-editorial-filters{margin:12px 0 16px;padding:9px 12px;
 border-radius:16px;box-shadow:var(--st-shadow);}
body.editorial-stitch .editorial-categories a{border-radius:10px;padding:9px 13px;font-size:.74rem;}
body.editorial-stitch .editorial-categories a.is-active{background:var(--brand-violet);border-color:var(--brand-violet);color:#fff;}
body.editorial-stitch .editorial-search-field{border-radius:11px;}
body.editorial-stitch .editorial-search-field button{border-radius:9px;background:var(--brand-violet);border-color:var(--brand-violet);color:white;}
.story-blog-layout{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(285px,.89fr);gap:17px;align-items:start;}
.story-blog-main,.story-blog-side{min-width:0;}
.story-blog-side{display:flex;flex-direction:column;gap:15px;padding-top:12px;}
.story-side-panel,.story-dev-panel,.story-timeline,.story-philosophy,.story-reading{
 border-radius:20px;border:1px solid var(--st-line);background:var(--st-panel);
 box-shadow:var(--st-shadow);min-width:0;
}
.story-side-panel{padding:clamp(14px,1.6vw,24px);}
.story-panel-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 14px;}
body.editorial-stitch .story-panel-title h2{font-size:1.06rem;line-height:1.25;margin:0;}
.story-panel-title a,.story-section-head>a{white-space:nowrap;font-size:.76rem;font-weight:750;color:var(--brand-violet);}
.story-topic-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
.story-topic-grid>a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
 min-height:115px;padding:12px 8px;text-align:center;border-radius:14px;
 background:#EEF8FF;border:1px solid #e8e9f9;}
.story-topic-grid>a:nth-child(2n){background:#FFF2F8;}
.story-topic-grid>a:focus-visible,.story-mini:focus-visible,.story-timeline-item a:focus-visible{outline:3px solid var(--brand-violet);outline-offset:3px;}
.story-topic-icon{font-size:1.85rem;line-height:1.2;}
.story-topic-grid strong{font-size:.8rem!important;color:#171A46!important;}
.story-topic-grid small{font-size:.67rem;color:#526493;}
.story-side-articles{display:flex;flex-direction:column;gap:10px;}
.story-mini{min-width:0;display:grid;grid-template-columns:72px minmax(0,1fr) 24px;gap:10px;
 align-items:center;padding:7px;border:1px solid var(--st-line);border-radius:13px;background:var(--st-panel-soft);}
.story-mini img{width:72px;height:66px;object-fit:cover;border-radius:10px;}
.story-mini-copy{min-width:0;display:flex;flex-direction:column;gap:4px;}
.story-mini-copy small{font-size:.63rem;color:var(--brand-violet);font-weight:850;}
.story-mini-copy strong{font-size:.8rem!important;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;}
.story-mini-copy time{font-size:.63rem;color:var(--st-muted);}
.story-arrow{display:grid;place-items:center;font-weight:900;color:var(--brand-violet);}
.story-side-community{background:#F2EFFF;}
.story-side-community>span{font-size:1.6rem;}
.story-side-community h2{margin:8px 0;font-size:1.1rem;color:#171A46!important;}
.story-side-community p{line-height:1.55;font-size:.85rem;color:#526493;}
.story-side-community>a{display:inline-flex;padding:10px 17px;border-radius:10px;background:var(--brand-violet);color:#fff;font-weight:800;}
body.editorial-stitch .stitch-feature-section{margin:0 0 24px;}
body.editorial-stitch .editorial-grid-featured{min-height:335px;border-radius:20px;overflow:hidden;
 background:var(--st-panel);box-shadow:var(--st-shadow);}
body.editorial-stitch .editorial-grid-featured>.editorial-card{padding:clamp(20px,3.3vw,45px);}
body.editorial-stitch .editorial-grid-featured>.editorial-card h2{font-size:clamp(1.6rem,2.6vw,3.1rem);line-height:1.16;}
body.editorial-stitch .editorial-grid-featured .editorial-card-cta{background:var(--brand-violet);color:#fff;border-radius:11px;}
body.editorial-stitch .stitch-feature-visual{background:#ECEEFF;}
body.editorial-stitch .stitch-feature-visual img{border:0;background:transparent;box-shadow:none;border-radius:18px;}
body.editorial-stitch .stitch-feature-visual-kicker{color:#6730C2;}
.story-reading{padding:clamp(16px,2vw,28px);margin:0 0 22px;border:0;background:transparent;box-shadow:none;}
.story-section-head{display:flex;justify-content:space-between;align-items:end;gap:14px;margin-bottom:18px;}
.story-section-head span{display:block;font-weight:800;font-size:.72rem;color:var(--brand-violet);letter-spacing:.05em;}
body.editorial-stitch .story-section-head h2{font-size:clamp(1.28rem,2.2vw,2rem);margin:4px 0;}
.story-section-head p{margin:0;font-size:.84rem;color:var(--st-muted);line-height:1.5;}
.story-reading-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;}
.story-reading-card{display:flex;flex-direction:column;gap:8px;min-width:0;overflow:hidden;padding:10px;
 border-radius:15px;border:1px solid var(--st-line);background:var(--st-panel);box-shadow:var(--st-shadow);}
.story-reading-card img{display:block;width:100%;height:clamp(120px,12vw,170px);aspect-ratio:1.5;object-fit:cover;border-radius:10px;}
.story-reading-card span{font-size:.68rem;font-weight:900;color:var(--brand-violet);}
.story-reading-card strong{font-size:.84rem!important;line-height:1.36;}
.story-reading-card small{margin-top:auto;color:var(--st-muted);font-size:.65rem;}
body.editorial-stitch .story-blog-main .stitch-editorial-archive{grid-template-columns:repeat(2,minmax(0,1fr));}
body.editorial-stitch .stitch-editorial-archive>.editorial-card{border-radius:15px;overflow:hidden;box-shadow:var(--st-shadow);}
body.editorial-stitch .editorial-recent{scroll-margin-top:90px;}
body.editorial-stitch .stitch-editorial-section-head small{color:var(--brand-violet);}
body.editorial-stitch .stitch-editorial-section-head h2{font-size:clamp(1.25rem,2vw,1.9rem);}
body.editorial-stitch .stitch-editorial-archive .editorial-card-cta{color:var(--brand-violet);}
.story-timeline{margin:10px 0 16px;padding:clamp(20px,2.3vw,34px);scroll-margin-top:100px;
 background:var(--st-panel);}
.story-timeline-track{display:flex;gap:14px;overflow-x:auto;max-width:100%;padding:18px 8px 20px;margin:0;
 list-style:none;scrollbar-width:thin;scroll-snap-type:x proximity;position:relative;isolation:isolate;}
.story-timeline-track::before{position:absolute;content:"";height:4px;left:35px;right:35px;top:25px;
 background:var(--brand-violet);z-index:-1;border-radius:999px;}
.story-timeline-item{flex:0 0 clamp(178px,17vw,245px);min-width:0;scroll-snap-align:start;position:relative;padding-top:26px;}
.story-timeline-item::before{content:"";position:absolute;width:17px;height:17px;top:18px;left:calc(50% - 9px);
 border-radius:50%;background:#6730C2;border:4px solid white;box-shadow:0 0 0 2px #9C6AFF;}
.story-timeline-item:nth-child(3n+2)::before{background:#13C5F7;}
.story-timeline-item:nth-child(3n+3)::before{background:#FF557E;}
.story-timeline-item a{display:flex;flex-direction:column;gap:9px;min-height:225px;padding:20px;
 background:var(--st-panel);border:1px solid var(--st-line);border-radius:15px;
 box-shadow:var(--st-shadow);transition:transform .18s ease;}
.story-timeline-item a:hover{transform:translateY(-4px);}
.story-milestone-icon{font-size:2rem;line-height:1.15;}
.story-milestone-date{font-size:.69rem;font-weight:800;color:var(--brand-violet);}
.story-timeline-item strong{font-size:.96rem!important;line-height:1.3;}
.story-milestone-desc{font-size:.75rem;color:var(--st-muted);line-height:1.5;display:-webkit-box;
 -webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;}
.story-milestone-link{font-size:.7rem;font-weight:800;color:var(--brand-violet);margin-top:auto;}
.story-philosophy{display:grid;grid-template-columns:minmax(260px,1.05fr) minmax(0,1.35fr);
 gap:18px;align-items:center;padding:clamp(19px,2.6vw,38px);margin:0 0 17px;
 background:#F4EEFF;}
.story-philosophy-copy>span{font-size:.74rem;color:#6730C2;font-weight:900;}
body.editorial-stitch .story-philosophy h2{font-size:clamp(1.6rem,2.6vw,2.6rem);line-height:1.15;margin:13px 0;color:#171A46!important;}
.story-philosophy-copy p{margin:0;line-height:1.74;color:#465581;font-size:clamp(.84rem,1.02vw,.98rem);}
.story-value-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.story-value{min-width:0;padding:13px;border-radius:14px;background:#ffffffbf;border:1px solid #e6e7fa;}
.story-value>span{display:block;font-size:1.8rem;margin-bottom:7px;}
.story-value strong{font-size:.84rem!important;color:#171A46!important;}
.story-value p{margin:7px 0 0;font-size:.74rem;line-height:1.5;color:#526493;}
.story-dev-panels{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:24px;}
.story-dev-panel{padding:clamp(16px,1.6vw,24px);}
.story-dev-panel>p{margin:0 0 16px;color:var(--st-muted);line-height:1.5;font-size:.77rem;}
.story-dev-priorities{display:flex;flex-direction:column;gap:8px;}
.story-priority{display:grid;grid-template-columns:21px minmax(0,1fr);gap:7px;align-items:start;
 padding:10px;border-radius:12px;background:var(--st-panel-soft);}
.story-priority>span{color:var(--brand-violet);}
.story-priority strong{font-size:.78rem!important;}
.story-priority p{color:var(--st-muted);font-size:.7rem;line-height:1.4;margin:5px 0 0;
 display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.story-roadmap ol{margin:0;padding:0;list-style:none;}
.story-roadmap li{position:relative;display:flex;align-items:center;gap:10px;padding:11px 0;
 border-bottom:1px solid var(--st-line);}
.story-roadmap li:last-child{border-bottom:0;}
.story-roadmap-step{width:27px;height:27px;flex:none;display:grid;place-items:center;color:var(--brand-violet);
 background:var(--st-panel-soft);border-radius:50%;font-weight:900;}
.story-roadmap strong{font-size:.79rem!important;}
body.editorial-devlog.editorial-stitch .story-dev-panels +.stitch-editorial-filters{margin-top:20px;}
/* Existing article cards and archive remain the semantic/source-of-truth surface. */
body.editorial-devlog.editorial-stitch .stitch-devlog-lower{margin-top:15px;}
body.editorial-stitch .stitch-editorial-bottom{border-radius:20px;overflow:hidden;}
body.editorial-stitch .editorial-grid-featured .stitch-code-sample{font-size:.6rem;max-width:100%;overflow:auto;}
html[data-theme="dark"] body.editorial-stitch .story-masthead,
html:not([data-theme]) body.editorial-stitch .story-masthead{background:#202744;}
html[data-theme="dark"] body.editorial-stitch .story-masthead :is(h1,h2,p),
html:not([data-theme]) body.editorial-stitch .story-masthead :is(h1,h2,p){color:#F6F7FF!important;}
html[data-theme="dark"] body.editorial-stitch .story-philosophy,
html:not([data-theme]) body.editorial-stitch .story-philosophy{background:#242344;}
html[data-theme="dark"] body.editorial-stitch .story-philosophy :is(h2,p),
html:not([data-theme]) body.editorial-stitch .story-philosophy :is(h2,p){color:#F3F6FF!important;}
html[data-theme="dark"] body.editorial-stitch .story-side-community,
html:not([data-theme]) body.editorial-stitch .story-side-community{background:#202744;}
html[data-theme="dark"] body.editorial-stitch .story-side-community :is(h2,p),
html:not([data-theme]) body.editorial-stitch .story-side-community :is(h2,p){color:#F3F6FF!important;}
@media (max-width:1150px){
 .story-blog-layout{grid-template-columns:minmax(0,1.5fr) minmax(250px,.8fr);}
 .story-reading-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .story-dev-panels{grid-template-columns:repeat(2,minmax(0,1fr));}
 .story-roadmap{grid-column:1/-1;}
}
@media (max-width:850px){
 .story-blog-layout{grid-template-columns:1fr;}
 .story-blog-side{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
 .story-side-community{grid-column:1/-1;}
 .story-masthead{grid-template-columns:minmax(0,1.1fr) minmax(190px,.8fr);}
 .story-masthead-copy{padding:25px;padding-right:0;}
 .story-philosophy{grid-template-columns:1fr;}
}
@media (max-width:620px){
 body.editorial-stitch .editorial-page.editorial-stitch-page{padding:13px;}
 .story-masthead{display:flex;flex-direction:column;gap:0;min-height:0;}
 .story-masthead-copy{padding:22px 20px 8px;width:100%;}
 body.editorial-stitch .story-masthead h1{font-size:clamp(2.15rem,9vw,3.4rem);}
 .story-masthead img{height:210px;max-height:210px;object-fit:contain;align-self:center;margin-top:-5px;}
 .story-hero-footer{display:block;}
 body.editorial-stitch .story-hero-footer .editorial-pulse{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
 body.editorial-stitch .story-hero-footer .editorial-hero-actions{margin-top:8px;}
 .story-blog-side{grid-template-columns:1fr;}
 .story-topic-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .story-reading{padding:14px 2px;}
 .story-reading-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;}
 .story-reading-card{padding:7px;}
 .story-reading-card strong{font-size:.76rem!important;}
 .story-dev-panels{grid-template-columns:1fr;}
 .story-roadmap{grid-column:auto;}
 .story-value-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 .story-philosophy{padding:20px;}
 .story-timeline{padding:18px 12px;}
 .story-timeline-item{flex-basis:205px;}
 .story-section-head{align-items:start;flex-wrap:wrap;}
 body.editorial-stitch .story-blog-main .stitch-editorial-archive{grid-template-columns:1fr;}
}
@media (max-width:360px){.story-value-grid{grid-template-columns:1fr;}}
@media (prefers-reduced-motion:reduce){.story-timeline-item a{transition:none;}}
