/* Sacralib V2.12 — HOME-only owner preview corrections, after V2.11.
   No data/entries/admin/public rendering changes. */

/* LIVE WORLD: extend the Figma artwork into the unused middle strip; the art itself
   fades BEFORE it meets text, retaining the wide search field. */
body.codex-site-v2-home #codexSiteHome .sv2-live-grid {
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-live-card {
  min-height:120px!important;
  padding:10px 12px!important;
  align-items:center!important;
  border-radius:4px!important;
  background:linear-gradient(90deg,#f8f1e6,#f5ecde)!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-live-card::before,
body.codex-site-v2-home #codexSiteHome .sv2-find-player::before,
body.codex-site-v2-home #codexSiteHome .sv2-chaos::before {
  width:68%!important;
  border-right:0!important;
  max-width:none!important;
  background-position:left center!important;
  background-size:cover!important;
  opacity:1!important;
  -webkit-mask-image:linear-gradient(90deg,#000 0%,#000 30%,rgba(0,0,0,.54) 47%,rgba(0,0,0,.12) 62%,transparent 78%)!important;
  mask-image:linear-gradient(90deg,#000 0%,#000 30%,rgba(0,0,0,.54) 47%,rgba(0,0,0,.12) 62%,transparent 78%)!important;
  filter:saturate(.97) contrast(1.03)!important;
}
body.codex-site-v2-home #codexSiteHome :is(
  .sv2-online .sv2-live-copy,
  .sv2-chaos .sv2-chaos-copy,
  .sv2-find-player .sv2-player-form
) {
  margin:0 7px 0 37%!important;
  padding:4px 0!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  position:relative!important;
  z-index:2!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-find-player .sv2-player-form {
  margin-left:33%!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-online .sv2-live-copy strong {
  font-size:clamp(25px,1.9vw,33px)!important;
  line-height:1.08!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-online .sv2-live-copy small,
body.codex-site-v2-home #codexSiteHome .sv2-chaos .sv2-chaos-copy small {
  font-size:clamp(12px,.89vw,15px)!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-player-controls {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  width:100%!important;
  gap:7px!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-player-controls input {
  display:block!important;
  width:100%!important;
  min-width:0!important;
  height:38px!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-player-controls button {
  height:38px!important;
  padding-inline:10px!important;
  white-space:nowrap!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-chaos-copy strong {
  font-size:clamp(17px,1.30vw,21px)!important;
}

/* The type code ("guide", "bot", etc.) is editorial metadata, not a home-page
   label. Keep the coloured publication badge and the actual article title. */
body.codex-site-v2-home #codexSiteHome .sv2-fresh .sv2-feed-title>small {
  display:none!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-fresh .sv2-feed-title {
  display:flex!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:0!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-fresh .sv2-feed-row {
  min-height:55px!important;
}

/* Both hero pictures are real, masked image layers, not hard-edged rectangles
   under a gradient. No upscaling of the modest-size Figma image to 100% width. */
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero,
body.codex-site-v2-home #codexSiteHome .sv2-explore {
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  background-color:#0b1b2b!important;
  background-image:none!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero::before,
body.codex-site-v2-home #codexSiteHome .sv2-explore::before {
  content:''!important;
  position:absolute!important;
  z-index:-1!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  height:100%!important;
  width:min(76%,560px)!important;
  max-width:none!important;
  pointer-events:none!important;
  background-repeat:no-repeat!important;
  background-position:center!important;
  background-size:cover!important;
  opacity:1!important;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 13%,rgba(0,0,0,.38) 35%,rgba(0,0,0,.85) 58%,#000 80%)!important;
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.04) 13%,rgba(0,0,0,.38) 35%,rgba(0,0,0,.85) 58%,#000 80%)!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero::before {
  background-image:url('/assets/codex-v27-figma/patch-landscape.webp')!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-explore::before {
  width:min(83%,480px)!important;
  background-image:url('/assets/codex-v27-figma/explore.webp')!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero .sv2-patch-copy {
  z-index:2!important;
  position:relative!important;
  max-width:70%!important;
}
/* Featured news uses the same round right-edge arrow affordance as Explore. */
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero::after {
  content:'→'!important;
  position:absolute!important;
  z-index:3!important;
  right:15px!important;
  top:50%!important;
  transform:translateY(-50%)!important;
  width:40px!important;
  height:40px!important;
  display:grid!important;
  place-items:center!important;
  border:1px solid #cfb78f!important;
  border-radius:50%!important;
  background:rgba(9,20,31,.88)!important;
  color:#f9ead4!important;
  box-shadow:0 3px 11px rgba(4,10,17,.30)!important;
  font:normal 23px/1 Georgia,serif!important;
  pointer-events:none!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero .sv2-patch-copy>span {
  display:inline-block!important;
  margin-top:7px!important;
  border:0!important;
  background:transparent!important;
  padding:0!important;
  text-decoration:underline!important;
  text-underline-offset:3px!important;
  font-size:13px!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-patch-hero:focus-visible,
body.codex-site-v2-home #codexSiteHome .sv2-explore:focus-visible {
  outline:3px solid #ac8047!important;
  outline-offset:2px!important;
}
body.codex-site-v2-home #codexSiteHome .sv2-explore>.sv2-icon {
  z-index:3!important;
  right:16px!important;
  top:50%!important;
  left:auto!important;
  transform:translateY(-50%)!important;
}

/* Fade the two painted side murals BEFORE their natural bottom edge.
   Otherwise the PNG border stops abruptly above the footer. */
body.codex-site-v2-home #homeView::before,
body.codex-site-v2-home #homeView::after {
  height:calc(100% + 115px)!important;
  aspect-ratio:auto!important;
  background-size:100% 100%!important;
  -webkit-mask-image:linear-gradient(to bottom,#000 0%,#000 53%,rgba(0,0,0,.90) 64%,rgba(0,0,0,.33) 83%,transparent 99%)!important;
  mask-image:linear-gradient(to bottom,#000 0%,#000 53%,rgba(0,0,0,.90) 64%,rgba(0,0,0,.33) 83%,transparent 99%)!important;
}

@media (max-width:1199px) {
  body.codex-site-v2-home #codexSiteHome .sv2-live-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-chaos{grid-column:1/-1!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-chaos::before{width:55%!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-chaos .sv2-chaos-copy{margin-left:33%!important;}
}
@media (max-width:820px) {
  body.codex-site-v2-home #codexSiteHome .sv2-live-grid{grid-template-columns:1fr!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-chaos{grid-column:auto!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-live-card{min-height:115px!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-live-card::before{width:58%!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-find-player .sv2-player-form{margin-left:34%!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-patch-hero .sv2-patch-copy{max-width:79%!important;}
}
@media (max-width:520px) {
  body.codex-site-v2-home #codexSiteHome .sv2-live-card{min-height:108px!important;padding:8px!important;}
  body.codex-site-v2-home #codexSiteHome :is(.sv2-online .sv2-live-copy,.sv2-chaos .sv2-chaos-copy){margin-left:34%!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-find-player .sv2-player-form{margin-left:31%!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-player-controls{gap:5px!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-player-controls button{padding-inline:8px!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-patch-hero .sv2-patch-copy{max-width:87%!important;}
  body.codex-site-v2-home #codexSiteHome .sv2-patch-hero::after{width:30px!important;height:30px!important;right:7px!important;}
}
