/*
  YakData visual elevation: Phase 5, Cards + Repeated Components
  2026-08-28
  Scope: card family, repeated component geometry, selected/featured states,
  and restrained interaction polish only.
  No copy, image, CTA, route, or section-order changes.
*/

:root{
  --yd-card-bg:#FFFFFF;
  --yd-card-bg-soft:#FAF9F6;
  --yd-card-border:#D9D5CC;
  --yd-card-border-strong:#C9C3B7;
  --yd-card-radius:10px;
  --yd-card-radius-lg:12px;
  --yd-card-pad:28px;
  --yd-card-gap:16px;
  --yd-card-shadow:0 8px 24px rgba(11,29,45,.055);
  --yd-card-shadow-strong:0 14px 34px rgba(11,29,45,.09);
  --yd-card-shadow-hover:0 16px 38px rgba(11,29,45,.11);
}

/* --------------------------------------------------------------------------
   1. One card family
   -------------------------------------------------------------------------- */
body[data-page] :is(
  .card,
  .lab-card,
  .cred-item,
  .recognition-grid article,
  .buyer-fit-grid article,
  .system-card,
  .path-card
){
  background:var(--yd-card-bg);
  border:1px solid var(--yd-card-border)!important;
  border-radius:var(--yd-card-radius)!important;
  box-shadow:var(--yd-card-shadow);
}

body[data-page] :is(
  .card,
  .lab-card,
  .cred-item,
  .recognition-grid article,
  .buyer-fit-grid article,
  .system-card,
  .path-card
) :is(h3,b):first-child{
  text-wrap:balance;
}

/* Preserve the existing technical top-accent vocabulary, but make it uniform. */
body[data-page="home"] .lab-card,
body[data-page="production_reviews"] .recognition-grid article,
body[data-page="8x_engineer"] .system-card,
body[data-page="8x_engineer"] .path-card{
  border-top:3px solid var(--navy)!important;
}
body[data-page="production_reviews"] .recognition-grid article:nth-child(2),
body[data-page="8x_engineer"] .system-card.fde,
body[data-page="8x_engineer"] .path-card.enterprise-path{
  border-top-color:var(--gold)!important;
}

/* Featured surfaces remain clearly above ordinary cards. */
body[data-page] :is(
  .lab-case-card,
  .reviews-offer,
  .offer-card-final,
  .episode-hero-card,
  .r77-hero-card,
  .mth-hero-card
){
  border-radius:var(--yd-card-radius-lg)!important;
  box-shadow:var(--yd-card-shadow-strong)!important;
}


/* Shared capture and offer cards appear across Home, FDE Lab, and Method. */
body[data-page] .kit-capture{
  border:1px solid var(--yd-card-border)!important;
  border-radius:var(--yd-card-radius-lg)!important;
  box-shadow:var(--yd-card-shadow-strong)!important;
}
body[data-page] .kit-card-asset{
  border:1px solid var(--yd-card-border)!important;
  border-radius:8px!important;
  background:var(--yd-card-bg-soft)!important;
}
body[data-page] .capture-promise span{
  border-radius:999px;
}
body[data-page="fde_lab"] .conversion-offer,
body[data-page="method"] .mth-offer{
  border-radius:var(--yd-card-radius-lg)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.16);
}

/* The episode index uses the same component family without changing its list flow. */
body[data-page="episodes"] .episodes-list{
  display:grid;
  gap:16px;
}
body[data-page="episodes"] .episode-entry{
  padding:30px!important;
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--gold)!important;
  border-radius:var(--yd-card-radius-lg)!important;
  background:#fff;
  box-shadow:var(--yd-card-shadow);
}

/* 77 Rules boundary cards stay evidence-first, but share the site card geometry. */
body[data-page="77_rules_internal_system"] .r77-boundary-grid article{
  border-radius:var(--yd-card-radius)!important;
  box-shadow:var(--yd-card-shadow)!important;
}

/* --------------------------------------------------------------------------
   2. Homepage card families
   -------------------------------------------------------------------------- */
body[data-page="home"] :is(.lab-three,.cred-grid-simple){
  gap:18px!important;
}
body[data-page="home"] .lab-card{
  padding:28px!important;
}
body[data-page="home"] .lab-card h3{
  margin:10px 0 10px!important;
  line-height:1.15;
}
body[data-page="home"] .lab-card small{
  margin-top:20px!important;
  padding-top:0!important;
  border-top:0!important;
  color:var(--navy);
}
body[data-page="home"] .cred-item{
  padding:26px!important;
  border-top:3px solid var(--navy)!important;
}
body[data-page="home"] .cred-item b{
  margin-bottom:10px!important;
}
body[data-page="home"] :is(.fit-box,.manager-box){
  border-radius:var(--yd-card-radius)!important;
}
body[data-page="home"] .fit-box{
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
body[data-page="home"] .manager-box{
  box-shadow:0 10px 28px rgba(0,0,0,.13);
}

/* --------------------------------------------------------------------------
   3. FDE Lab: repeated rows become calm production cards
   -------------------------------------------------------------------------- */
body[data-page="fde_lab"] .episode-list{
  display:grid;
  gap:12px;
  border-top:0!important;
}
body[data-page="fde_lab"] .episode-row{
  padding:22px 24px!important;
  border:1px solid var(--yd-card-border)!important;
  border-radius:var(--yd-card-radius)!important;
  background:#fff;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="fde_lab"] .episode-row.active{
  padding-left:24px!important;
  border-left:4px solid var(--gold)!important;
  box-shadow:var(--yd-card-shadow-strong);
}
body[data-page="fde_lab"] .episode-index{
  line-height:1;
}
body[data-page="fde_lab"] .episode-status{
  padding:5px 9px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--panel);
  white-space:nowrap;
}
body[data-page="fde_lab"] .episode-row.active>a{
  padding:6px 0;
  text-underline-offset:4px;
}

