/* ============================================================
   100 STRONG - Design System  (mockup stylesheet)
   Reskinned to the official Brand kit:
   Palette: deep navy / charcoal navy / steel blue / line blue / slate / silver / white.
   Type: Montserrat (display) + Inter (body). No script (per brand).
   NOTE: legacy variable names (--pine-*, --clay-*, --amber-*, --cream*) are
   intentionally KEPT but REMAPPED to brand colors, so existing markup/inline
   styles inherit the brand automatically.
   ============================================================ */

:root {
  /* Brand palette (canonical) */
  --navy: #071122;          /* Deep Navy - wordmark, headings, primary buttons */
  --charcoal: #1C2C3D;      /* Charcoal Navy - dark surfaces, secondary text */
  --steel: #5A7791;         /* Steel Blue - links, accents, secondary buttons */
  --line-blue: #1B496E;     /* Line Blue - rules, hovers, understated highlights */
  --slate: #525A64;         /* Slate Gray - body text, captions */
  --silver: #D0D4D8;        /* Silver Gray - borders, light panels */
  --white: #ffffff;

  /* ---- Legacy tokens remapped to brand (do not "fix" - this is the bridge) ---- */
  --pine-900: #071122;      /* deepest / headings  -> Deep Navy */
  --pine-800: #1C2C3D;      /* dark surfaces (hero/footer/cta/sidebar) -> Charcoal */
  --pine-700: #5A7791;      /* links/accents/badges/.btn-pine -> Steel Blue */
  --pine-600: #5A7791;      /* progress fills -> Steel Blue */
  --pine-500: #5A7791;
  --clay-600: #1C2C3D;      /* primary CTA hover -> Charcoal */
  --clay-500: #071122;      /* primary attention CTA (.btn-clay) -> Deep Navy */
  --amber-500: #1B496E;     /* deep accent -> Line Blue */
  --amber-400: #8aa6bd;     /* light accent (hero highlight on dark) -> light steel */
  --cream: #f5f7f9;         /* page alt background -> very light silver tint */
  --cream-2: #e7ecf0;       /* slightly darker light panel */
  --paper: #ffffff;         /* cards / primary surface */
  --ink: #1C2C3D;           /* main text -> Charcoal Navy */
  --ink-soft: #525A64;      /* muted text -> Slate Gray */
  --line: #D0D4D8;          /* borders -> Silver Gray */
  --clay: #c2410c;          /* warm accent (progress fills, unread dots, highlights) */

  /* Type */
  --display: "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --script: "Montserrat", sans-serif; /* brand: no script fonts */

  /* Shape */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Shadow (navy-tinted) */
  --sh-sm: 0 1px 2px rgba(7,17,34,.06), 0 4px 12px rgba(7,17,34,.05);
  --sh-md: 0 6px 18px rgba(7,17,34,.08), 0 18px 40px rgba(7,17,34,.08);
  --sh-lg: 0 12px 30px rgba(7,17,34,.12), 0 30px 70px rgba(7,17,34,.14);

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--slate);
  background: var(--white);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .4em;
  color: var(--navy);
}

/* Even vertical rhythm between packet sections (headings have no top margin by default,
   so spacing would otherwise depend on whatever element precedes each header). */
.report-page h3 { margin-top: 1.9rem; }
.report-page h3:first-of-type { margin-top: .6rem; }
.report-page h4 { margin-top: 1.25rem; }

/* Fluid display scale */
.d1 { font-size: clamp(2.4rem, 5.2vw, 3.9rem); font-weight: 800; letter-spacing: -0.02em; }
.d2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; }
.d3 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-weight: 600; }

p { margin: 0 0 1.1rem; }
a { color: var(--steel); text-decoration: none; }
a:hover { color: var(--line-blue); }
img { max-width: 100%; display: block; }

/* Brand kept its meaning but is no longer cursive: steel-blue emphasis */
.script { font-family: var(--display); font-weight: 700; color: var(--steel); font-style: normal; letter-spacing: -0.01em; }
.serif-italic { font-style: italic; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 700;
  color: var(--steel); margin: 0 0 1rem; display: inline-flex; align-items: center; gap: .55rem;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--steel); display: inline-block; }

.lead { font-size: 1.2rem; color: var(--slate); line-height: 1.55; }
.muted { color: var(--ink-soft); }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 28px; }
.section { padding: 92px 0; }
.section-sm { padding: 60px 0; }
.bg-cream { background: var(--cream); }
.bg-paper { background: var(--white); }
.bg-pine { background: var(--navy); color: #cfd8e2; }
.bg-pine h1, .bg-pine h2, .bg-pine h3 { color: #fff; }

/* ---------- Brand logo ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { height: 38px; width: auto; display: block; }
.brand-logo-sm { height: 30px; }
/* legacy text-wordmark fallbacks (if any page still uses them) */
.brand .mark { display: none; }
.brand .wordmark { font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--navy); letter-spacing: -.02em; }

/* ---------- Top navigation ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 2rem; height: 74px; }
.nav-links { display: flex; align-items: center; gap: 1.2rem; margin-left: auto; flex-wrap: nowrap; }
.nav-links a { color: var(--charcoal); font-weight: 600; font-size: .9rem; font-family: var(--sans); white-space: nowrap; }
.nav-links a:hover { color: var(--steel); }
.nav-cta { display: flex; align-items: center; gap: 1.5rem; margin-left: .75rem; padding-left: 1.25rem; border-left: 1px solid var(--line); }
.nav-cta a.muted { color: var(--charcoal); }
.nav-cta a.muted:hover { color: var(--steel); }

/* Mobile menu toggles + drawer backdrop (hidden on desktop, shown in the <=960px media query) */
.nav-toggle, .menu-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; flex: 0 0 auto; }
.nav-toggle { margin-left: auto; }
.nav-toggle svg, .menu-toggle svg { width: 22px; height: 22px; }
.drawer-backdrop { display: none; }
.nav-backdrop { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; padding: 80px 0 92px; }
.hero-photo { position: relative; }
.hero-photo .img { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-lg); aspect-ratio: 4/5; background-size: cover; background-position: center; }
.blob { position: absolute; border-radius: 46% 54% 60% 40% / 52% 44% 56% 48%; filter: blur(2px); opacity: .14; z-index: 0; }

