/* Principles Over People visual refresh — 2026-10-14 */
:root {
  --pop-navy: #153b63;
  --pop-navy-deep: #0b2948;
  --pop-blue: #2d6f9f;
  --pop-red: #b6283d;
  --pop-gold: #c69a47;
  --pop-cream: #f6f1e7;
  --pop-paper: #fffdf8;
  --pop-ink: #182536;
  --pop-muted: #687486;
  --color-surface: #f6f1e7;
  --color-surface-alt: #fbf8f1;
  --color-border: rgba(21, 59, 99, .13);
  --color-brand-50: #edf5fa;
  --color-brand-100: #d7e8f3;
  --color-brand-200: #b9d5e7;
  --color-brand-300: #8fbbd7;
  --color-brand-400: #5c96bd;
  --color-brand-500: #2d6f9f;
  --color-brand-600: #245b84;
  --color-brand-700: #19486d;
  --color-pop-red-50: #fbf0f2;
  --color-pop-red-200: #efc8cf;
}

html { background: var(--pop-cream); }
body.font-body {
  background:
    radial-gradient(circle at 92% 5%, rgba(198,154,71,.10), transparent 25rem),
    linear-gradient(180deg, #faf7f0 0, var(--pop-cream) 42rem) !important;
  color: var(--pop-ink) !important;
  font-family: "DM Sans", Inter, system-ui, sans-serif;
  letter-spacing: -.01em;
}

h1, h2, h3, .pop-display-title {
  font-family: Fraunces, Georgia, serif;
  letter-spacing: -.025em !important;
}

.pop-brand-stripe {
  position: fixed;
  z-index: 70;
  height: 4px;
  background: linear-gradient(90deg, var(--pop-red) 0 34%, var(--pop-gold) 34% 40%, var(--pop-blue) 40% 100%);
}

.pop-app-header {
  background: rgba(255,253,248,.94);
  border-color: rgba(21,59,99,.11);
  backdrop-filter: blur(18px);
}

.pop-app-header__logo { width: 50px; height: 50px; object-fit: contain; }
.pop-app-header__brand::after {
  content: "Principles Over People";
  max-width: 145px;
  color: var(--pop-navy-deep);
  font: 700 15px/1.05 Fraunces, Georgia, serif;
  letter-spacing: -.02em;
}

.pop-header-nav-link {
  position: relative;
  gap: 11px;
  border-radius: 12px;
  color: #536174;
  font-weight: 650;
}
.pop-header-nav-link svg { width: 19px; height: 19px; flex: 0 0 auto; }
.pop-header-nav-link:hover { color: var(--pop-navy); background: rgba(45,111,159,.07); }
.pop-header-nav-link.is-active {
  color: var(--pop-navy-deep);
  background: #eaf2f7;
  box-shadow: inset 3px 0 0 var(--pop-red);
}
.pop-header-nav-link.pop-nav-secondary { font-size: 13px; color: #788395; }
.pop-header-nav-link.pop-nav-secondary:first-of-type { margin-top: 18px; }

.pop-page-main { max-width: 1240px; }

.pop-card {
  background: rgba(255,253,248,.96);
  border: 1px solid rgba(21,59,99,.12);
  border-radius: 20px;
  box-shadow: 0 10px 34px rgba(20,47,75,.07);
}
.pop-card:hover { border-color: rgba(45,111,159,.2); }
.pop-card--accent,
.pop-card--duotone {
  background:
    linear-gradient(135deg, rgba(45,111,159,.065), transparent 52%),
    rgba(255,253,248,.98);
}
.pop-card--section-strong { box-shadow: 0 12px 38px rgba(20,47,75,.085); }
.pop-card--red-accent { border-left-color: var(--pop-red) !important; }
.pop-card--blue-accent { border-left-color: var(--pop-blue) !important; }

.pop-section-label {
  color: var(--pop-red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.pop-chip { border-radius: 999px; }
.pop-chip--status { background: #edf4f8; color: var(--pop-navy); border-color: #d3e3ed; }

.pop-button-primary {
  border-radius: 12px;
  background: linear-gradient(135deg, var(--pop-navy) 0%, #245f90 100%);
  box-shadow: 0 7px 18px rgba(21,59,99,.19);
  font-weight: 750;
}
.pop-button-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(21,59,99,.25); }
.pop-button-outline, .pop-button-subtle {
  border-radius: 12px;
  border-color: rgba(21,59,99,.16);
  background: rgba(255,253,248,.75);
  color: var(--pop-navy);
  font-weight: 700;
}
.pop-progress { overflow: hidden; border-radius: 999px; background: #e5ebee; }
.pop-progress__fill { background: linear-gradient(90deg, var(--pop-red), var(--pop-gold), var(--pop-blue)); }

/* Home */
section[data-page="home"] #home-greeting {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 26px 28px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 18%, rgba(255,255,255,.2), transparent 13rem),
    linear-gradient(125deg, var(--pop-navy-deep), var(--pop-blue));
  box-shadow: 0 18px 45px rgba(11,41,72,.18);
}
section[data-page="home"] #home-greeting::after {
  content: "TODAY";
  position: absolute;
  right: 24px;
  bottom: -16px;
  color: rgba(255,255,255,.065);
  font: 800 78px/1 Fraunces, serif;
  letter-spacing: -.07em;
  pointer-events: none;
}
section[data-page="home"] #home-greeting .pop-avatar { background: #fff; border: 3px solid rgba(255,255,255,.55); }
section[data-page="home"] #home-greeting h1,
section[data-page="home"] #home-greeting p { color: white !important; }
section[data-page="home"] #home-greeting > div:last-child {
  background: rgba(255,255,255,.13) !important;
  border-color: rgba(255,255,255,.22) !important;
}
section[data-page="home"] #home-greeting > div:last-child p { color: white !important; }
section[data-page="home"] #home-battery { border-top: 4px solid var(--pop-gold); }
section[data-page="home"] #home-challenge { background: linear-gradient(145deg, #fffaf2, #fffdf8); }

/* Learning */
section[data-page="learning"] #learn-stats {
  position: relative;
  overflow: hidden;
  padding: 26px 28px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 95% 15%, rgba(198,154,71,.25), transparent 15rem),
    linear-gradient(125deg, var(--pop-navy-deep), var(--pop-navy) 58%, #2d6f9f);
  box-shadow: 0 18px 46px rgba(11,41,72,.2);
}
section[data-page="learning"] #learn-stats::after {
  content: "Learn. Practice. Live.";
  position: absolute;
  right: 24px;
  bottom: 16px;
  color: rgba(255,255,255,.12);
  font: 700 22px/1 Fraunces, serif;
}
section[data-page="learning"] #learn-stats * { color: #fff !important; }
section[data-page="learning"] #learn-stats .pop-progress { background: rgba(255,255,255,.19); }
section[data-page="learning"] #learn-stats .pop-button-primary { background: #fff; color: var(--pop-navy) !important; box-shadow: none; }

#learn-principles > .pop-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  padding: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
#learn-principles button[data-lesson] {
  position: relative;
  min-height: 116px;
  padding: 14px !important;
  border: 1px solid rgba(21,59,99,.12);
  border-radius: 18px;
  background: var(--pop-paper) !important;
  box-shadow: 0 8px 24px rgba(20,47,75,.07);
  overflow: hidden;
}
#learn-principles button[data-lesson]:hover {
  transform: translateY(-2px);
  border-color: rgba(182,40,61,.28);
  box-shadow: 0 14px 30px rgba(20,47,75,.12);
}
#learn-principles button[data-lesson] > div:first-child:not(.pop-principle-art) { display: none; }
#learn-principles button[data-lesson] > .pop-principle-art + div { display: none; }
.pop-principle-art {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  overflow: hidden;
  border: 3px solid #e3c37e;
  border-radius: 17px 17px 17px 5px;
  background: #e8e1d3;
  box-shadow: 0 6px 16px rgba(21,59,99,.16);
}
.pop-principle-art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.pop-principle-art img { width: 100%; height: 100%; object-fit: cover; }
.pop-principle-person {
  display: block;
  margin-top: 3px;
  color: #8d6b2d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .025em;
}
#learn-realities button[data-lesson] {
  min-height: 76px;
  transition: transform .18s ease, background .18s ease;
}
#learn-realities button[data-lesson]:hover { transform: translateX(3px); }
#learn-realities button[data-lesson] > div:first-child {
  width: 42px;
  height: 42px;
  background: var(--pop-navy) !important;
  color: #fff !important;
  border: 3px solid #e3c37e;
}