body[data-page="fde_lab"] .role-strip{
  gap:12px!important;
  border:0!important;
  border-top:0!important;
  background:transparent!important;
}
body[data-page="fde_lab"] .role-strip article{
  min-height:142px;
  padding:22px!important;
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--navy)!important;
  border-radius:var(--yd-card-radius)!important;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="fde_lab"] .role-strip article:last-child{
  border-right:1px solid var(--yd-card-border)!important;
}

body[data-page="fde_lab"] .lesson-grid{
  gap:12px;
  border:0!important;
  border-top:0!important;
}
body[data-page="fde_lab"] .lesson-grid article{
  min-height:230px;
  padding:24px 22px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-top:3px solid var(--gold)!important;
  border-radius:var(--yd-card-radius)!important;
  background:rgba(255,255,255,.035);
}
body[data-page="fde_lab"] .lesson-grid article:last-child{
  border-right:1px solid rgba(255,255,255,.16)!important;
}

body[data-page="fde_lab"] .lab-case-numbers{
  gap:8px!important;
  margin-top:22px!important;
  padding-top:0!important;
  border-top:0!important;
}
body[data-page="fde_lab"] .lab-case-numbers>div{
  padding:13px 12px 12px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--panel);
}

/* --------------------------------------------------------------------------
   4. Production Reviews: turn table-like blocks into scan-friendly cards
   -------------------------------------------------------------------------- */
body[data-page="production_reviews"] :is(.recognition-grid,.buyer-fit-grid){
  gap:16px!important;
}
body[data-page="production_reviews"] :is(.recognition-grid article,.buyer-fit-grid article){
  padding:25px!important;
}
body[data-page="production_reviews"] .buyer-fit-grid article{
  border-top:3px solid var(--navy)!important;
}
body[data-page="production_reviews"] .buyer-fit-grid article:nth-child(2){
  border-top-color:var(--gold)!important;
}

body[data-page="production_reviews"] .reviews-flow{
  gap:14px;
  border:0!important;
  background:transparent!important;
}
body[data-page="production_reviews"] .reviews-flow li{
  min-height:205px;
  padding:23px!important;
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--navy)!important;
  border-radius:var(--yd-card-radius)!important;
  background:#fff;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="production_reviews"] .reviews-flow li:last-child{
  border-right:1px solid var(--yd-card-border)!important;
}

body[data-page="production_reviews"] .review-lens-grid{
  gap:14px;
  border:0!important;
  background:transparent!important;
}
body[data-page="production_reviews"] .review-lens-grid article,
body[data-page="production_reviews"] .review-lens-grid article:nth-child(4n),
body[data-page="production_reviews"] .review-lens-grid article:nth-child(n+5),
body[data-page="production_reviews"] .review-lens-grid article:last-child{
  min-height:150px;
  padding:21px!important;
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--navy)!important;
  border-radius:var(--yd-card-radius)!important;
  background:#fff;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="production_reviews"] .review-lens-grid article:last-child{
  border-top-color:var(--gold)!important;
}

body[data-page="production_reviews"] .manager-panel{
  border-radius:var(--yd-card-radius-lg);
  box-shadow:var(--yd-card-shadow-strong);
}
body[data-page="production_reviews"] .offer-boundaries{
  gap:12px;
}
body[data-page="production_reviews"] .offer-boundaries>div{
  border-radius:8px;
}

/* --------------------------------------------------------------------------
   5. 8X Engineer: consistent analytical card language
   -------------------------------------------------------------------------- */
body[data-page="8x_engineer"] .thesis-grid{
  gap:14px;
  border:0!important;
  border-top:0!important;
  background:transparent!important;
}
body[data-page="8x_engineer"] .thesis-step{
  padding:23px!important;
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--navy)!important;
  border-radius:var(--yd-card-radius)!important;
  background:#fff;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="8x_engineer"] .thesis-step:last-child{
  border-right:1px solid var(--yd-card-border)!important;
  border-top-color:var(--gold)!important;
}
body[data-page="8x_engineer"] .system-flow{
  gap:22px!important;
}
body[data-page="8x_engineer"] .system-card,
body[data-page="8x_engineer"] .path-card{
  padding:29px!important;
}
body[data-page="8x_engineer"] .rolegrid{
  gap:9px!important;
}
body[data-page="8x_engineer"] .role{
  border-radius:6px;
}
body[data-page="8x_engineer"] .acceptance-box{
  border-radius:var(--yd-card-radius-lg);
  box-shadow:0 12px 30px rgba(0,0,0,.16);
}
body[data-page="8x_engineer"] .acceptance-grid div{
  border-radius:8px;
}
body[data-page="8x_engineer"] .comparison-card{
  border-radius:var(--yd-card-radius);
}
body[data-page="8x_engineer"] .disclosure-box{
  border-radius:0 8px 8px 0;
}

