/* Faith & Truth lesson-page hierarchy polish
   Keeps one clear view switcher, reduces nested mobile chrome,
   and gives desktop, tablet, and mobile deliberate layouts. */

.v2-view-switcher-shell{
  width:min(1160px,calc(100% - 2rem));
  margin:0 auto 1.35rem;
  padding:1rem;
  border:1px solid rgba(255,255,255,.12);
  border-radius:20px;
  background:rgba(7,22,50,.96);
  box-shadow:0 14px 36px rgba(0,0,0,.16);
}
.v2-view-switcher-shell .v2-view-tabs{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:.75rem;
  width:100%;
  margin:0;
}
.v2-view-switcher-shell .v2-view-tabs button{
  min-width:0;
  min-height:54px;
  display:grid;
  place-items:center;
  padding:.7rem .9rem;
  border:1px solid rgba(255,255,255,.17);
  border-radius:999px;
  background:#0b1836;
  color:#f7f9ff;
  font:inherit;
  font-weight:850;
  line-height:1.15;
  text-align:center;
  cursor:pointer;
  overflow-wrap:anywhere;
}
.v2-view-switcher-shell .v2-view-tabs button:hover,
.v2-view-switcher-shell .v2-view-tabs button:focus-visible{border-color:#ffd34f}
.v2-view-switcher-shell .v2-view-tabs button[aria-selected="true"]{
  border-color:#ffd34f;
  background:#ffd34f;
  color:#06122d;
}

/* A view switcher belongs above the lesson, never inside the lesson toolbar. */
.series-lesson-toolbar .v2-view-tabs{display:none!important}

/* Leader, teaching, and print views should use the width vacated by the participant sidebar. */
.lesson-layout.v2-full-width-view{grid-template-columns:minmax(0,1fr)}
.lesson-layout.v2-full-width-view>.lesson-sidebar{display:none!important}
.lesson-layout.v2-full-width-view>.series-lesson{
  grid-column:1/-1;
  width:100%;
  min-width:0;
}
.v2-leader-grid>*,.v2-print-grid>*,.v2-resources>*{min-width:0}

/* The guide itself comes before optional productivity tools. */
.v2-leader-guide:not([hidden]),.v2-teaching-view:not([hidden]){
  display:flex;
  flex-direction:column;
}
.v2-leader-guide>*,.v2-teaching-view>*{order:3}
.v2-leader-guide>.v2-leader-intro,.v2-teaching-view>.v2-leader-intro{order:1}
.v2-leader-guide>.v2-leader-grid,.v2-teaching-view>.v2-leader-grid{order:2}
.v2-leader-guide>.teaching-dashboard,.v2-teaching-view>.teaching-dashboard{margin-top:1.25rem}
.v2-leader-guide>.presentation-launch,.v2-teaching-view>.presentation-launch,
.v2-leader-guide>.teaching-notebook,.v2-teaching-view>.teaching-notebook{margin-top:1rem}

/* Keep utility actions in the NLDG visual language. */
#leader-print-v2{
  width:max-content;
  max-width:100%;
  min-height:44px;
  padding:.62rem 1rem;
  border:1px solid #ffd34f;
  border-radius:999px;
  background:rgba(255,211,79,.08);
  color:#ffd34f;
  font:inherit;
  font-weight:850;
  cursor:pointer;
}
#leader-print-v2:hover,#leader-print-v2:focus-visible{
  background:#ffd34f;
  color:#06122d;
  outline:none;
}

/* Make the advanced packet builder secondary to the four quick print choices. */
.v2-print-view .print-center-entry{
  margin-top:1rem;
  padding:.9rem 1rem;
  border-style:dashed;
  background:rgba(91,33,182,.1);
}
.v2-print-view .print-center-entry h3{font-size:1.05rem}
.v2-print-view .print-center-entry p{font-size:.9rem}

/* Make the visitor-facing curriculum label read like a publication, not a build string. */
.curriculum-v2-badge{
  color:#d6fff0;
  border-color:rgba(110,231,183,.42);
  background:rgba(16,185,129,.13);
}