/* Lesson flow */
section[data-page="lesson"] .pop-card { border-radius: 20px; }
section[data-page="lesson"] iframe { border-radius: 16px; }
section[data-page="lesson"] textarea,
section[data-page="lesson"] input { background: #fffefa; }

/* Community */
section[data-page="community"] > div:first-child > .pop-card:first-child,
section[data-page="community"] .community-hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(198,154,71,.20), transparent 13rem),
    linear-gradient(135deg, #102f51, #245f90);
  color: #fff;
}
section[data-page="community"] > div:first-child > .pop-card:first-child > div > div > .flex > div:first-child h1,
section[data-page="community"] > div:first-child > .pop-card:first-child > div > div > .flex > div:first-child p,
section[data-page="community"] > div:first-child > .pop-card:first-child > div > div > .space-y-2 > p {
  color: #fff !important;
}
section[data-page="community"] > div:first-child > .pop-card:first-child > div > div > .flex > div:first-child p:first-child,
section[data-page="community"] > div:first-child > .pop-card:first-child > div > div > .space-y-2 > p:first-child {
  color: #e7c87f !important;
}
section[data-page="community"] > div:first-child > .pop-card:first-child > div > div > .space-y-2 span {
  color: #fff !important;
}
section[data-page="community"] article.pop-card,
section[data-page="community"] [data-post-id] { border-radius: 20px; }

