/* Case stories / stage 8. Scoped to the case pages, no changes to homepage or demos. */
.case--editorial { --case-accent:#d9fa73; --case-panel:#1b2920; --case-border:#425b47; padding-bottom:0; }
.case--editorial.case--blue { --case-accent:#a4c9e5; }
.case--editorial.case--orange { --case-accent:#f3bb93; }
.case--editorial .case-hero { padding-top:38px; overflow:hidden; position:relative; isolation:isolate; }
.case--editorial .case-hero::before {
  content:"";position:absolute;pointer-events:none;z-index:-1;right:-6%;top:14%;
  width:min(40vw,590px);height:min(40vw,590px);border:1px solid var(--case-border);
  border-radius:50%;box-shadow:0 0 0 65px #7fa87e08,0 0 0 130px #7fa87e06;
}
.case--editorial .back-link { color:#a8c5ae; border-color:#57705d; padding-bottom:9px; }
.case--editorial .case-meta { margin-top:56px; padding:17px 0; border-color:var(--case-border); color:#aabfaf; flex-wrap:wrap; }
.case--editorial .case-meta span:nth-child(2) { margin-left:auto; }
.case--editorial .case-hero-kicker,.case--editorial .case-hero-foot,.case--editorial .case-contents-label,
.case--editorial .case-contents-note,.case--editorial .case-chapter-rail,.case--editorial .case-chapter-overline,
.case--editorial .case-outcome-stamp,.case--editorial .case-next a>span:first-child,
.case--editorial .case-demo-cta>span:first-child {
  font:10px/1.6 'DM Mono',ui-monospace,monospace;letter-spacing:.075em;text-transform:uppercase;
}
.case--editorial .case-hero-kicker { color:var(--case-accent); margin:65px 0 20px; }
.case--editorial .case-hero h1 { max-width:1320px;font-size:clamp(57px,8.5vw,145px);line-height:.98;margin:0 0 32px;letter-spacing:-.078em;overflow-wrap:anywhere; }
.case--editorial .case-hero h1 span { color:var(--case-accent); }
.case--editorial .case-summary { max-width:860px;font-size:clamp(20px,2.55vw,37px);line-height:1.34;letter-spacing:-.043em;margin:0; }
.case--editorial .case-hero-actions { display:flex;align-items:stretch;flex-wrap:wrap;gap:10px;margin:36px 0 72px; }
.case--editorial .case-button { min-height:56px;padding:16px 22px;display:inline-flex;justify-content:space-between;align-items:center;gap:35px;font:700 11px/1.4 'DM Mono',monospace;letter-spacing:.045em;transition:background .2s,transform .2s; }
.case--editorial .case-button:hover { transform:translateY(-3px); }
.case--editorial .case-button--primary { color:#152016;background:var(--case-accent); }
.case--editorial .case-button--primary:hover { background:#edfcbf; }
.case--editorial .case-button--secondary { border:1px solid var(--case-border);color:var(--ink); }
.case--editorial .case-button--secondary:hover { border-color:var(--case-accent); }
.case--editorial .case-button>span:last-child { font-size:20px; }
.case--editorial .case-hero-foot { border-top:1px solid var(--case-border);color:#8fa794; padding:17px 0 28px;display:flex;justify-content:space-between;gap:18px; }

.case--editorial .case-layout { display:grid;grid-template-columns:minmax(165px,225px) minmax(0,1fr);gap:clamp(26px,5vw,90px);align-items:start; }
.case--editorial .case-contents { position:sticky;top:24px;min-width:0;padding-top:35px; }
.case--editorial .case-contents-nav { border-top:1px solid var(--case-border);display:flex;flex-direction:column; }
.case--editorial .case-contents-label { color:var(--case-accent);padding:19px 0 17px; }
.case--editorial .case-contents-nav a { display:flex;align-items:center;gap:15px;min-height:49px;padding:9px 10px;border-top:1px solid #30453a;font-size:12px;color:#c3d1c6;line-height:1.3;transition:background .18s,color .18s; }
.case--editorial .case-contents-nav a>span { color:var(--case-accent);font:10px 'DM Mono',monospace; }
.case--editorial .case-contents-nav a:hover { background:#263d2c;color:#fff; }
.case--editorial .case-contents-nav a:focus-visible { outline:2px solid var(--case-accent);outline-offset:-3px; }
.case--editorial .case-contents-note { color:#91a796;line-height:1.65;border-top:1px solid var(--case-border);margin-top:26px;padding-top:17px;text-transform:none;letter-spacing:.02em; }
.case--editorial .case-chapters { min-width:0; }
.case--editorial .case-chapter { padding:0 0 clamp(80px,9vw,145px);scroll-margin-top:32px; }
.case--editorial .case-chapter-rail { display:flex;align-items:center;justify-content:space-between;gap:15px;border-top:1px solid var(--case-border);padding:16px 0;color:#a8bda9; }
.case--editorial .case-chapter-rail span:first-child { color:var(--case-accent); }
.case--editorial .case-chapter-inner { padding:clamp(32px,4vw,64px) 0 0; }
.case--editorial .case-chapter-overline { color:var(--case-accent);margin:0 0 22px; }
.case--editorial .case-chapter h2 { font-size:clamp(36px,4.8vw,83px);line-height:1.04;font-weight:800;letter-spacing:-.067em;margin:0 0 clamp(24px,3vw,42px);max-width:1050px;overflow-wrap:anywhere; }
.case--editorial .case-chapter h2 em { font-style:normal;color:var(--case-accent); }
.case--editorial .case-chapter-lead { color:#c8d5ca;font-size:clamp(18px,2.1vw,29px);line-height:1.55;letter-spacing:-.035em;max-width:800px;margin:0; }
.case--editorial .case-chapter--problem .case-chapter-inner { min-height:280px; }
.case--editorial .case-chapter--build .case-chapter-lead { max-width:830px; }
.case--editorial .case-breakdown { margin:clamp(48px,6vw,88px) 0 0; }
.case--editorial .case-breakdown .case-section-head { border-color:var(--case-border);color:#a7bea9;padding:17px 0 19px; }
.case--editorial .detail-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.case--editorial .detail-card { background:var(--case-panel);border:1px solid var(--case-border);min-height:260px;padding:22px; }
.case--editorial .detail-card>span { color:var(--case-accent);font:11px 'DM Mono',monospace; }
.case--editorial .detail-card h3 { margin:45px 0 14px;color:var(--ink);font-size:clamp(19px,2vw,29px);overflow-wrap:anywhere; }
.case--editorial .detail-card p { color:#b9cbbd;font-size:13px;line-height:1.65; }
.case--editorial .case-chapter--process .case-chapter-inner { padding-top:clamp(30px,4vw,56px); }
.case--editorial .case-path { margin:clamp(38px,5vw,70px) 0 clamp(55px,7vw,92px);padding:0;list-style:none;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px; }
.case--editorial .case-path li { min-width:0;position:relative;background:#1a2a21;border-top:3px solid var(--case-accent);padding:17px 13px 18px;min-height:124px;display:flex;flex-direction:column;gap:19px; }
.case--editorial .case-path li:not(:last-child)::after { content:"→";position:absolute;right:7px;top:11px;color:#a1bea5;font:18px 'DM Mono',monospace; }
.case--editorial .case-path li>span { color:var(--case-accent);font:11px 'DM Mono',monospace; }
.case--editorial .case-path li>strong { color:var(--ink);font-size:clamp(13px,1.35vw,20px);line-height:1.2;letter-spacing:-.045em;overflow-wrap:anywhere; }
.case--editorial .case-showcase { margin:0;min-width:0; }
.case--editorial .case-showcase .case-section-head { border-color:var(--case-border);color:#a8bca8; }
.case--editorial .case-showcase h3 { font-weight:800;font-size:clamp(37px,5vw,75px);letter-spacing:-.072em;line-height:1.02;margin:35px 0 36px; }
.case--editorial .case-showcase h3 em { color:var(--case-accent);font-style:normal; }
.case--editorial .demo-window { border-color:#607464;box-shadow:7px 7px 0 #334c39; }
.case--editorial .demo-caption { color:#abc0ae;max-width:780px;margin:22px 0 0;font:11px/1.7 'DM Mono',monospace; }
.case--editorial .case-demo-cta { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:9px 18px;margin-top:30px;padding:22px 25px;background:var(--case-accent);color:#132016;transition:transform .2s,background .2s; }
.case--editorial .case-demo-cta:hover { transform:translateY(-3px); }
.case--editorial .case-demo-cta>span:first-child { grid-column:1;opacity:.72; }
.case--editorial .case-demo-cta strong { grid-column:1;font-size:clamp(19px,2.35vw,30px);letter-spacing:-.05em;line-height:1.2; }
.case--editorial .case-demo-cta>span:last-child { grid-column:2;grid-row:1/3;font-size:32px; }
.case--editorial .case-chapter--outcome { padding-bottom:clamp(90px,10vw,160px); }
.case--editorial .case-outcome-card { position:relative;overflow:hidden;background:#243c2b;border:1px solid #527457;padding:clamp(25px,5vw,74px);margin-top:22px; }
.case--editorial .case-outcome-card::after { content:"↗";position:absolute;right:2%;bottom:-19%;font-size:clamp(180px,24vw,370px);line-height:1;color:#ffffff08;font-weight:800;pointer-events:none; }
.case--editorial .case-outcome-card>* { position:relative;z-index:1; }
.case--editorial .case-outcome-card h2 { max-width:840px;margin:0 0 30px;color:var(--ink); }
.case--editorial .case-outcome-card>p:not(.case-chapter-overline) { color:#d8e8dc;font-size:clamp(18px,2.15vw,30px);line-height:1.5;letter-spacing:-.03em;max-width:780px;margin:0; }
.case--editorial .case-outcome-stamp { display:block;color:var(--case-accent);margin-top:clamp(35px,6vw,75px); }
.case--editorial .case-chapter--stack .case-chapter-inner { padding-bottom:30px; }
.case--editorial .case-stack { margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px;border:0; }
.case--editorial .case-stack>span { border:1px solid var(--case-border);background:var(--case-panel);color:var(--ink);font-size:clamp(13px,1.4vw,17px);font-weight:700;border-radius:0;padding:15px 21px; }
.case--editorial .case-next { margin-top:0;padding:0 0 110px;border:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.case--editorial .case-next a { min-width:0;min-height:168px;border:1px solid var(--case-border);background:#1b2a20;padding:22px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:space-between;gap:18px;transition:border-color .2s,background .2s; }
.case--editorial .case-next a:hover { background:#2a4130;border-color:var(--case-accent); }
.case--editorial .case-next a>span:first-child { grid-column:1/3;color:var(--case-accent); }
.case--editorial .case-next a>strong { grid-column:1;font-size:clamp(19px,2vw,31px);letter-spacing:-.055em;line-height:1.13;overflow-wrap:anywhere; }
.case--editorial .case-next a>span:last-child { grid-column:2;align-self:end;font-size:25px;color:var(--case-accent); }
.case--editorial .case-next-contact { border-color:var(--case-accent)!important; }
@media (max-width:1150px){
  .case--editorial .case-layout { grid-template-columns:175px minmax(0,1fr);gap:25px; }
  .case--editorial .detail-grid { grid-template-columns:1fr; }
  .case--editorial .detail-card { min-height:0; }
  .case--editorial .detail-card h3 { margin:28px 0 10px; }
  /* Keep the workflow in DOM order. A single column avoids arrows pointing into
     empty grid cells when step 04 or 05 wraps to the next row. */
  .case--editorial .case-path { grid-template-columns:minmax(0,1fr);gap:17px; }
  .case--editorial .case-path li { display:grid;grid-template-columns:42px minmax(0,1fr);align-items:center;gap:14px;min-height:78px;padding:14px 16px; }
  .case--editorial .case-path li>strong { font-size:clamp(16px,1.8vw,22px); }
  .case--editorial .case-path li:not(:last-child)::after { content:"↓";right:auto;top:auto;left:19px;bottom:-22px;z-index:1;line-height:1;padding:0 4px;background:#111816; }
}
@media (max-width:850px){
  .case--editorial .case-layout { display:block; }
  .case--editorial .case-contents { top:0;z-index:8;padding:0;background:#111816f5;border-block:1px solid var(--case-border);margin:0 0 52px; }
  .case--editorial .case-contents-nav { flex-direction:row;overflow-x:auto;scrollbar-width:thin;border:0; }
  .case--editorial .case-contents-label,.case--editorial .case-contents-note { display:none; }
  .case--editorial .case-contents-nav a { white-space:nowrap;flex:none;border:0;border-right:1px solid var(--case-border);padding:12px 14px;min-height:51px; }
  .case--editorial .case-chapter { scroll-margin-top:80px; }
  .case--editorial .case-next { grid-template-columns:1fr 1fr; }
  .case--editorial .case-next-contact { grid-column:1/-1; }
}
@media (max-width:740px){
  .case--editorial .case-hero { padding-top:23px; }
  .case--editorial .case-meta { margin-top:34px;gap:8px;font-size:9px; }
  .case--editorial .case-hero-kicker { margin:39px 0 18px; }
  .case--editorial .case-hero h1 { font-size:clamp(44px,10vw,80px);line-height:1;letter-spacing:-.073em;margin-bottom:25px; }
  .case--editorial .case-summary { font-size:clamp(19px,4.6vw,27px); }
  .case--editorial .case-hero-actions { margin:32px 0 45px; }
  .case--editorial .case-button { width:100%;gap:12px; }
  .case--editorial .case-hero-foot { flex-wrap:wrap;font-size:9px; }
  .case--editorial .case-contents { margin-bottom:30px; }
  .case--editorial .case-chapter { padding-bottom:84px; }
  .case--editorial .case-chapter-inner { padding-top:30px; }
  .case--editorial .case-chapter h2 { font-size:clamp(34px,8.8vw,60px);line-height:1.06; }
  .case--editorial .case-chapter-lead { font-size:19px; }
  .case--editorial .case-breakdown { margin-top:45px; }
  .case--editorial .detail-card { padding:18px; }
  .case--editorial .case-path { margin:35px 0 55px; }
  .case--editorial .case-path li>strong { font-size:16px; }
  .case--editorial .case-showcase h3 { font-size:clamp(36px,9.3vw,57px); }
  .case--editorial .demo-window { box-shadow:4px 4px 0 #334c39; }
  .case--editorial .case-outcome-card { padding:24px 18px; }
  .case--editorial .case-outcome-card>p:not(.case-chapter-overline) { font-size:19px; }
  .case--editorial .case-stack>span { padding:12px 14px;font-size:13px; }
  .case--editorial .case-next { grid-template-columns:1fr;gap:10px;padding-bottom:65px; }
  .case--editorial .case-next-contact { grid-column:auto; }
  .case--editorial .case-next a { min-height:123px;padding:19px; }
  .case--editorial .case-next a>strong { font-size:22px; }
}
@media (max-width:390px){
  .case--editorial .case-hero h1 { font-size:clamp(35px,9.5vw,45px); }
  .case--editorial .case-hero-foot>span:last-child { display:none; }
  .case--editorial .case-path li { gap:7px; }
  .case--editorial .case-chapter-rail { font-size:9px; }
  .case--editorial .case-section-head { font-size:9px;flex-wrap:wrap; }
}
@media (prefers-reduced-motion: reduce){
  .case--editorial .case-button,.case--editorial .case-demo-cta,.case--editorial .case-next a{transition:none;}
  .case--editorial .case-button:hover,.case--editorial .case-demo-cta:hover{transform:none;}
}

/* Stage 11: ask for a similar project at the point where the outcome is clear. */
.case--editorial .case-outcome-contact{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 18px;align-items:center;margin-top:clamp(32px,5vw,58px);padding:18px 20px;border:1px solid var(--case-accent);background:#16241b;color:var(--ink);max-width:720px}
.case--editorial .case-outcome-contact>span{grid-column:1;color:var(--case-accent);font:10px/1.5 'DM Mono',monospace;letter-spacing:.06em}
.case--editorial .case-outcome-contact>strong{grid-column:1;font-size:clamp(19px,2.1vw,29px);line-height:1.18;letter-spacing:-.045em}
.case--editorial .case-outcome-contact>b{grid-column:2;grid-row:1/3;color:var(--case-accent);font-size:28px}
.case--editorial .case-outcome-contact:hover{background:#253c2c}
@media(max-width:520px){.case--editorial .case-outcome-contact{padding:16px}.case--editorial .case-outcome-contact>strong{font-size:20px}}
