/* Keep ’Em Coming Back — visual and functional audit 16 */
:root{
  --audit-line:rgba(75,39,24,.18);
  --audit-soft:rgba(255,252,247,.68);
  --audit-ink:#2f1b13;
  --audit-muted:#6a5144;
  --audit-rust:#854128;
}
html{scroll-padding-top:88px}
body{font-size:16px;text-rendering:optimizeLegibility}

/* Header: remove duplicated controls and make the remaining navigation legible. */
.system-mode-switch,.nav-primary-search{display:none!important}
.site-header-v3{min-height:76px!important;padding-block:.55rem!important;box-shadow:0 5px 18px rgba(18,8,5,.16)!important}
.site-header-v3 .brand strong{font-size:1rem!important;line-height:1.08!important}
.site-header-v3 .brand small{font-size:.67rem!important;line-height:1.25!important;letter-spacing:.035em!important}
@media(min-width:1261px){
  .site-header-v3{grid-template-columns:minmax(260px,.9fr) minmax(0,1.55fr)!important;gap:1rem!important}
  .main-nav-v3{gap:.28rem!important}
  .main-nav-v3>a,.main-nav-v3>button,.main-nav-v3 summary{font-size:.73rem!important;letter-spacing:.035em!important;padding:.58rem .62rem!important}
}
@media(max-width:1260px){
  .site-header-v3{grid-template-columns:minmax(0,1fr) auto!important}
  .nav-menu-toggle{display:inline-flex!important}
  .site-header-v3 .main-nav-v3{display:none!important;grid-column:1/-1!important}
  .site-header-v3 .main-nav-v3.is-open{display:flex!important}
}

/* Reduce oversized section gaps while preserving hierarchy. */
.system-section{padding:clamp(2.15rem,4.3vw,3.9rem) 1rem!important}
.home-featured-paths,.book-first-section,.upgrade-section,.dt-section{padding-top:clamp(2.2rem,4.5vw,4rem)!important;padding-bottom:clamp(2.2rem,4.5vw,4rem)!important}
.system-section+ .system-section{border-top:1px solid rgba(90,51,31,.06)}
.system-lead,.book-first-intro,.dt-lead{max-width:74ch}