/* --------------------------------------------------------------------------
   6. Method: repeated responsibility and stage surfaces
   -------------------------------------------------------------------------- */
body[data-page="method"] .mth-subs{
  gap:12px!important;
  border:0!important;
  background:transparent!important;
}
body[data-page="method"] .mth-sub{
  min-height:108px;
  padding:18px!important;
  border:1px solid var(--yd-card-border)!important;
  border-radius:8px;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="method"] .mth-sub.is-ai{
  border-left:3px solid var(--mth-gold)!important;
}

body[data-page="method"] .mth-panel{
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--mth-navy)!important;
  border-radius:var(--yd-card-radius-lg)!important;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="method"] .mth-panel.is-active{
  box-shadow:var(--yd-card-shadow-strong);
}
body[data-page="method"] .mth-panel.is-return{
  border-top-color:var(--mth-gold)!important;
}
body[data-page="method"] .mth-stage-tag{
  border-radius:999px;
}
body[data-page="method"] .mth-panel-note{
  border-radius:0 8px 8px 0;
}

body[data-page="method"] .mth-role-strip{
  gap:12px!important;
  border:0!important;
  border-top:0!important;
  background:transparent!important;
}
body[data-page="method"] .mth-role-strip article{
  min-height:132px;
  padding:21px!important;
  border:1px solid var(--yd-card-border)!important;
  border-top:3px solid var(--mth-navy)!important;
  border-radius:var(--yd-card-radius)!important;
  box-shadow:var(--yd-card-shadow);
}
body[data-page="method"] .mth-rail-static{
  border-radius:var(--yd-card-radius)!important;
  box-shadow:var(--yd-card-shadow);
}

/* --------------------------------------------------------------------------
   7. Calculator and utility cards
   -------------------------------------------------------------------------- */
body[data-page="calculator"] .card{
  padding:30px!important;
  border-top:3px solid var(--navy)!important;
}
body[data-page="calculator"] .grid-3 .card:nth-child(2),
body[data-page="calculator"] .grid-2 .card:last-child{
  border-top-color:var(--gold)!important;
}

/* --------------------------------------------------------------------------
   8. Interaction polish only where the component is actually interactive
   -------------------------------------------------------------------------- */
@media(hover:hover) and (pointer:fine){
  body[data-page] :is(
    a.card,
    a.lab-card,
    a.path-card,
    .episode-entry a,
    .mth-hero-step
  ){
    transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
  }
  body[data-page] :is(a.card,a.lab-card,a.path-card):hover{
    transform:translateY(-2px);
    box-shadow:var(--yd-card-shadow-hover);
    border-color:var(--yd-card-border-strong)!important;
  }
}

/* --------------------------------------------------------------------------
   9. Responsive card geometry
   -------------------------------------------------------------------------- */
@media(max-width:1000px){
  body[data-page="fde_lab"] .role-strip,
  body[data-page="method"] .mth-role-strip{
    gap:10px!important;
  }
  body[data-page="production_reviews"] :is(.reviews-flow,.review-lens-grid){
    gap:12px!important;
  }
}

@media(max-width:760px){
  body[data-page] :is(.card,.lab-card,.cred-item,.system-card,.path-card){
    padding:24px!important;
  }
  body[data-page="fde_lab"] .episode-row,
  body[data-page="fde_lab"] .episode-row.active{
    padding:20px!important;
  }
  body[data-page="fde_lab"] .episode-status{
    justify-self:start;
  }
  body[data-page="fde_lab"] .role-strip article,
  body[data-page="method"] .mth-role-strip article{
    min-height:0;
  }
  body[data-page="production_reviews"] .reviews-flow li,
  body[data-page="production_reviews"] .review-lens-grid article,
  body[data-page="production_reviews"] .review-lens-grid article:nth-child(4n),
  body[data-page="production_reviews"] .review-lens-grid article:nth-child(n+5),
  body[data-page="production_reviews"] .review-lens-grid article:last-child{
    min-height:0;
    border:1px solid var(--yd-card-border)!important;
    border-top:3px solid var(--navy)!important;
  }
  body[data-page="production_reviews"] .review-lens-grid article:last-child{
    border-top-color:var(--gold)!important;
  }
  body[data-page="8x_engineer"] .thesis-step,
  body[data-page="8x_engineer"] .thesis-step:last-child{
    border:1px solid var(--yd-card-border)!important;
    border-top:3px solid var(--navy)!important;
  }
  body[data-page="8x_engineer"] .thesis-step:last-child{
    border-top-color:var(--gold)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body[data-page] :is(a.card,a.lab-card,a.path-card){transition:none!important}
}