/* Daily check-in: keep scoring private until the completed result. */
[data-action="checkin-answer"] > div > span:last-child {
  display: none !important;
}
[data-action="checkin-answer"] > div {
  justify-content: flex-start !important;
}
[data-checkin-question] > div:first-child > span:last-child {
  display: none !important;
}

/* Services and directory */
.pop-service-card {
  border-radius: 22px !important;
  background: linear-gradient(145deg, #fffdf8, #f8f3e9) !important;
}
.pop-service-card:before { width: 6px !important; background: linear-gradient(var(--pop-red), var(--pop-gold), var(--pop-blue)) !important; }
.pop-service-icon { background: #eaf2f7 !important; box-shadow: inset 0 0 0 1px rgba(21,59,99,.08); }
section[data-page^="directory"] .pop-card { border-radius: 20px; }

/* Profile and utility screens */
section[data-page^="profile"] > .pop-card:first-of-type,
section[data-page="achievements"] #achieve-points {
  background:
    radial-gradient(circle at 92% 10%, rgba(198,154,71,.2), transparent 12rem),
    linear-gradient(135deg, #fffdf8, #eef4f7);
}

@media (min-width: 1024px) {
  .pop-app-header {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: 248px;
    height: 100vh;
    border-right: 1px solid rgba(21,59,99,.11);
    border-bottom: 0;
    box-shadow: 10px 0 36px rgba(20,47,75,.055);
  }
  .pop-app-header__inner {
    width: 100%;
    height: 100%;
    padding: 30px 20px 22px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .pop-app-header__brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
  .pop-header-nav {
    display: flex !important;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
  }
  .pop-header-nav-link { display: flex; align-items: center; min-height: 46px; padding: 0 14px; }
  .pop-app-header__actions {
    margin-top: 18px;
    padding: 17px 8px 2px;
    border-top: 1px solid rgba(21,59,99,.11);
    justify-content: flex-start;
  }
  .pop-page-main {
    margin-left: 248px;
    padding: 42px 42px 64px;
  }
  .pop-nav-bar { display: none !important; }
  section[data-page="home"],
  section[data-page="learning"],
  section[data-page="community"] { gap: 26px !important; }
}

@media (min-width: 1280px) {
  .pop-page-main { padding-left: 58px; padding-right: 58px; }
}

@media (max-width: 767px) {
  .pop-app-header__brand::after { display: none; }
  .pop-card { border-radius: 17px; box-shadow: 0 7px 24px rgba(20,47,75,.06); }
  section[data-page="home"] #home-greeting { min-height: 126px; padding: 20px; border-radius: 19px; }
  section[data-page="home"] #home-greeting::after { font-size: 52px; right: 14px; }
  #learn-principles > .pop-card { grid-template-columns: 1fr; padding: 0; }
  #learn-principles button[data-lesson] { min-height: 104px; }
  .pop-principle-art { width: 68px; height: 68px; flex-basis: 68px; }
  section[data-page="learning"] #learn-stats { padding: 22px; border-radius: 19px; }
  section[data-page="learning"] #learn-stats::after { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .pop-card, .pop-button-primary, #learn-principles button[data-lesson] { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
}


/* Preserve the complete approved Gandhi portrait rather than cropping facial features. */
.pop-principle-art img.pop-wisdom-portrait { object-fit: contain; object-position: center; }
.pop-social-footer { grid-column: 1 / -1; margin-top: 2rem; padding: 1.5rem; border-top: 1px solid #d9dce3; text-align:center; color:#405164; font-size:.875rem; }
.pop-social-footer nav { display:flex; justify-content:center; gap:1.5rem; margin-top:.75rem; }
.pop-social-footer a { color:#1A25AB; font-weight:700; padding:.5rem; }
.pop-social-footer a:focus-visible { outline:3px solid #D0333A; outline-offset:3px; }