/* Replace repeated nested white boxes with editorial dividers and breathing room. */
.eco-dashboard{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.eco-task-grid{gap:0!important;border-top:1px solid var(--audit-line);border-bottom:1px solid var(--audit-line)}
.eco-task-grid a,.eco-task-grid button{min-height:0!important;padding:1rem .9rem!important;border:0!important;border-right:1px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.eco-task-grid>*:last-child{border-right:0!important}
.eco-task-grid a:hover,.eco-task-grid a:focus-visible{background:rgba(255,255,255,.5)!important}

.system-stage-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1.2rem!important}
.system-stage{padding:1rem .15rem 0!important;border:0!important;border-top:3px solid var(--sys-gold)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.system-stage h3{margin-top:.15rem}
.role-system-grid{gap:0 1.4rem!important;border-top:1px solid var(--audit-line)}
.role-system-card{padding:1rem .1rem!important;border:0!important;border-bottom:1px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.role-system-card:hover,.role-system-card:focus-visible{background:rgba(255,255,255,.42)!important}
.problem-finder{border-radius:12px!important;box-shadow:none!important}
.problem-result-grid{gap:0 1rem!important}
.problem-result{padding:.9rem .1rem!important;border:0!important;border-top:1px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important}

.system-card,.learning-path-card,.dt-card,.dt-resource,.book-first-card{border-radius:10px!important;box-shadow:none!important}
.system-card{border:0!important;border-top:3px solid rgba(133,65,40,.65)!important;background:rgba(255,255,255,.55)!important}
.learning-path-card{border:1px solid rgba(75,39,24,.14)!important;border-top:4px solid var(--upgrade-border)!important;background:rgba(255,255,255,.72)!important}
.learning-path-card:hover,.learning-path-card:focus-visible{box-shadow:0 10px 26px rgba(52,26,17,.08)!important}

/* Tools: eliminate box-within-box presentation and shorten the initial page. */
.tool-book-group{padding:1.15rem 0!important;margin:1.35rem 0!important;border:0!important;border-top:2px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important}
.tool-book-group>header{align-items:start!important}
.tool-card-grid{gap:0 1rem!important}
.tool-source-card{min-height:150px!important;padding:1rem .2rem!important;border:0!important;border-bottom:1px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.tool-source-card:hover,.tool-source-card:focus-visible{transform:none!important;background:rgba(255,255,255,.5)!important;box-shadow:none!important}
.tool-book-group:not([data-expanded="true"]):not([data-searching="true"]) .tool-source-card:nth-child(n+5){display:none}
.tool-group-toggle{border-radius:8px!important;background:transparent!important}
.tool-book-jumps{position:relative;display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:.45rem 0 .7rem!important;scrollbar-width:thin}
.tool-book-jumps a{flex:0 0 auto;scroll-snap-align:start}
.tool-filter-shell{box-shadow:0 8px 20px rgba(47,23,13,.05)!important}

/* Directory and visit cards: retain scanability without a wall of identical boxes. */
.discovery-grid,.directory-dynamic-grid{gap:0 1rem!important}
.discovery-card,.directory-dynamic-card{padding:1rem .15rem!important;border:0!important;border-top:2px solid rgba(94,56,36,.22)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.discovery-card:hover,.directory-dynamic-card:hover{background:rgba(255,255,255,.42)!important}
.discovery-toolbar{border-radius:10px!important;box-shadow:none!important}
.verification-badge{width:max-content}

/* Artist directory: compact records reduce scrolling and keep source facts prominent. */
.artist-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.85rem!important}
.artist-card{display:grid!important;grid-template-columns:86px minmax(0,1fr)!important;min-height:0!important;border-radius:12px!important;box-shadow:none!important}
.artist-card-visual{min-height:100%!important;aspect-ratio:auto!important;border-radius:11px 0 0 11px!important;padding:.75rem!important;justify-content:center!important;align-items:center!important;text-align:center}
.artist-card-visual span{font-size:2.1rem!important}
.artist-card-visual small{font-size:.68rem!important}
.artist-card-body{padding:.9rem!important}
.artist-card h2{font-size:1.25rem!important;margin:.35rem 0 .25rem!important}
.artist-card-summary{font-size:.9rem!important;line-height:1.45!important}
.artist-card-actions{padding-top:.6rem!important}
.artist-card-actions a,.artist-card-actions button{min-height:38px!important;padding:.5rem .62rem!important;font-size:.76rem!important}

/* Dance-teacher pages: professional, less card-heavy presentation. */
.dt-grid{gap:0 1.15rem!important}
.dt-card{padding:1.15rem .15rem!important;border:0!important;border-top:3px solid rgba(139,74,40,.48)!important;border-radius:0!important;background:transparent!important}
.dt-resource-list{gap:0 1rem!important;border-top:1px solid var(--audit-line)}
.dt-resource{padding:1rem .15rem!important;border:0!important;border-bottom:1px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important}
.dt-evidence-box{border-radius:10px!important;box-shadow:none!important}
.dt-empty-directory{padding:2rem 1.25rem!important;border-width:1px!important;border-radius:10px!important;background:rgba(255,255,255,.58)!important}

/* Long-form reading and help areas. */
.chapter-layout{align-items:start}
.chapter-content{max-width:78ch;margin-inline:auto}
.chapter-connected-learning,.chapter-pager,.chapter-connect-cta,.chapter-work-panel{max-width:920px;margin-left:auto;margin-right:auto}
.context-help-card{width:min(100% - 2rem,1100px)!important;margin:2.25rem auto 0!important;padding:1rem 0!important;border:0!important;border-top:1px solid var(--audit-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
.context-help-card p{max-width:75ch}
.page-help-invite{display:none!important}
.ask-riley-launcher{right:.75rem!important;min-height:48px!important;padding:.42rem .68rem .42rem .45rem!important;gap:.45rem!important;box-shadow:0 8px 22px rgba(58,27,16,.2)!important}
.ask-riley-launcher-copy small{display:none!important}
.ask-riley-launcher-copy strong{font-size:.78rem!important}
.ask-riley-launcher-icon{width:34px!important;height:34px!important;flex-basis:34px!important}

/* Founder social link. */
.founder-profile-actions{display:grid;gap:.65rem;margin-top:1rem}
.founder-profile-actions .button{margin-top:0!important}
.founder-facebook{display:flex;align-items:center;justify-content:center;gap:.55rem;min-height:46px;padding:.68rem .85rem;border:1px solid #b9c7df;border-radius:12px;background:#fff;color:#174ea6;text-decoration:none;font-weight:900}
.founder-facebook:hover,.founder-facebook:focus-visible{background:#eef4ff;border-color:#174ea6}
.founder-facebook svg{width:21px;height:21px;fill:currentColor;flex:0 0 auto}

/* Horizontal secondary navigation needs an obvious, controlled scroll region. */
.spx-subnav,.k2-subnav,.bar2-subnav,.culture-subnav{position:relative;overflow:hidden}
.spx-subnav>*,.k2-subnav>*,.bar2-subnav>*,.culture-subnav>*{scrollbar-width:thin;scroll-snap-type:x proximity;overscroll-behavior-x:contain}
.spx-subnav a,.k2-subnav a,.bar2-subnav a,.culture-subnav a{scroll-snap-align:start}

/* Metadata and footer text should not become microscopic. */
.footer-compact-brand p,.footer-primary-links a{font-size:.8rem!important}
.footer-utility-links a{font-size:.75rem!important}
.footer-compact-copy{font-size:.72rem!important}
.tool-source-card small,.book-first-card>p,.learning-path-volume,.verification-badge{font-size:.74rem!important}

@media(max-width:900px){
  .system-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .artist-grid{grid-template-columns:1fr!important}
}
@media(max-width:700px){
  body{font-size:16px}
  .system-section{padding:2rem .75rem!important}
  .system-stage-grid{grid-template-columns:1fr!important}
  .eco-task-grid{display:grid!important;grid-template-columns:1fr!important;border-bottom:0}
  .eco-task-grid a,.eco-task-grid button{border-right:0!important;border-bottom:1px solid var(--audit-line)!important;padding:.9rem .15rem!important}
  .system-card,.learning-path-card{background:rgba(255,255,255,.62)!important}
  .tool-card-grid{grid-template-columns:1fr!important}
  .tool-source-card{min-height:0!important}
  .artist-card{grid-template-columns:72px minmax(0,1fr)!important}
  .artist-card-visual span{font-size:1.75rem!important}
  .artist-card-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .context-help-card{width:calc(100% - 1rem)!important;align-items:flex-start!important;gap:.7rem!important}
  .context-help-card a{width:auto!important;align-self:flex-start!important}
  .ask-riley-launcher{bottom:calc(max(62px,calc(56px + env(safe-area-inset-bottom))) + .55rem)!important}
  .founder-profile-actions{margin-top:.8rem}
  .spx-subnav:after,.k2-subnav:after,.bar2-subnav:after,.culture-subnav:after{content:"Swipe for more";position:absolute;right:.35rem;top:50%;transform:translateY(-50%);pointer-events:none;padding:.2rem .35rem;border-radius:5px;background:rgba(32,17,13,.82);color:#fff;font-size:.62rem;font-weight:850}
}
@media(max-width:430px){
  .artist-card-actions{grid-template-columns:1fr!important}
  .context-help-card{flex-direction:column!important}
}
@media print{.ask-riley-launcher,.context-help-card{display:none!important}}

/* Final visual audit: remove the remaining large white text containers. */
.eco-task-finder,.problem-finder,.section-tools-panel{
  width:min(1200px,calc(100% - 2rem))!important;
  margin:clamp(1.4rem,3.5vw,2.6rem) auto!important;
  padding:1.1rem 0!important;
  border:0!important;
  border-top:2px solid var(--audit-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.section-tool-grid{gap:0 1rem!important;border-top:1px solid var(--audit-line)!important}
.section-tool-card{
  min-height:0!important;
  padding:1rem .15rem!important;
  border:0!important;
  border-bottom:1px solid var(--audit-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.section-tool-card:hover,.section-tool-card:focus-visible{transform:none!important;background:rgba(255,255,255,.42)!important;box-shadow:none!important}
.artist-card{
  border:0!important;
  border-top:2px solid rgba(94,56,36,.24)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.artist-card-visual{border-radius:8px!important;min-height:94px!important;margin:.75rem 0 .75rem .25rem!important}
.artist-toolbar{border-radius:10px!important;box-shadow:none!important}
@media(min-width:1261px){.main-nav-v3>a,.main-nav-v3>button,.main-nav-v3 summary{font-size:.79rem!important}}
.footer-compact-copy{font-size:.76rem!important}.footer-utility-links a{font-size:.78rem!important}
@media(max-width:700px){
  .eco-task-finder,.problem-finder,.section-tools-panel{width:calc(100% - 1.5rem)!important;padding:.9rem 0!important}
  .tool-book-group:not([data-expanded="true"]):not([data-searching="true"]) .tool-source-card:nth-child(n+4){display:none}
  .artist-card{grid-template-columns:64px minmax(0,1fr)!important}
  .artist-card-visual{margin:.65rem 0 .65rem 0!important;min-height:80px!important}
}