/* Floating stat card */
.float-card { position: absolute; background: var(--white); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 1.1rem 1.3rem; display: flex; gap: .9rem; align-items: center; border: 1px solid var(--line); }
.float-card .big { font-family: var(--display); font-weight: 800; font-size: 2rem; color: var(--navy); line-height: 1; }
.float-card .lbl { font-size: .82rem; color: var(--ink-soft); font-weight: 600; max-width: 130px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: .98rem; padding: .85rem 1.5rem; border-radius: var(--r-sm); border: 1.5px solid transparent; cursor: pointer; transition: .16s ease; text-decoration: none; line-height: 1; }
.btn:hover { transform: translateY(-1px); }
.btn-clay { background: var(--navy); color: #fff; }                 /* primary CTA = deep navy */
.btn-clay:hover { background: var(--charcoal); color: #fff; }
.btn-pine { background: var(--steel); color: #fff; }               /* secondary = steel blue */
.btn-pine:hover { background: var(--line-blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--silver); }
.btn-ghost:hover { background: var(--cream); border-color: var(--steel); }
.btn-light { background: #fff; color: var(--navy); box-shadow: var(--sh-sm); border-color: var(--line); }
.btn-light:hover { background: var(--cream); }
.btn-on-dark-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-on-dark-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.02rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stat .num { font-family: var(--display); font-weight: 800; font-size: clamp(2.1rem,3.2vw,2.9rem); color: #fff; line-height: 1; }
.stat .cap { font-weight: 500; color: #aebccb; margin-top: .4rem; font-size: .95rem; }

/* ---------- Phase (editorial numerals) ---------- */
.phase-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 2rem; align-items: start; padding: 2.2rem 0; border-top: 1px solid var(--line); }
.phase-row:last-child { border-bottom: 1px solid var(--line); }
.phase-num { font-family: var(--display); font-weight: 800; font-size: 4.2rem; line-height: .8; color: var(--silver); }
.phase-row:hover .phase-num { color: var(--steel); transition: .25s; }
.phase-meta .tf { font-weight: 700; color: var(--steel); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.phase-meta h3 { font-size: 1.6rem; margin: .25rem 0 .3rem; }
.phase-link { align-self: center; color: var(--steel); font-weight: 700; white-space: nowrap; }
.phase-link:hover { color: var(--line-blue); }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--sh-sm); transition: .2s; }
.card.lift:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.icon-badge { width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; background: var(--navy); color: #fff; margin-bottom: 1.1rem; }
.icon-badge.clay { background: var(--steel); }
.icon-badge.amber { background: var(--line-blue); color: #fff; }
.icon-badge svg { width: 25px; height: 25px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 26px; }

/* ---------- Testimonial ---------- */
.quote { font-family: var(--display); font-weight: 600; font-size: clamp(1.4rem,2.4vw,2rem); line-height: 1.3; color: var(--navy); }
.quote-attr { margin-top: 1.4rem; font-family: var(--sans); font-weight: 700; color: var(--steel); font-size: 1rem; }
.quote-attr span { display:block; color: var(--ink-soft); font-weight: 500; font-size:.9rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--navy); border-radius: var(--r-xl); padding: 60px; position: relative; overflow: hidden; color:#fff; }
.cta-band h2 { color:#fff; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #9fb0c2; padding: 68px 0 34px; }
.footer h4 { color:#fff; font-family: var(--sans); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing:.12em; margin-bottom: 1.1rem; }
.footer a { color: #9fb0c2; display:block; margin-bottom:.6rem; }
.footer a:hover { color:#fff; }
.footer-grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand-word { font-family: var(--display); font-weight: 800; font-size: 1.3rem; color:#fff; letter-spacing:-.02em; }
.footer-bottom { border-top:1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; display:flex; justify-content:space-between; gap:1rem; font-size:.85rem; color:#73879b; flex-wrap:wrap; }
.footer-bottom a { display:inline; margin:0; color:#9fb0c2; }
.footer-bottom a:hover { color:#fff; }
.footer-bottom .sep { opacity:.5; margin:0 .5rem; }

/* ---------- Pills / tags ---------- */
.pill { display:inline-flex; align-items:center; gap:.4rem; padding:.32rem .8rem; border-radius: var(--r-pill); font-size:.8rem; font-weight:700; }
.pill-cream { background: var(--cream-2); color: var(--charcoal); }
.pill-clay { background: rgba(27,73,110,.12); color: var(--line-blue); }
.pill-pine { background: rgba(90,119,145,.16); color: var(--line-blue); }

/* ---------- Progress ---------- */
.bar { background: var(--cream-2); border-radius: var(--r-pill); height: 10px; overflow: hidden; }
.bar > i { display:block; height:100%; background: var(--steel); border-radius: var(--r-pill); }
.bar.lg { height: 16px; }
.tag { color: var(--steel); font-weight: 700; }

/* ============================================================
   APP SHELL (dashboard) - deep-navy sidebar, white workspace
   ============================================================ */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: #b9c6d4; padding: 16px 12px; position: sticky; top:0; height:100vh; display:flex; flex-direction:column; overflow-y:auto; }
.side .brand { padding: 2px 4px 12px; display: block; }
/* logo sits on a white chip so the navy mark stays legible on the dark rail */
.side .brand-chip { background:#fff; border-radius: 10px; padding: 10px 14px; display:flex; width: 100%; box-sizing: border-box; }
.side .brand-chip .brand-logo { width: 100%; height: auto; }
.side .brand .wordmark { color:#fff; }
.side-group { margin-top: .85rem; }
.side-group .label { font-size:.62rem; text-transform:uppercase; letter-spacing:.12em; color:#6f8499; padding:0 10px; margin-bottom:.3rem; }
.side-link { display:flex; align-items:center; gap:.6rem; padding:.4rem 10px; border-radius: 8px; color:#b9c6d4; font-weight:500; font-size:.84rem; margin-bottom:.05rem; }
.side-link svg { width:16px; height:16px; opacity:.8; }
.side-link:hover { background: rgba(255,255,255,.06); color:#fff; }
.side-link.active { background: var(--steel); color:#fff; }
/* Pin the outreach card to the bottom of the rail even when the nav list scrolls. The gradient
   lets links fade into the navy as they scroll underneath; the bottom padding keeps a clean gap. */
.side-foot { position: sticky; bottom: 0; margin-top: auto; padding: 1.6rem 0 10px; background: linear-gradient(to top, var(--navy) 80%, rgba(7,17,34,0)); }
.side-card { background: rgba(255,255,255,.07); border-radius: var(--r-md); padding: 1rem; font-size:.85rem; }

/* sleek sidebar scrollbar */
.side { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; }
.side::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.34); }

/* topbar quick-search */
.search-wrap { position: relative; flex: 1; max-width: 380px; }
.search-wrap .search { width: 100%; max-width: none; }
.search input { border: none; background: transparent; outline: none; flex: 1; min-width: 0; font-size: .92rem; color: var(--charcoal); }
.search input::placeholder { color: var(--ink-soft, #7e8a99); }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-md); overflow: hidden; z-index: 40; }
.search-results a { display: block; padding: .58rem 1rem; color: var(--charcoal); font-size: .92rem; text-decoration: none; }
.search-results a:hover { background: var(--cream); }

/* ===== "Get Strong" lesson deck ===== */
.lesson-overlay { position: fixed; inset: 0; background: rgba(7,17,34,.74); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: clamp(8px,2vw,28px); }
.lesson-modal { width: 100%; max-width: 980px; position: relative; }
.lesson-close { position: absolute; top: 12px; right: 14px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); width: 38px; height: 38px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; z-index: 4; }
.lesson-stage { aspect-ratio: 16/9; width: 100%; position: relative; container-type: size; border-radius: 12px; overflow: hidden; box-shadow: 0 28px 70px -28px rgba(0,0,0,.7); background: #f6f4ef; }
.lesson-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease; display: flex; flex-direction: column; justify-content: center; padding: 9cqh 9cqh; background: #f6f4ef; color: var(--charcoal); }
.lesson-slide.is-active { opacity: 1; visibility: visible; }
.lesson-slide.dark { background: var(--navy); color: #eef2f6; }
.lesson-slide::after { content:""; position:absolute; left:0; right:0; bottom:0; height:1.4cqh; background: var(--steel); }
.lesson-slide.dark::after { background: linear-gradient(90deg, var(--line-blue), var(--steel)); }
.lesson-eyebrow { font-family: var(--display); font-size: 2.6cqh; letter-spacing: .26em; text-transform: uppercase; font-weight: 700; color: var(--steel); margin-bottom: 3cqh; }
.lesson-slide.dark .lesson-eyebrow { color: var(--silver); }
.lesson-slide h1 { font-family: var(--display); font-weight: 800; font-size: 10cqh; line-height: 1.04; margin: 0 0 3cqh; }
.lesson-slide h2 { font-family: var(--display); font-weight: 700; font-size: 7.4cqh; line-height: 1.07; margin: 0; max-width: 92%; }
.lesson-lede { font-size: 3.4cqh; line-height: 1.5; color: var(--slate); max-width: 82%; }
.lesson-slide.dark .lesson-lede { color: var(--silver); }
.lesson-head { display: flex; align-items: flex-start; gap: 4cqh; margin-bottom: 4.5cqh; }
.lesson-seal { width: 13cqh; height: 13cqh; flex: none; border-radius: 50%; border: .8cqh solid var(--steel); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 5.6cqh; color: var(--navy); }
.lesson-kicker { font-size: 2.4cqh; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; color: var(--slate); margin-bottom: 1.4cqh; }
.lesson-body-copy { font-size: 3.4cqh; line-height: 1.5; color: var(--charcoal); max-width: 86%; }
.lesson-note { font-size: 2.7cqh; line-height: 1.5; color: var(--slate); margin-top: 3.5cqh; padding-left: 2.4cqh; border-left: .6cqh solid var(--steel); max-width: 86%; }
.lesson-slide.dark .lesson-note { color: var(--silver); }
ul.lesson-steps { list-style: none; margin: 1cqh 0 0; padding: 0; }
ul.lesson-steps li { font-size: 3.1cqh; line-height: 1.45; color: var(--charcoal); padding: 1.5cqh 0; border-bottom: 1px solid var(--line); display: flex; gap: 2.4cqh; align-items: baseline; }
ul.lesson-steps li:last-child { border-bottom: none; }
ul.lesson-steps li .ix { font-family: var(--display); color: var(--steel); font-weight: 800; width: 4cqh; flex: none; text-transform: uppercase; }
.lesson-scripture { margin-top: 3.5cqh; font-family: var(--display); font-size: 3.8cqh; line-height: 1.32; color: #fff; font-style: italic; max-width: 82%; }
.lesson-scripture .ref { display: block; font-style: normal; font-size: 2.3cqh; letter-spacing: .1em; text-transform: uppercase; color: var(--silver); margin-top: 1.6cqh; font-family: var(--body); }
.lesson-play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 3; background: rgba(7,17,34,.25); }
.lesson-play button { background: var(--steel); color: #fff; border: none; padding: 1.6cqh 4cqh; border-radius: 999px; font-size: 3cqh; font-weight: 700; cursor: pointer; display: inline-flex; gap: 1.2cqh; align-items: center; box-shadow: 0 12px 30px -10px rgba(0,0,0,.55); }
.lesson-controls { display: flex; align-items: center; gap: 12px; padding: 14px 4px 2px; color: #fff; }
.lesson-controls .pbar { flex: 1; height: 3px; background: rgba(255,255,255,.18); border-radius: 2px; overflow: hidden; }
.lesson-controls .pbar i { display: block; height: 100%; background: var(--steel); transition: width .4s ease; }
.lesson-nav { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); width: 40px; height: 40px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.lesson-nav:disabled { opacity: .3; cursor: default; }
.lesson-counter { font-size: 13px; letter-spacing: .12em; color: var(--silver); min-width: 54px; text-align: right; }
/* Lesson slide imagery */
.lesson-figure { position: absolute; top: 0; right: 0; bottom: 0; width: 40cqw; margin: 0; overflow: hidden; }
.lesson-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lesson-figure::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #f6f4ef 0%, rgba(246,244,239,0) 24%); pointer-events: none; }
.lesson-slide.has-img:not(.dark) { padding-right: 46cqw; }
.lesson-bg { position: absolute; inset: 0; z-index: 0; }
.lesson-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lesson-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(7,17,34,.94) 0%, rgba(7,17,34,.88) 60%, rgba(7,17,34,.82) 100%); }
.lesson-slide.dark.has-img > :not(.lesson-bg):not(.lesson-credit) { position: relative; z-index: 1; }
/* On the photo slides, force every text element to high-contrast light so nothing reads dark-on-dark. */
.lesson-slide.dark.has-img h1,
.lesson-slide.dark.has-img h2,
.lesson-slide.dark.has-img .lesson-lede,
.lesson-slide.dark.has-img .lesson-scripture,
.lesson-slide.dark.has-img .lesson-scripture .ref,
.lesson-slide.dark.has-img .lesson-prayer { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.55); }
.lesson-slide.dark.has-img .lesson-eyebrow,
.lesson-slide.dark.has-img .lesson-prayer .pray-label { color: #d4dded; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.lesson-prayer { margin-top: 3cqh; font-size: 3cqh; line-height: 1.5; color: var(--silver); max-width: 80%; font-style: italic; }
.lesson-prayer .pray-label { display: block; font-family: var(--display); font-size: 2.2cqh; letter-spacing: .2em; text-transform: uppercase; color: var(--steel); margin-bottom: 1.2cqh; font-style: normal; }
/* Closing slide carries the most text (verse + prayer): anchor to top, allow scroll, scale down so nothing is clipped. */
.lesson-slide.close { justify-content: flex-start; overflow-y: auto; padding-top: 6cqh; padding-bottom: 5cqh; }
.lesson-slide.close h2 { font-size: 5.6cqh; }
.lesson-slide.close .lesson-eyebrow { margin-bottom: 1.8cqh; }
.lesson-slide.close .lesson-lede { font-size: 2.8cqh; margin-top: 1.4cqh; }
.lesson-slide.close .lesson-scripture { font-size: 3cqh; margin-top: 2.2cqh; }
.lesson-slide.close .lesson-prayer { font-size: 2.4cqh; margin-top: 2cqh; line-height: 1.45; }
/* Attribution as a small, unobtrusive pill chip in the bottom-right that reads cleanly on any photo. */
.lesson-credit { position: absolute; right: 2.2cqh; bottom: 2.6cqh; z-index: 2; font-size: 1.7cqh; letter-spacing: .02em; line-height: 1; color: rgba(255,255,255,.72); background: rgba(7,17,34,.45); padding: .7cqh 1.5cqh; border-radius: 999px; backdrop-filter: blur(2px); }
.lesson-credit a { color: rgba(255,255,255,.95); text-decoration: none; }
.lesson-credit a:hover { text-decoration: underline; }
/* On step slides the chip sits in the corner of the side photo. */
.lesson-figure .lesson-credit { right: 1.4cqh; bottom: 1.4cqh; }

.main { background: var(--cream); min-width: 0; }
.topbar { display:flex; align-items:center; gap:1rem; padding: 18px 34px; border-bottom:1px solid var(--line); background: rgba(255,255,255,.8); backdrop-filter: blur(8px); position: sticky; top:0; z-index: 20; }
.topbar .search { flex:1; max-width: 360px; background:var(--white); border:1px solid var(--line); border-radius: var(--r-pill); padding:.55rem 1rem; color:var(--ink-soft); display:flex; gap:.6rem; align-items:center; }
.avatar { width:40px; height:40px; border-radius:50%; background: var(--steel); color:#fff; display:grid; place-items:center; font-weight:700; font-family:var(--display); }
.page { padding: 34px; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }

.grid-app { display:grid; grid-template-columns: 2fr 1fr; gap: 24px; }
.tile { background: var(--white); border:1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--sh-sm); }
.tile h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; }

/* Progress ring */
.ring { --val: 64; --c: var(--steel); width: 120px; height: 120px; border-radius:50%; background: conic-gradient(var(--c) calc(var(--val)*1%), var(--cream-2) 0); display:grid; place-items:center; }
.ring .inner { width: 88px; height:88px; background: var(--white); border-radius:50%; display:grid; place-items:center; text-align:center; }
.ring .inner b { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--navy); line-height:1; }
.ring .inner small { font-size:.7rem; color: var(--ink-soft); font-weight:700; text-transform:uppercase; letter-spacing:.08em; }

/* Checklist */
.check { display:flex; gap:.9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom:none; }
.check .box { width:24px; height:24px; border-radius:6px; border:2px solid var(--silver); flex:0 0 auto; margin-top:2px; display:grid; place-items:center; }
.check.done .box { background: var(--steel); border-color: var(--steel); color:#fff; }
.check.done .t { text-decoration: line-through; color: var(--ink-soft); }
.check .t { font-weight:700; color: var(--charcoal); }
.check .d { color: var(--ink-soft); font-size:.92rem; }

/* Phase accordion */
.acc-head { display:flex; align-items:center; gap:1rem; padding: 1.1rem 1.4rem; }
.acc-num { width:40px; height:40px; border-radius:10px; display:grid; place-items:center; color:#fff; font-family:var(--display); font-weight:800; }

/* Likert */
.likert { display:flex; gap:.5rem; }
.likert label { flex:1; text-align:center; border:1.5px solid var(--line); border-radius:9px; padding:.7rem .4rem; font-weight:700; color:var(--ink-soft); cursor:pointer; background:var(--white); }
.likert label.sel { background: var(--steel); color:#fff; border-color: var(--steel); }

/* Utility */
.flex { display:flex; } .items-center { align-items:center; } .between { justify-content: space-between; }
.gap-sm { gap:.6rem; } .gap { gap:1rem; } .gap-lg { gap:1.6rem; }
.mt-0{margin-top:0}.mb-0{margin-bottom:0}.mt-1{margin-top:.6rem}.mt-2{margin-top:1.2rem}.mt-3{margin-top:2rem}
.text-center{text-align:center}.wrap{flex-wrap:wrap}
.hs-phase-badge, .phase-badge { display:inline-flex; align-items:center; justify-content:center; }
.tag-note { background: var(--cream); border-left: 3px solid var(--steel); padding: .9rem 1.1rem; border-radius: 0 8px 8px 0; font-size:.95rem; color: var(--charcoal); }
.hs-metric-list { list-style: none; padding: 0; margin: 0; }
.hs-metric-list li { padding: .35rem 0 .35rem 1.5rem; position: relative; }
.hs-metric-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--steel); font-weight: 800; }
.duo { position: relative; }
.duo::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(7,17,34,.12), rgba(7,17,34,.5)); mix-blend-mode: multiply; }

/* The public top nav collapses to a hamburger drawer earlier than the page grids, so a long signed-in /
   admin menu never wraps onto a second row. */
@media (max-width: 1120px) {
  .nav-toggle { display: inline-flex; }
  /* A backdrop-filter on .nav would make it the containing block for the fixed drawer; drop it so the
     drawer anchors to the full viewport. */
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: 286px; max-width: 84vw; margin: 0;
    flex-direction: column; align-items: stretch; gap: .1rem; background: #fff; overflow-y: auto;
    padding: 4.6rem 1.4rem 1.6rem; transform: translateX(100%); transition: transform .25s ease;
    z-index: 1200; box-shadow: -2px 0 30px rgba(7,17,34,.22);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links > a, .nav-links .nav-link-item { padding: .75rem .2rem; font-size: 1.05rem; white-space: normal; border-bottom: 1px solid var(--line); }
  .nav-cta { flex-direction: column; align-items: stretch; gap: .7rem; margin: .9rem 0 0; padding: .9rem 0 0; border-left: none; border-top: 1px solid var(--line); }
  .nav-cta a.btn { text-align: center; }
  body.nav-open .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(7,17,34,.5); z-index: 1100; }
}

@media (max-width: 960px) {
  .hero-grid, .grid-3, .grid-2, .grid-app, .footer-grid, .stats { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 30px; }
  .phase-row { grid-template-columns: 64px 1fr; }
  .phase-link { grid-column: 2; }
  .app { grid-template-columns: 1fr; }

  /* ---------- App sidebar drawer (the public top nav collapses earlier, at 1120px - see above) ---------- */
  .menu-toggle { display: inline-flex; }
  .drawer-backdrop { display: block; position: fixed; inset: 0; background: rgba(7,17,34,.5); z-index: 1100; }

  /* App sidebar: slide in from the left. Animate `left` (not transform) so a transform doesn't
     become the containing block for fixed-position modals rendered inside the drawer. */
  .side {
    display: flex; position: fixed; top: 0; left: -320px; bottom: 0; height: 100%; width: 280px; max-width: 84vw;
    transition: left .25s ease; z-index: 1200; box-shadow: 2px 0 30px rgba(7,17,34,.35);
  }
  .side.open { left: 0; }
}

/* ===================== App: Blazor + Identity essentials ===================== */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--steel); }
.invalid { outline: 1px solid #c0392b; }
.validation-message { color: #c0392b; font-size: .9rem; }
.darker-border-checkbox.form-check-input { border-color: var(--silver); }
h1:focus { outline: none; }

#blazor-error-ui {
  color-scheme: light only; background: #fff7d6; bottom: 0; box-shadow: 0 -1px 2px rgba(7,17,34,.2);
  box-sizing: border-box; display: none; left: 0; padding: .8rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .6rem; }
.blazor-error-boundary { background: #c0392b; padding: 1rem; color: #fff; border-radius: 8px; }
.blazor-error-boundary::after { content: "An error has occurred."; }

/* Legal / long-form content pages */
.legal { color: var(--slate); }
.legal h2 { font-size: 1.3rem; margin: 2.2rem 0 .6rem; color: var(--navy); }
.legal h3 { font-size: 1.05rem; margin: 1.4rem 0 .4rem; color: var(--charcoal); }
.legal p, .legal li { color: var(--slate); line-height: 1.7; }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal .updated { color: var(--ink-soft); font-size: .9rem; }
.legal a { font-weight: 600; }

/* Auth/Identity pages: a WIDE two-panel layout - brand panel + form card */
.hs-auth-wrap { max-width: 940px; margin: 0 auto; padding: 0 1.25rem; }
.hs-auth-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 0; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-lg); border: 1px solid var(--line); background: var(--white); }
/* left brand panel */
.hs-auth-aside { background: linear-gradient(160deg, var(--charcoal), var(--navy)); color: #cfd8e2; padding: 2.75rem 2.5rem; display: flex; flex-direction: column; justify-content: flex-start; }
.hs-auth-aside a { display: block; }
.hs-auth-aside .brand-logo { width: 100%; height: auto; display: block; background: #fff; border-radius: 10px; padding: 14px 18px; box-sizing: border-box; }
.hs-auth-aside h2 { color: #fff; font-size: 1.6rem; margin: 1.6rem 0 .6rem; }
.hs-auth-aside p { color: #aebccb; margin: 0; }
.hs-auth-aside ul { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.hs-auth-aside li { color: #dde6ee; padding: .45rem 0 .45rem 1.7rem; position: relative; font-size: .96rem; }
.hs-auth-aside li::before { content: "\2713"; position: absolute; left: 0; color: var(--steel); font-weight: 800; }
/* Tidy footer links under the auth form. */
.hs-auth-card .auth-links { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .65rem; }
.hs-auth-card .auth-links a { color: var(--steel); text-decoration: none; font-size: .92rem; font-weight: 600; width: fit-content; }
.hs-auth-card .auth-links a:hover { text-decoration: underline; }
/* right form card */
.hs-auth-card { padding: 2.75rem 2.75rem 2.5rem; }
.hs-auth-card h1 { font-size: 1.7rem; margin-bottom: .3rem; }
.hs-auth-card h2 { font-size: 1rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 1.1rem; }
.hs-auth-card hr { border: none; border-top: 1px solid var(--line); margin: 1.25rem 0; }
/* collapse the scaffold's Bootstrap grid so the form fills the card */
.hs-auth-card .row { display: block; margin: 0; }
.hs-auth-card [class*="col-"] { width: 100%; max-width: 100%; flex: none; padding: 0; }
.hs-auth-card .form-floating { margin-bottom: 1rem; }
.hs-auth-card .btn-lg, .hs-auth-card button[type=submit] { width: 100%; }
/* Lighter resting floating-label text (the visible "placeholder") on all sign-in + registration
   forms. Do NOT colour ::placeholder here: form-floating keeps it transparent, and overriding that
   makes the real placeholder reappear on top of the label (double text). */
.hs-auth-card .form-floating > label { color: #aab4bf; }
@media (max-width: 760px) {
  .hs-auth-grid { grid-template-columns: 1fr; }
  .hs-auth-aside { display: none; }
  .hs-auth-card { padding: 2rem 1.6rem 2.25rem; }
}

/* Brand the Bootstrap primary button used across Identity pages */
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; font-family: var(--display); font-weight: 700; border-radius: var(--r-sm); }
.btn-primary:hover, .btn-primary:focus { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
a.btn-clay, a.btn-pine { color: #fff; }

/* Growth Audit red/yellow/green */
.ryg { display:flex; gap:.5rem; }
.ryg-btn { flex:1; padding:.55rem; border:1.5px solid var(--line); border-radius:9px; background:#fff; font-weight:700; color:var(--ink-soft); cursor:pointer; transition:.12s; }
.ryg-btn:hover { border-color:var(--steel); }
.ryg-btn.sel.red { background:#c0392b; color:#fff; border-color:#c0392b; }
.ryg-btn.sel.yellow { background:#b7791f; color:#fff; border-color:#b7791f; }
.ryg-btn.sel.green { background:#1d5a4c; color:#fff; border-color:#1d5a4c; }

/* Admin sub-navigation + blog body */
.admin-subnav { display:flex; gap:.4rem; flex-wrap:wrap; border-bottom:1px solid var(--line); margin-bottom:1.8rem; }
.admin-subnav a { padding:.6rem .9rem; font-weight:700; color:var(--ink-soft); border-bottom:2px solid transparent; margin-bottom:-1px; text-decoration:none; }
.admin-subnav a:hover { color:var(--navy); }
.admin-subnav a.active { color:var(--navy); border-bottom-color:var(--steel); }
.admin-table { width:100%; border-collapse:collapse; }
.admin-table th { text-align:left; font-size:.74rem; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-soft); padding:.6rem .5rem; border-bottom:1px solid var(--line); }
.admin-table td { padding:.75rem .5rem; border-bottom:1px solid var(--line); vertical-align:middle; }
.status-dot { display:inline-block; padding:.2rem .6rem; border-radius:999px; font-size:.74rem; font-weight:700; }
.status-pub { background:rgba(46,125,91,.14); color:#1d5a4c; }
.status-draft { background:var(--cream-2); color:var(--slate); }
.blog-body img { border-radius:var(--r-md); margin:1.2rem 0; }
.blog-body blockquote { border-left:4px solid var(--steel); margin:1.4rem 0; padding:.4rem 1.2rem; color:var(--charcoal); font-style:italic; }
.blog-body h2 { font-size:1.5rem; } .blog-body h3 { font-size:1.2rem; }
.blog-body pre { background:var(--charcoal); color:#e6eef5; padding:1rem; border-radius:var(--r-md); overflow:auto; }
.form-label { display:block; margin-bottom:.3rem; }
.adm-input { width:100%; padding:.6rem .8rem; border:1px solid var(--line); border-radius:8px; font-family:var(--sans); font-size:1rem; }
.adm-input:focus { outline:none; border-color:var(--steel); }

/* Photo credit (Unsplash attribution) + image bands */
.photo-credit { position: absolute; bottom: 8px; right: 10px; font-size: .66rem; color: rgba(255,255,255,.82); background: rgba(7,17,34,.45); padding: 2px 8px; border-radius: 6px; backdrop-filter: blur(2px); z-index: 3; }
.photo-credit a { color: rgba(255,255,255,.92); text-decoration: underline; font-weight: 500; }
.img-band { position: relative; min-height: 360px; display: flex; align-items: center; background-size: cover; background-position: center; overflow: hidden; }
.story-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-md); aspect-ratio: 16/7; background-size: cover; background-position: center; }

/* Dashboard KPI tiles */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; }
.kpi { background: #f6f4ef; border: 1px solid var(--line); border-radius: 10px; padding: .8rem 1rem; }
.kpi .k-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate); }
.kpi .k-value { font-family: var(--display); font-size: 1.7rem; color: var(--navy); line-height: 1.1; margin: .15rem 0; }
.kpi .k-sub { font-size: .78rem; color: var(--slate); }

/* Dashboard app-shell components (ported from the dashboard mockup) */
.topbar .greet { font-family: var(--display); font-size: 1.05rem; color: var(--navy); font-weight: 600; }
.topbar .greet span { display: block; font-size: .8rem; font-weight: 600; color: var(--slate); }
.topbar-right { display: flex; align-items: center; gap: .9rem; margin-left: auto; }

.tile-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.tile-head h3 { margin: 0; }

.overall-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; }
.overall-line .big { font-family: var(--display); font-size: 1.6rem; color: var(--navy); line-height: 1; }

.pnum { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 700; font-size: .92rem; flex: 0 0 auto; }
.prow { display: grid; grid-template-columns: 28px 1fr 46px; gap: .85rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--line); }
.prow:first-of-type { border-top: none; }
.prow .ppct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--slate); font-size: .9rem; }
.prow .pbarwrap .tf { font-size: .72rem; font-weight: 700; color: var(--slate); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; display: block; }

.youin { display: flex; align-items: flex-start; gap: 1rem; }
.youin .badge { width: 64px; height: 64px; border-radius: 16px; color: #fff; display: grid; place-items: center; font-family: var(--display); font-size: 1.7rem; font-weight: 700; box-shadow: var(--sh-sm); flex: 0 0 auto; }

.grid-app.two { grid-template-columns: 1fr 1fr; }
.tile-link { font-weight: 700; color: var(--steel); display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }
.tile-link:hover { color: var(--line-blue); }
.tile-link svg { width: 16px; height: 16px; }

.ring-tile { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.ring-tile .meta .pill { margin-bottom: .5rem; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 1rem; padding: .95rem 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: none; }
.feed .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--cream); color: var(--steel); }
.feed .dot svg { width: 17px; height: 17px; }
.feed .ft { font-weight: 700; line-height: 1.3; color: var(--charcoal); }
.feed .fmeta { color: var(--slate); font-size: .86rem; }
.feed .when { margin-left: auto; color: var(--slate); font-size: .82rem; font-weight: 600; white-space: nowrap; }

/* Authed pages keep their <section>/.container markup but flow flush inside the shell .page */
.page > section { padding: 0 !important; background: transparent !important; }
.page > section > .container { max-width: none; padding: 0; }

/* topbar search hidden on narrow screens to keep the bar tidy */
@media (max-width: 960px) { .topbar .search, .topbar .search-wrap { display: none; } }
@media (max-width: 720px) { .app { grid-template-columns: 1fr; } }

/* ---------- Reusable modal (forms, dialogs) ---------- */
/* Vertically centered; "safe center" falls back to top-align if the form is taller than the
   viewport so the top never gets clipped (overlay scrolls). */
.modal-overlay { position: fixed; inset: 0; background: rgba(7,17,34,.55); z-index: 2000; display: flex; align-items: safe center; justify-content: center; padding: 1.5rem 1.2rem; overflow-y: auto; }
.modal-card { background: #fff; border-radius: 16px; width: 100%; max-width: 640px; padding: 1.6rem 1.6rem 1.4rem; box-shadow: 0 24px 60px rgba(7,17,34,.4); }
.modal-x { background: none; border: none; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--slate); padding: 0 .2rem; }
.modal-x:hover { color: var(--navy); }

/* Milestones list rows (numeral / text / arrow) that stack on small screens. */
.mile-card { display: grid; grid-template-columns: 140px 1fr auto; gap: 1.5rem; align-items: center; margin-bottom: 1.1rem; }
@media (max-width: 600px) { .mile-card { grid-template-columns: 72px 1fr; gap: 1rem; } .mile-card > :last-child { grid-column: 1 / -1; } }

/* ---------- Pastor Joe character imagery ---------- */
.joe-img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: var(--sh-md); }

/* Speech-bubble tip: small round Joe + a one-liner */
.joe-tip { display: flex; align-items: flex-start; gap: .75rem; }
.joe-tip-av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 50% 22%; flex: 0 0 auto; border: 2px solid #fff; box-shadow: var(--sh-sm); }
.joe-tip-bubble { position: relative; background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .9rem; font-size: .92rem; line-height: 1.45; color: var(--charcoal); }
.joe-tip-bubble::before { content: ""; position: absolute; left: -6px; top: 18px; width: 11px; height: 11px; background: var(--cream); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.joe-hero { display: grid; grid-template-columns: 1fr minmax(220px, 300px); gap: 2rem; align-items: center; }
.joe-hero.rev { grid-template-columns: minmax(220px, 300px) 1fr; }
.joe-spot { width: 132px; height: 132px; object-fit: cover; border-radius: 50%; box-shadow: var(--sh-md); flex: 0 0 auto; }
@media (max-width: 760px) {
  .joe-hero, .joe-hero.rev { grid-template-columns: 1fr; }
  .joe-hero .joe-img { max-width: 300px; margin: 0 auto; }
  .joe-hero.rev .joe-img { order: -1; }
}

/* ---------- Account avatar + dropdown ---------- */
.usermenu { position: relative; }
.avatar-btn { background: none; border: none; padding: 0; cursor: pointer; border-radius: 50%; line-height: 0; }
.avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; border: 2px solid var(--silver); }
.usermenu-backdrop { position: fixed; inset: 0; z-index: 2900; }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 232px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(7,17,34,.18); z-index: 3000; padding: .4rem; }
.usermenu-head { padding: .6rem .7rem .75rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; font-weight: 700; color: var(--navy); font-size: .92rem; }
.usermenu-head span { display: block; font-weight: 500; color: var(--slate); font-size: .78rem; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usermenu-item { display: flex; align-items: center; gap: .55rem; width: 100%; text-align: left; padding: .6rem .7rem; border-radius: 8px; background: none; border: none; cursor: pointer; color: var(--charcoal); font-size: .92rem; font-weight: 600; font-family: var(--sans); }
.usermenu-item:hover { background: var(--cream); color: var(--navy); }
.usermenu-item svg { width: 17px; height: 17px; opacity: .8; }

/* ---------- Toggle switch ---------- */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--silver); border-radius: 999px; transition: .2s; cursor: pointer; }
.switch .track::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--steel); }
.switch input:checked + .track::before { transform: translateX(18px); }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.pref-row:first-of-type { border-top: none; }

/* ---------- Profile photo upload ---------- */
.upload-prog { height: 8px; background: var(--cream-2); border-radius: 999px; overflow: hidden; }
.upload-prog > i { display: block; height: 100%; background: var(--steel); border-radius: 999px; transition: width .12s; }
.avatar-lg { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 3px solid var(--silver); display: block; }
.avatar-lg-fallback { width: 92px; height: 92px; border-radius: 50%; background: var(--steel); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 2rem; }

/* ---------- Mobile overflow safety ---------- */
/* Never let a page scroll sideways on a phone (hurts Meta ad landing quality). */
body { overflow-x: hidden; }
@media (max-width: 700px) {
  /* Wide tables scroll horizontally inside their tile instead of stretching the page. */
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .page-head { flex-direction: column; align-items: flex-start; gap: .8rem; }
  /* Tame oversized display headings on small screens. */
  .d2 { font-size: clamp(1.7rem, 7vw, 2.4rem); }
  /* Consistent side gutters on phones so content is never flush against the edge, and trim the big
     desktop section padding. */
  .container, .container-narrow { padding-left: 18px; padding-right: 18px; }
  .page { padding: 18px 16px; }
  .page > section > .container { padding-left: 0; padding-right: 0; }
  .section { padding: 54px 0; }
  .section-sm { padding: 38px 0; }
  .tile { padding: 1.3rem 1.15rem; }

  /* Two-column dashboard tile rows stack (higher specificity than the generic .grid-app rule). */
  .grid-app.two { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }

  /* Declutter the app topbar on phones. */
  .topbar { padding: 12px 14px; gap: .5rem; }
  .topbar .greet { font-size: .95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar .greet span { display: none; }
  .topbar-right { gap: .5rem; margin-left: auto; }
  .topbar-right .pill { display: none; }
}

/* Printable progress report */
@media print {
  .nav, .footer, .app-footer, .no-print, .btn, .side, .topbar { display: none !important; }
  .app { display: block !important; }
  .page { padding: 0 !important; }
  body { background: #fff !important; }
  .report-page { box-shadow: none !important; border: 0 !important; }
  a { color: #000 !important; text-decoration: none !important; }
}