/* The lesson opens in reading order: Big Idea first, Scripture/details directly beneath it. */
.v2-snapshot{
  grid-template-columns:1fr;
  gap:.8rem;
}
.v2-snapshot>.v2-card:first-child{
  padding:clamp(1.25rem,2.4vw,1.8rem);
}
.v2-snapshot>.v2-card:first-child h2{
  max-width:980px;
  color:#f7f9ff!important;
  opacity:1!important;
  font-size:clamp(1.8rem,3.2vw,2.4rem);
  line-height:1.08;
  letter-spacing:-.035em;
}
.v2-snapshot>.v2-card:first-child .kicker{color:#c9d5ea}
.v2-snapshot>.v2-card:last-child{
  padding:1rem 1.1rem;
}
.v2-snapshot>.v2-card:last-child .v2-meta-list{
  display:grid;
  grid-template-columns:minmax(0,2fr) minmax(150px,.8fr) minmax(150px,.8fr);
  gap:0;
}
.v2-snapshot>.v2-card:last-child .v2-meta-list li{
  min-width:0;
  grid-template-columns:1fr;
  gap:.35rem;
  align-content:start;
  padding:.15rem 1rem;
  border-left:1px solid rgba(148,163,184,.18);
}
.v2-snapshot>.v2-card:last-child .v2-meta-list li:first-child{
  padding-left:.1rem;
  border-left:0;
}
.v2-snapshot>.v2-card:last-child .v2-meta-list strong{
  font-size:.78rem;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.v2-snapshot>.v2-card:last-child .v2-meta-list span{
  overflow-wrap:anywhere;
}

/* Tablet-sized reading surfaces get a calmer Big Idea scale. */
@media(min-width:621px) and (max-width:1200px){
  .v2-snapshot>.v2-card:first-child h2{
    font-size:clamp(1.75rem,2.75vw,2.1rem);
    line-height:1.1;
  }
}

/* Desktop: full four-option switcher, sidebar + lesson layout, generous content width. */
@media(min-width:1025px){
  .v2-view-switcher-shell .v2-view-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
  .series-lesson{min-width:0}
}

/* Tablet: two-by-two view switcher and a less crowded reading column. */
@media(min-width:621px) and (max-width:1024px){
  .series-shell{padding-left:1.25rem;padding-right:1.25rem}
  .v2-view-switcher-shell{
    width:calc(100% - 2.5rem);
    margin-bottom:1.15rem;
  }
  .v2-view-switcher-shell .v2-view-tabs{grid-template-columns:repeat(2,minmax(0,1fr))}
  .v2-view-switcher-shell .v2-view-tabs button{min-height:56px}
  .series-lesson{padding:clamp(1.2rem,3vw,2rem)}
}

@media(min-width:621px) and (max-width:880px){
  .lesson-layout{grid-template-columns:1fr}
  .lesson-layout>.lesson-sidebar{display:none!important}
  .v2-leader-grid,.v2-resources,.v2-application-columns,.v2-case-grid,.v2-print-grid{grid-template-columns:1fr}
}

/* Mobile: preserve 2x2 switching for fast access, then flatten the surrounding shell. */
@media(max-width:620px){
  .series-shell{padding-top:1rem;padding-left:1rem;padding-right:1rem}
  .v2-view-switcher-shell{
    width:100%;
    margin:0 0 1rem;
    padding:.8rem;
    border-radius:17px;
  }
  .v2-view-switcher-shell .v2-view-tabs{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:.6rem;
  }
  .v2-view-switcher-shell .v2-view-tabs button{
    min-height:58px;
    padding:.65rem .55rem;
    border-radius:18px;
    font-size:.88rem;
  }
  .lesson-layout{grid-template-columns:1fr;gap:.65rem}
  .lesson-layout>.lesson-sidebar{display:none!important}
  .series-lesson{
    min-width:0;
    padding:0;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .series-lesson-toolbar{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:.75rem;
    padding:.2rem 0 .95rem;
    border-bottom:0;
  }
  .series-lesson-toolbar>a{font-size:.92rem}
  .v2-snapshot{margin:.35rem 0 .85rem;gap:.75rem}
  .v2-card,.v2-section,.v2-resource-card,.v2-leader-card{
    min-width:0;
    padding:1rem;
    border-radius:16px;
  }
  .v2-leader-grid,.v2-resources,.v2-application-columns,.v2-case-grid,.v2-print-grid{grid-template-columns:1fr}
  .v2-meta-list li{grid-template-columns:1fr}
  .v2-snapshot>.v2-card:last-child .v2-meta-list{grid-template-columns:1fr}
  .v2-snapshot>.v2-card:last-child .v2-meta-list li{
    padding:.8rem 0;
    border-left:0;
    border-top:1px solid rgba(148,163,184,.18);
  }
  .v2-snapshot>.v2-card:last-child .v2-meta-list li:first-child{
    padding-top:0;
    border-top:0;
  }
  .v2-snapshot>.v2-card:last-child .v2-meta-list li:last-child{padding-bottom:0}
  .v2-leader-intro{grid-template-columns:1fr}
  .curriculum-v2-badge{
    margin-bottom:.8rem;
    font-size:.72rem;
    letter-spacing:.045em;
  }
  .series-lesson-nav{gap:.75rem}
  .series-lesson-nav a{max-width:48%;overflow-wrap:anywhere}
  .v2-print-grid button{min-height:96px}
  #leader-print-v2{width:100%;justify-content:center;text-align:center}
  .v2-print-view .print-center-entry{grid-template-columns:1fr}
}

@media(max-width:390px){
  .series-shell{padding-left:.75rem;padding-right:.75rem}
  .v2-view-switcher-shell .v2-view-tabs button{font-size:.82rem;padding:.6rem .4rem}
}

@media print{.v2-view-switcher-shell{display:none!important}}
