/* Ledger chrome for the legacy case-study template (sce, vitalog, nightly, bioelectric).
   Actions are ruled links, never boxes: no pills, no fills, no eyebrows. See DESIGN.md. */

/* Back link: a ruled text link that sits in the header and scrolls away with it, so it never
   rides over body copy. Its ink follows the surface under it (js/case-ledger.js). */
body .back-to-portfolio,
body > a.nav-link{
  position:absolute; top:24px; left:clamp(20px,4vw,56px); right:auto; z-index:1000;
  display:inline-flex; align-items:center; gap:10px;
  margin:0; padding:0 0 7px;
  background:none; border:0; border-radius:0; box-shadow:none;
  -webkit-backdrop-filter:none; backdrop-filter:none;
  border-bottom:1.5px solid rgba(255,255,255,.5);
  color:#fff; font-size:15px; font-weight:600; line-height:1; letter-spacing:0;
  text-decoration:none; text-transform:none; white-space:nowrap;
  transform:none; transition:color .25s, border-color .25s;
}
body .back-to-portfolio svg,
body > a.nav-link svg{ width:16px; height:16px; flex:none; stroke:currentColor; transition:transform .2s; }
body .back-to-portfolio:hover,
body > a.nav-link:hover{ background:none; box-shadow:none; transform:none; color:#fff; border-bottom-color:#fff; }
body .back-to-portfolio:hover svg,
body > a.nav-link:hover svg{ transform:translateX(-4px); }
body .back-to-portfolio.on-light,
body > a.nav-link.on-light{ color:#0B1220; border-bottom-color:rgba(11,18,32,.42); }
body .back-to-portfolio.on-light:hover,
body > a.nav-link.on-light:hover{ color:#0B1220; border-bottom-color:#0B1220; }
body .back-to-portfolio:focus-visible,
body > a.nav-link:focus-visible{ outline:2px solid #4472FF; outline-offset:6px; }

/* The hero badge was an eyebrow. The headline carries it. */
body .case-badge{ display:none; }

/* Meta strip: a ruled ledger row with plain field labels. */
body .case-meta .meta-item{ border-top:1px solid rgba(128,134,150,.32); padding-top:16px; }
body .case-meta .meta-item h3{ font-size:13px; font-weight:500; letter-spacing:0; text-transform:none; margin-bottom:6px; }

/* Next case: a ruled link under the title. */
body .next-label{ display:none; }
body .next-link{
  display:inline-flex; align-items:center; gap:10px;
  padding:0 0 8px; background:none; border:0; border-radius:0; box-shadow:none;
  border-bottom:1.5px solid rgba(255,255,255,.5); color:#fff; font-weight:600; transform:none;
  transition:border-color .25s;
}
body .next-link:hover{ background:none; color:#fff; border-bottom-color:#fff; transform:none; box-shadow:none; }
body .next-link .next-arrow{ transition:transform .2s; }
body .next-link:hover .next-arrow{ transform:translateX(4px); }

/* Stack list: ruled entries, not pills. */
body .tech-badge{
  padding:0 18px 0 0; margin:0; background:none; border:0; border-radius:0; box-shadow:none;
  border-right:1px solid rgba(128,134,150,.4); line-height:1.2; transform:none;
}
body .tech-badge:last-child{ border-right:0; padding-right:0; }
body .tech-badge:hover{ background:none; transform:none; box-shadow:none; }

/* The way out: one ruled row closes the page. It replaces the old contact forms and footers. */
.cl-end{ background:#080A10; border-top:1px solid rgba(255,255,255,.08); padding:30px clamp(20px,4vw,56px) 40px; }
.cl-end-in{ max-width:1200px; margin:0 auto; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:10px 40px; }
.cl-end-in span{ display:flex; flex-wrap:wrap; gap:10px 32px; }
.cl-end a{
  display:inline-flex; align-items:center; gap:10px; min-height:44px; padding:0;
  color:#fff; font-size:15px; font-weight:600; line-height:1; text-decoration:none; white-space:nowrap;
  background:linear-gradient(rgba(255,255,255,.5),rgba(255,255,255,.5)) 0 calc(100% - 6px)/100% 1.5px no-repeat;
  transition:background-size .25s;
}
.cl-end a:hover{ background-image:linear-gradient(#fff,#fff); }
.cl-end a svg{ width:16px; height:16px; flex:none; transition:transform .2s; }
.cl-end a:hover svg{ transform:translateX(4px); }
.cl-end a.back:hover svg{ transform:translateX(-4px); }
.cl-end a:focus-visible{ outline:2px solid #4472FF; outline-offset:4px; }

@media (max-width:640px){
  body .back-to-portfolio, body > a.nav-link{ top:22px; left:20px; font-size:14.5px; }
}
@media (prefers-reduced-motion:reduce){
  body .back-to-portfolio svg, body > a.nav-link svg, body .next-link .next-arrow{ transition:none; }
}
