/*
  BPF Book Hub Visual Standard v50.9.1
  Shared presentation and navigation layer only.
  Default: professional navy / white with a restrained book-specific accent.
*/
:root{
  --hub-navy:#071d2b;
  --hub-navy-2:#0d3148;
  --hub-ink:#132332;
  --hub-muted:#607181;
  --hub-paper:#ffffff;
  --hub-canvas:#eef3f6;
  --hub-line:#d8e1e7;
  --hub-accent:#276fa8;
  --hub-accent-dark:#18557f;
  --hub-accent-soft:#e9f3fa;
  --hub-warm:#d7a446;
  --hub-danger:#b42332;
  --hub-orange-ink:#a8541a;
  --hub-radius:20px;
  --hub-shadow:0 14px 38px rgba(7,29,43,.10);
  --hub-shadow-strong:0 24px 64px rgba(7,29,43,.16);
}

body.bpf-hub-polished{
  min-width:320px;
  color:var(--hub-ink);
  background:
    radial-gradient(circle at 12% 0,rgba(39,111,168,.10),transparent 30rem),
    linear-gradient(180deg,#f7fafc,var(--hub-canvas));
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body.bpf-hub-polished[data-bpf-hub-theme="cream"]{
  --hub-canvas:#f4efe6;--hub-line:#ddd3c2;--hub-accent:#8f6416;--hub-accent-dark:#765116;--hub-accent-soft:#faf2df;
}
body.bpf-hub-polished[data-bpf-hub-theme="teal"]{
  --hub-accent:#147d86;--hub-accent-dark:#0d5d64;--hub-accent-soft:#e5f5f4;
}
body.bpf-hub-polished[data-bpf-hub-theme="rust"]{
  --hub-accent:#b85635;--hub-accent-dark:#843b24;--hub-accent-soft:#f9ece7;
}
body.bpf-hub-polished[data-bpf-hub-theme="blue"]{
  --hub-accent:#176bc0;--hub-accent-dark:#104d89;--hub-accent-soft:#e7f1fc;
}
body.bpf-hub-polished[data-bpf-hub-theme="calm"]{
  --hub-accent:#5874a6;--hub-accent-dark:#3b537e;--hub-accent-soft:#edf1f8;
}
body.bpf-hub-polished[data-bpf-hub-theme="charcoal"]{
  --hub-accent:#b75b3b;--hub-accent-dark:#833c27;--hub-accent-soft:#f7e9e4;
}


/* v50.9.1: accessible orange ink on the Metabolic hub's light cream surfaces.
   The brighter orange remains available only for large decorative fills on dark surfaces. */
body.bpf-hub-polished[data-bpf-hub-id="metabolic-reset"] :is(.brand,.badge,.kicker,h1 .r){
  color:var(--hub-orange-ink)!important;
}
body.bpf-hub-polished[data-bpf-hub-id="metabolic-reset"] .hero{
  border-color:rgba(168,84,26,.48)!important;
}
body.bpf-hub-polished[data-bpf-hub-id="metabolic-reset"] .badge{
  border-color:rgba(168,84,26,.52)!important;
}

/* A clear start panel, inserted after each hub hero. */
.bpf-hub-guide{
  position:relative;
  isolation:isolate;
  width:min(1120px,calc(100% - 28px));
  margin:24px auto 30px;
  padding:clamp(22px,4vw,34px);
  color:#fff;
  background:
    radial-gradient(circle at 94% 10%,rgba(255,255,255,.11),transparent 18rem),
    linear-gradient(135deg,var(--hub-navy),var(--hub-navy-2));
  border:1px solid rgba(255,255,255,.12);
  border-radius:26px;
  box-shadow:var(--hub-shadow-strong);
  overflow:hidden;
}
.bpf-hub-guide::after{
  content:"";
  position:absolute;right:-74px;bottom:-98px;
  width:260px;height:260px;border-radius:50%;
  border:1px solid rgba(255,255,255,.09);
  box-shadow:0 0 0 38px rgba(255,255,255,.025),0 0 0 78px rgba(255,255,255,.018);
  pointer-events:none;z-index:-1;
}
.bpf-hub-guide__layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(260px,.7fr);gap:28px;align-items:center}
.bpf-hub-guide__eyebrow{
  display:inline-flex;align-items:center;min-height:29px;padding:5px 11px;margin:0 0 11px;
  border-radius:999px;background:rgba(255,255,255,.10);color:#dcecff;
  font:800 11px/1.2 system-ui,-apple-system,sans-serif;letter-spacing:.13em;text-transform:uppercase;
}
.bpf-hub-guide h2{margin:0 0 10px;color:#fff;font-size:clamp(28px,4vw,46px);line-height:1.02;letter-spacing:-.025em;text-wrap:balance}
.bpf-hub-guide__prompt{max-width:720px;margin:0;color:#d8e4ec;font-size:clamp(15px,2vw,17px);line-height:1.58;text-wrap:pretty}
.bpf-hub-guide__actions{display:grid;gap:10px;align-content:center}
.bpf-hub-guide__button{
  min-height:56px;display:flex;align-items:center;justify-content:center;gap:9px;
  padding:13px 18px;border:0;border-radius:15px;
  font:800 15px/1.2 system-ui,-apple-system,sans-serif;text-decoration:none!important;text-align:center;cursor:pointer;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.bpf-hub-guide__button--primary{background:var(--hub-accent);color:#fff;box-shadow:0 12px 25px rgba(0,0,0,.22)}
.bpf-hub-guide__button--secondary{background:#fff;color:var(--hub-navy);box-shadow:inset 0 0 0 1px rgba(7,29,43,.08)}
.bpf-hub-guide__button:hover,.bpf-hub-guide__button:focus-visible{transform:translateY(-2px);box-shadow:0 14px 30px rgba(0,0,0,.25);outline:3px solid rgba(255,255,255,.72);outline-offset:3px}
.bpf-hub-guide__steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:24px}
.bpf-hub-guide__step{display:flex;align-items:flex-start;gap:9px;padding:12px 13px;border:1px solid rgba(255,255,255,.12);border-radius:15px;background:rgba(255,255,255,.055);color:#eaf1f5;font-size:13px;line-height:1.35}
.bpf-hub-guide__step strong{flex:0 0 25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#fff;color:var(--hub-navy);font-size:12px}
.bpf-hub-guide__book{margin-top:15px;color:#b9cbd7;font-size:12px;line-height:1.4}

/* Consistent, comfortable controls. Existing functionality and selectors remain unchanged. */
body.bpf-hub-polished :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid color-mix(in srgb,var(--hub-accent) 68%,#fff);outline-offset:3px}
body.bpf-hub-polished :is(.btn,.flj-btn,.cm-primary,.primary,.secondary,.ghost,.qbtn,.manage,.timerBtn,.choice,.reflect,.daybtn,.weekpick){min-height:50px;border-radius:13px;font-weight:800}
body.bpf-hub-polished :is(input:not([type="radio"]):not([type="checkbox"]),select,textarea){min-height:48px;border-radius:12px;border:1px solid var(--hub-line);background:#fff;color:var(--hub-ink);font-size:16px}
body.bpf-hub-polished textarea{min-height:100px}

/* Card and tile polish. Book-specific accents remain restrained. */
body.bpf-hub-polished :is(.tile,.card,.tool,.session,.workout-card,.lev,.guide,.safety,.notice,.status-banner,.setup-panel){
  border-radius:var(--hub-radius);
}
body.bpf-hub-polished :is(.tile,.card,.tool,.session,.workout-card,.lev){
  border-color:var(--hub-line)!important;
  box-shadow:0 7px 20px rgba(7,29,43,.065);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
body.bpf-hub-polished a:is(.tile,.tool,.session,.workout-card,.lev):hover,
body.bpf-hub-polished a:is(.tile,.tool,.session,.workout-card,.lev):focus-visible{
  transform:translateY(-3px);
  border-color:color-mix(in srgb,var(--hub-accent) 58%,var(--hub-line))!important;
  box-shadow:var(--hub-shadow);
  text-decoration:none;
}
body.bpf-hub-polished :is(.tile,.tool,.session,.workout-card) :is(b,h2,h3,strong){color:var(--hub-ink)}
body.bpf-hub-polished :is(.tile,.tool,.session,.workout-card) :is(span,p){line-height:1.45}
body.bpf-hub-polished :is(.sect,.seclbl,.section,.section-head,.cm-sec){letter-spacing:.02em}
body.bpf-hub-polished details{border-radius:18px}
body.bpf-hub-polished details>summary{min-height:50px;display:flex;align-items:center;cursor:pointer}

/* Clear meaning for safety and success areas. */
body.bpf-hub-polished :is(.safety,.med,.warning,.danger){border-color:#efc3c7!important}
body.bpf-hub-polished :is(.done,.success,.teal){border-color:#b7ddd9!important}

/* Simple bottom prompt on phones so the main action is always easy to find. */
.bpf-hub-mobile-action{display:none}

@media(max-width:760px){
  .bpf-hub-guide{width:calc(100% - 20px);margin:14px auto 22px;padding:21px 17px;border-radius:21px}
  .bpf-hub-guide__layout{grid-template-columns:1fr;gap:18px}
  .bpf-hub-guide__actions{grid-template-columns:1fr}
  .bpf-hub-guide__steps{grid-template-columns:1fr;gap:8px;margin-top:18px}
  .bpf-hub-guide__step{align-items:center}
  body.bpf-hub-polished :is(.btn,.flj-btn,.cm-primary,.primary,.secondary,.ghost,.qbtn,.manage,.timerBtn,.choice,.reflect){min-height:54px}
  body.bpf-hub-polished :is(.tiles,.grid,.quick,.statgrid,.session-grid){gap:13px!important}
  body.bpf-hub-polished :is(.tile,.card,.tool,.session,.workout-card,.lev){border-radius:17px}
  .bpf-hub-mobile-action{
    position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:9998;
    min-height:56px;display:flex;align-items:center;justify-content:center;padding:13px 18px;
    border:1px solid rgba(255,255,255,.24);border-radius:16px;background:var(--hub-accent);color:#fff!important;
    box-shadow:0 18px 45px rgba(7,29,43,.32);font:900 15px/1.2 system-ui,-apple-system,sans-serif;text-decoration:none!important;
  }
  body.bpf-hub-polished{padding-bottom:82px}
  body.bpf-hub-polished.bpf-hub-has-bottom-nav{padding-bottom:154px}
  body.bpf-hub-polished.bpf-hub-has-bottom-nav .bpf-hub-mobile-action{bottom:calc(78px + env(safe-area-inset-bottom))}
}

@media(prefers-reduced-motion:reduce){
  .bpf-hub-guide__button,body.bpf-hub-polished :is(.tile,.tool,.session,.workout-card,.lev){transition:none!important}
}

/* Phase 9 real-device reflow Patch B — Capable Body hub only.
   The in-page primary action is already present, so remove the duplicate fixed CTA at the
   exact narrow-screen floor instead of allowing it to obscure readable content. */
@media(max-width:360px){
  body.bpf-hub-polished[data-bpf-hub-id="capable-body"]{min-width:0}
  body.bpf-hub-polished[data-bpf-hub-id="capable-body"] .bpf-hub-mobile-action{display:none!important}
}

/* v51.14.0 full hub modernization — calm hierarchy for review/support surfaces. */
.bpf-hub-guide--compact{padding:22px 24px;margin-top:16px;margin-bottom:20px}
.bpf-hub-guide--compact .bpf-hub-guide__layout{grid-template-columns:minmax(0,1.45fr) minmax(230px,.55fr);gap:20px}
.bpf-hub-guide--compact h2{font-size:clamp(24px,3.4vw,36px)}
.bpf-hub-guide--compact .bpf-hub-guide__steps{margin-top:16px}
.bpf-hub-guide--compact .bpf-hub-guide__book{margin-bottom:0}

/* Program directories stay complete, but the first decision is visually dominant. */
body.bpf-hub-polished[data-bpf-hub-id="programs"] :is(.tile,.card),
body.bpf-hub-polished[data-bpf-hub-id="pdf-programs"] :is(.tile,.card){scroll-margin-top:18px}
body.bpf-hub-polished[data-bpf-hub-id="programs"] .hero,
body.bpf-hub-polished[data-bpf-hub-id="pdf-programs"] .hero,
body.bpf-hub-polished[data-bpf-hub-id="start-here"] .hero{box-shadow:var(--hub-shadow)}

/* Dense program pages remain fully available while secondary sections sit visually behind Today. */
body.bpf-hub-polished[data-bpf-hub-id="japanese-walking"] .details,
body.bpf-hub-polished[data-bpf-hub-id="breath-protocol"] details{box-shadow:none}
body.bpf-hub-polished[data-bpf-hub-id="strong-for-life"] .seclbl,
body.bpf-hub-polished[data-bpf-hub-id="japanese-walking"] .section,
body.bpf-hub-polished[data-bpf-hub-id="breath-protocol"] .seclbl{margin-top:28px}

@media(max-width:760px){
  .bpf-hub-guide--compact{padding:18px 16px}
  .bpf-hub-guide--compact .bpf-hub-guide__layout{grid-template-columns:1fr}
}


/* v51.15.0 — legacy directory no longer competes with Today. */
.bpf-hub-more-options{
  width:min(1120px,calc(100% - 28px));margin:20px auto 30px;border:1px solid var(--hub-line);border-radius:20px;
  background:color-mix(in srgb,var(--hub-canvas) 88%,#fff);box-shadow:0 5px 16px rgba(7,29,43,.045);overflow:hidden;
}
.bpf-hub-more-options>summary{
  min-height:62px!important;padding:14px 18px;display:flex!important;align-items:center;justify-content:space-between;gap:16px;
  color:var(--hub-ink);font:850 16px/1.25 system-ui,-apple-system,sans-serif;list-style:none;cursor:pointer;
}
.bpf-hub-more-options>summary::-webkit-details-marker{display:none}
.bpf-hub-more-options>summary span::after{content:'  +';color:var(--hub-accent);font-weight:900}
.bpf-hub-more-options[open]>summary span::after{content:'  –'}
.bpf-hub-more-options>summary small{color:var(--hub-muted);font-size:12px;font-weight:700;text-align:right}
.bpf-hub-more-options__content{padding:4px 16px 18px}
.bpf-hub-more-options__content>:first-child{margin-top:8px!important}
.bpf-hub-more-options__content :is(.tile,.card,.tool,.cm-grid,.grid,.quick){box-shadow:none!important}
.bpf-hub-more-options__content :is(.tile,.tool,.session,.workout-card,.lev){opacity:.92}

/* Keep today and safety visually stronger than secondary directories. */
body.bpf-hub-polished :is(#startCard,#continueCard,#programArea,#todayCard,.safety){position:relative;z-index:1}
body.bpf-hub-polished[data-bpf-hub-id="strong-for-life"] .bpf-hub-guide__button--primary,
body.bpf-hub-polished[data-bpf-hub-id="japanese-walking"] .bpf-hub-guide__button--primary,
body.bpf-hub-polished[data-bpf-hub-id="breath-protocol"] .bpf-hub-guide__button--primary{min-height:62px;font-size:16px}

@media(max-width:760px){
  .bpf-hub-more-options{width:calc(100% - 20px);margin:14px auto 24px;border-radius:17px}
  .bpf-hub-more-options>summary{min-height:58px!important;padding:13px 14px;align-items:flex-start;flex-direction:column;gap:3px}
  .bpf-hub-more-options>summary small{text-align:left}
  .bpf-hub-more-options__content{padding:2px 10px 14px}
}
