/* Progressive Partners Intranet — V2 styles.
   Mobile-first. Brand red over navy. Inter system stack.
   Built for 375 / 414 / 768 / 1024 / 1440. */
:root {
  --pp-navy:     #0b2545;
  --pp-navy-2:   #122e58;
  --pp-cobalt:   #1e3a8a;
  --pp-red:      #C8102E;
  --pp-red-dark: #8a0a1f;
  --pp-bg:       #f6f8fc;
  --pp-surface:  #ffffff;
  --pp-line:     #e2e8f0;
  --pp-line-2:   #f1f5f9;
  --pp-text:     #0f172a;
  --pp-muted:    #64748b;
  --pp-ok:       #047857;
  --pp-warn:     #b45309;
  --pp-err:      #b91c1c;
  --pp-info:     #1e40af;
  --pp-shadow:   0 6px 20px rgba(15,23,42,.06);
  --pp-radius:   10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--pp-text);
  background: var(--pp-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--pp-cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--pp-navy); margin: 0 0 .5rem; line-height: 1.25; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p  { margin: 0 0 .8rem; }
.muted { color: var(--pp-muted); font-size: .9rem; }
.small { font-size: .85rem; }
hr { border: 0; border-top: 1px solid var(--pp-line); margin: 1.2rem 0; }
img { max-width: 100%; height: auto; }

/* ------- Mobile-first layout ------- */
.app { display: block; min-height: 100vh; }
.sidebar {
  background: var(--pp-navy);
  color: #fff;
  padding: 0;
  position: sticky; top: 0; z-index: 50;
}
.sidebar .brand {
  display: flex; align-items: center; gap: .65rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.brand-logo {
  height: 38px; width: auto; display: block;
  background: #fff; border-radius: 6px; padding: 2px 6px;
}
.brand-logo-mark { height: 38px; width: 38px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; color: #fff; }
.brand-text strong { font-weight: 700; font-size: .95rem; }
.brand-text span { font-size: .72rem; color: #c7d2e8; letter-spacing: .04em; }

.menu-toggle {
  margin-left: auto;
  background: none; border: 0; color: #fff; font-size: 1.5rem;
  cursor: pointer; padding: .25rem .5rem; line-height: 1;
}
.menu-toggle:focus-visible { outline: 2px solid var(--pp-red); outline-offset: 2px; }

.sidebar nav {
  display: none;
  flex-direction: column; gap: 1px;
  padding: .5rem .5rem 1rem;
}
.sidebar nav.open { display: flex; }
.sidebar nav a {
  color: #d9e1ee;
  padding: .65rem .8rem; border-radius: 6px;
  font-size: .95rem; transition: background .15s;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sidebar nav a.active { background: var(--pp-red); color: #fff; }
.sidebar-section {
  margin: .75rem .8rem .15rem;
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: #94a3b8; font-weight: 600;
}
.sidebar-foot {
  display: none;
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .8rem 1rem; gap: .8rem; align-items: center;
  font-size: .85rem;
}
.sidebar nav.open + .sidebar-foot { display: flex; }
.who-name { font-weight: 600; color: #fff; }
.who-role { color: #94a3b8; font-size: .78rem; }
.logout { color: #c7d2e8; font-size: .85rem; margin-left: auto; }

.content {
  padding: 1.1rem 1rem 2.5rem;
  max-width: 100%;
}

/* ------- Tablet and up — sidebar becomes permanent rail ------- */
@media (min-width: 760px) {
  .app { display: grid; grid-template-columns: 260px 1fr; }
  .sidebar {
    min-height: 100vh; position: sticky; top: 0;
    display: flex; flex-direction: column;
    padding: 0;
  }
  .menu-toggle { display: none; }
  .sidebar nav { display: flex !important; flex: 1; padding: .5rem; }
  .sidebar-foot { display: flex !important; margin-top: auto; }
  .content { padding: 1.5rem 1.8rem 3rem; max-width: 1100px; }
}
@media (min-width: 1024px) {
  .content { padding: 2rem 2.5rem 3rem; }
  h1 { font-size: 1.75rem; }
}

/* ------- Page heads ------- */
.page-head { margin-bottom: 1.4rem; }
.page-head .crumbs { font-size: .8rem; color: var(--pp-muted); margin-bottom: .35rem; }
.page-head .crumbs a { color: var(--pp-muted); }
.page-head .crumbs a:hover { color: var(--pp-cobalt); }

/* ------- Card grids ------- */
.card-grid {
  display: grid; grid-template-columns: 1fr; gap: .9rem;
  margin-bottom: 1.6rem;
}
@media (min-width: 480px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .card-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }

.card {
  background: var(--pp-surface); border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius); padding: 1.05rem 1.1rem;
  display: block; color: var(--pp-text);
  transition: transform .12s, box-shadow .12s;
}
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--pp-shadow); }
.card-icon {
  width: 38px; height: 38px; border-radius: 8px;
  background: linear-gradient(135deg, var(--pp-red) 0%, var(--pp-red-dark) 100%);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .72rem;
  margin-bottom: .6rem; letter-spacing: .03em;
}
.card-icon.alt { background: linear-gradient(135deg, var(--pp-cobalt) 0%, var(--pp-navy) 100%); }
.card h2 { margin: 0 0 .2rem; font-size: 1.02rem; }
.card p { color: var(--pp-muted); margin: 0 0 .7rem; font-size: .88rem; }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }
.pill {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  background: #fde7eb; color: var(--pp-red-dark); font-size: .7rem; font-weight: 600;
}
.pill-ok   { background: #d1fae5; color: var(--pp-ok); }
.pill-warn { background: #fef3c7; color: var(--pp-warn); }
.pill-info { background: #dbeafe; color: var(--pp-info); }
.pill-draft{ background: #f1f5f9; color: var(--pp-muted); }

/* ------- Panels / forms ------- */
.panel {
  background: var(--pp-surface); border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius); padding: 1.1rem 1.2rem;
  margin-bottom: 1.4rem;
}
@media (min-width: 760px) { .panel { padding: 1.3rem 1.5rem; } }
.panel h2 + p { color: var(--pp-muted); }
.panel-split {
  display: grid; grid-template-columns: 1fr; gap: 1.2rem;
}
@media (min-width: 880px) {
  .panel-split { grid-template-columns: 2fr 1fr; }
}

.row-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .8rem; }
.row-form input, .row-form select, .row-form textarea {
  padding: .55rem .7rem; border: 1px solid var(--pp-line); border-radius: 6px;
  font-size: .95rem; flex: 1 1 200px; min-width: 0; font-family: inherit;
}
.row-form textarea { flex-basis: 100%; min-height: 80px; }
.row-form button { flex: 0 0 auto; }
.field { margin-bottom: .8rem; }
.field label { display: block; font-size: .82rem; color: var(--pp-muted); margin-bottom: .25rem; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: .55rem .7rem; border: 1px solid var(--pp-line);
  border-radius: 6px; font-size: .95rem; font-family: inherit; background: #fff;
}
.field textarea { min-height: 90px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr; gap: .8rem; }
@media (min-width: 640px) { .field-row { grid-template-columns: repeat(2, 1fr); } }
.inline-form { display: inline; }
.inline-form select { padding: .3rem .5rem; border-radius: 5px; border: 1px solid var(--pp-line); font-family: inherit; }

button, .btn {
  background: var(--pp-red); color: #fff; border: 0; border-radius: 6px;
  padding: .58rem 1.05rem; font-size: .94rem; font-weight: 500; cursor: pointer;
  display: inline-block; text-decoration: none; font-family: inherit; line-height: 1.3;
}
button:hover, .btn:hover { background: var(--pp-red-dark); text-decoration: none; }
button:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-secondary { background: var(--pp-navy); }
.btn-secondary:hover { background: var(--pp-navy-2); }
.btn-ghost { background: transparent; color: var(--pp-cobalt); border: 1px solid var(--pp-line); }
.btn-ghost:hover { background: var(--pp-line-2); color: var(--pp-navy); }
.btn-link { background: none; color: var(--pp-cobalt); padding: .2rem .4rem; font-size: .85rem; }
.btn-link:hover { background: #eef2ff; }
.btn-link.danger { color: var(--pp-err); }
.btn-link.danger:hover { background: #fee2e2; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }

/* ------- Users table ------- */
.users-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: .92rem; }
.users-table th, .users-table td {
  padding: .65rem .65rem; text-align: left;
  border-bottom: 1px solid var(--pp-line); vertical-align: middle;
}
.users-table th {
  color: var(--pp-muted); font-weight: 600; font-size: .76rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.users-table tr.inactive td { opacity: .55; }
.users-table .actions { white-space: nowrap; }
@media (max-width: 640px) {
  .users-table thead { display: none; }
  .users-table tr { display: block; padding: .7rem .9rem; border: 1px solid var(--pp-line); border-radius: 8px; margin-bottom: .6rem; background: #fff; }
  .users-table td { display: block; border: 0; padding: .15rem 0; }
  .users-table td::before { content: attr(data-label); display: inline-block; width: 6.5rem; font-weight: 600; color: var(--pp-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
  .users-table td.actions { margin-top: .5rem; }
  .users-table td.actions::before { display: none; }
}

/* ------- Flash messages ------- */
.flash { padding: .7rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: .92rem; }
.flash-ok  { background: #d1fae5; color: #064e3b; }
.flash-err { background: #fee2e2; color: #7f1d1d; }
.flash-info{ background: #dbeafe; color: #1e3a8a; }

/* ------- Auth pages ------- */
.auth-page { background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-cobalt) 100%); min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.auth-card { background: #fff; border-radius: 12px; padding: 1.8rem 1.6rem; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
@media (min-width: 480px) { .auth-card { padding: 2.2rem 2rem; } }
.auth-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.4rem; justify-content: center; }
.auth-brand img { height: 56px; }
.auth-card h1 { color: var(--pp-navy); margin-bottom: 1rem; font-size: 1.3rem; text-align: center; }
.auth-card label { display: block; margin: .6rem 0 .2rem; font-size: .85rem; color: var(--pp-muted); }
.auth-card input { width: 100%; padding: .7rem .85rem; border: 1px solid var(--pp-line); border-radius: 6px; font-size: 1rem; font-family: inherit; }
.auth-card button { width: 100%; margin-top: 1.1rem; padding: .8rem; font-size: 1rem; }
.auth-foot { margin-top: 1.2rem; font-size: .88rem; color: var(--pp-muted); text-align: center; }

/* ------- Stub modules ------- */
.stub { background: var(--pp-surface); border: 1px dashed var(--pp-line); border-radius: var(--pp-radius); padding: 1.8rem 1.2rem; text-align: center; color: var(--pp-muted); }

/* ===================================================
   LMS — categories, courses, units, progress, quizzes
   =================================================== */

/* Category cards on /training/ */
.cat-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.4rem; }
@media (min-width: 600px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
.cat-card {
  background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius);
  padding: 1.2rem 1.2rem 1.1rem; display: block; color: var(--pp-text);
  border-left: 4px solid var(--pp-red);
  transition: transform .12s, box-shadow .12s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--pp-shadow); text-decoration: none; }
.cat-card h2 { color: var(--pp-navy); font-size: 1.1rem; margin: 0 0 .35rem; }
.cat-card p  { color: var(--pp-muted); font-size: .88rem; margin: 0 0 .8rem; }
.cat-meta { display: flex; gap: .8rem; font-size: .78rem; color: var(--pp-muted); }
.cat-meta .pill { font-size: .68rem; }

/* Course cards inside a category */
.course-grid { display: grid; grid-template-columns: 1fr; gap: .9rem; }
@media (min-width: 640px) { .course-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .course-grid { grid-template-columns: repeat(3, 1fr); } }
.course-card {
  background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius);
  padding: 1.1rem; display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s; color: var(--pp-text);
}
.course-card:hover { transform: translateY(-2px); box-shadow: var(--pp-shadow); text-decoration: none; }
.course-card h3 { color: var(--pp-navy); font-size: 1rem; margin: 0 0 .35rem; }
.course-card p  { color: var(--pp-muted); font-size: .86rem; margin: 0 0 .9rem; flex: 1; }
.course-card .progress-track { background: var(--pp-line-2); border-radius: 999px; height: 6px; overflow: hidden; }
.course-card .progress-fill { background: var(--pp-red); height: 100%; }
.course-card .progress-label { display: flex; justify-content: space-between; font-size: .76rem; color: var(--pp-muted); margin-top: .35rem; }

/* Course detail page: 2-column on >=900px */
.course-detail { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 900px) {
  .course-detail { grid-template-columns: 2fr 1fr; align-items: start; }
}
.course-detail .course-main, .course-detail .course-side {
  background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius);
  padding: 1.15rem 1.2rem;
}
.course-detail .course-side h3 {
  font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--pp-muted); margin: 1rem 0 .35rem;
}
.course-detail .course-side h3:first-child { margin-top: 0; }
.course-detail .course-side .meta-line { font-size: .9rem; margin-bottom: .4rem; }
.course-detail .course-side .meta-line strong { color: var(--pp-navy); }
.course-detail .progress-track { background: var(--pp-line-2); border-radius: 999px; height: 8px; overflow: hidden; margin-top: .35rem; }
.course-detail .progress-fill { background: var(--pp-red); height: 100%; }

/* Unit list inside a course */
.unit-list { list-style: none; padding: 0; margin: 0; }
.unit-list li { border-bottom: 1px solid var(--pp-line-2); padding: .65rem 0; }
.unit-list li:last-child { border-bottom: 0; }
.unit-list a, .unit-list .locked {
  display: flex; align-items: center; gap: .8rem; color: var(--pp-text);
  font-size: .96rem; padding: .15rem 0;
}
.unit-list a:hover { text-decoration: none; color: var(--pp-cobalt); }
.unit-list .status-icon {
  width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .7rem; font-weight: 700;
  border: 2px solid var(--pp-line);
  background: #fff; color: var(--pp-muted);
}
.unit-list .status-icon.done    { background: var(--pp-ok); border-color: var(--pp-ok); color: #fff; }
.unit-list .status-icon.in-progress { background: #fff; border-color: var(--pp-red); color: var(--pp-red); }
.unit-list .status-icon.locked  { background: #f1f5f9; border-color: var(--pp-line); color: #94a3b8; }
.unit-list .unit-type {
  font-size: .68rem; color: var(--pp-muted); text-transform: uppercase;
  letter-spacing: .06em; margin-left: auto;
  background: var(--pp-line-2); padding: .15rem .5rem; border-radius: 999px;
}
.unit-list .locked { opacity: .55; cursor: not-allowed; }
.unit-list .locked .unit-title::after { content: " (locked)"; font-size: .8rem; color: var(--pp-muted); }

/* Unit viewer page */
.unit-viewer { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 900px) { .unit-viewer { grid-template-columns: 3fr 1fr; align-items: start; } }
.unit-viewer .player-frame {
  background: #000; border-radius: var(--pp-radius); overflow: hidden;
  position: relative; padding-top: 56.25%;
}
.unit-viewer .player-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.unit-viewer .player-frame img { width: 100%; display: block; }
.unit-viewer .unit-side { background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius); padding: 1.1rem 1.2rem; }
.unit-viewer .unit-side h3 { font-size: 1rem; }
.unit-viewer .doc-frame { width: 100%; height: 720px; border: 1px solid var(--pp-line); border-radius: var(--pp-radius); background: #fff; }
.unit-viewer .text-body { background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius); padding: 1.4rem 1.5rem; }
.unit-viewer .text-body p { font-size: 1.02rem; line-height: 1.65; }
.unit-viewer .nav-row { display: flex; justify-content: space-between; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }

/* Quiz UI */
.quiz { background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius); padding: 1.2rem 1.4rem; }
.quiz .q { margin-bottom: 1.4rem; }
.quiz .q-prompt { font-weight: 600; color: var(--pp-navy); font-size: 1.02rem; margin-bottom: .55rem; }
.quiz .choice { display: flex; align-items: flex-start; gap: .55rem; padding: .55rem .65rem; border: 1px solid var(--pp-line); border-radius: 6px; margin-bottom: .35rem; cursor: pointer; transition: background .12s, border-color .12s; }
.quiz .choice:hover { background: var(--pp-line-2); }
.quiz .choice input { margin-top: .2rem; accent-color: var(--pp-red); }
.quiz .choice.correct  { background: #d1fae5; border-color: var(--pp-ok); }
.quiz .choice.incorrect{ background: #fee2e2; border-color: var(--pp-err); }
.quiz-result { padding: 1rem 1.2rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 600; }
.quiz-result.passed  { background: #d1fae5; color: #064e3b; }
.quiz-result.failed  { background: #fee2e2; color: #7f1d1d; }

/* Admin training tables */
.admin-table { width: 100%; border-collapse: collapse; margin-top: .5rem; font-size: .92rem; }
.admin-table th, .admin-table td { padding: .55rem .65rem; text-align: left; border-bottom: 1px solid var(--pp-line); vertical-align: middle; }
.admin-table th { color: var(--pp-muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table .actions { white-space: nowrap; }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; align-items: center; }
.toolbar .grow { flex: 1; }

/* FAQ list */
.faq { background: #fff; border: 1px solid var(--pp-line); border-radius: var(--pp-radius); padding: 1.1rem 1.2rem; margin-bottom: 1.4rem; }
.faq details { border-bottom: 1px solid var(--pp-line-2); padding: .7rem 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--pp-navy); list-style: none; padding-right: 1.4rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--pp-red); font-size: 1.1rem; font-weight: 700; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > p, .faq details > div { margin-top: .55rem; color: var(--pp-text); font-size: .94rem; }

/* "Continue where you left off" prompt */
.resume-banner {
  background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-cobalt) 100%);
  color: #fff; border-radius: var(--pp-radius); padding: 1.2rem 1.3rem;
  display: flex; flex-direction: column; gap: .9rem; margin-bottom: 1.4rem;
}
@media (min-width: 720px) { .resume-banner { flex-direction: row; align-items: center; } }
.resume-banner .resume-text { flex: 1; }
.resume-banner h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.05rem; }
.resume-banner p  { color: #c7d2e8; margin: 0; font-size: .9rem; }
.resume-banner .btn { background: var(--pp-red); }
.resume-banner .btn:hover { background: var(--pp-red-dark); }

/* ===================================================
   V2.1 — photo treatments
   =================================================== */

/* Login page hero background */
.auth-page {
  background:
    linear-gradient(135deg, rgba(11,37,69,.78) 0%, rgba(200,16,46,.45) 100%),
    url('/img/hero-login.jpg') center/cover no-repeat,
    linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-cobalt) 100%);
}

/* Hero strip used on dashboard + module heads */
.hero-strip {
  position: relative;
  border-radius: var(--pp-radius);
  overflow: hidden;
  background: #0b2545;
  min-height: 160px;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: flex-end;
}
.hero-strip .hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.hero-strip .hero-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,37,69,0) 0%, rgba(11,37,69,.6) 65%, rgba(11,37,69,.85) 100%);
}
.hero-strip .hero-inner {
  position: relative; z-index: 2; padding: 1.2rem 1.3rem 1.1rem;
  color: #fff;
}
.hero-strip h1, .hero-strip h2 { color: #fff; margin: 0 0 .25rem; font-size: 1.3rem; }
.hero-strip p { color: #e2e8f0; margin: 0; font-size: .92rem; }
@media (min-width: 760px) { .hero-strip { min-height: 220px; } .hero-strip h1, .hero-strip h2 { font-size: 1.6rem; } }

/* Section hero — smaller, used on resources / social / flyers / support / faq */
.section-hero {
  border-radius: var(--pp-radius);
  overflow: hidden;
  background: #0b2545;
  position: relative;
  min-height: 130px;
  margin-bottom: 1.4rem;
  display: flex; align-items: flex-end;
}
.section-hero .hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(.95);
}
.section-hero .hero-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,37,69,.25) 0%, rgba(11,37,69,.78) 95%);
}
.section-hero .hero-inner {
  position: relative; z-index: 2; padding: 1rem 1.2rem; color: #fff;
}
.section-hero h1 { color: #fff; margin: 0 0 .2rem; font-size: 1.3rem; }
.section-hero p { color: #cbd5e1; margin: 0; font-size: .88rem; max-width: 56ch; }

/* Category card with header image */
.cat-card { padding: 0; overflow: hidden; }
.cat-card .cat-img {
  height: 140px; background-size: cover; background-position: center;
  position: relative;
}
.cat-card .cat-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,37,69,0) 30%, rgba(11,37,69,.55) 100%);
}
.cat-card .cat-body { padding: 1rem 1.2rem 1.1rem; }
.cat-card h2 { margin-top: 0; }

/* Course card with cover image */
.course-card { padding: 0; overflow: hidden; }
.course-card .course-img {
  height: 130px; background-size: cover; background-position: center;
  position: relative;
}
.course-card .course-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,37,69,0) 35%, rgba(11,37,69,.5) 100%);
}
.course-card .course-body { padding: .95rem 1.05rem 1rem; display: flex; flex-direction: column; flex: 1; }

/* Brand-tinted variant when image is missing — graceful fallback */
.cat-card .cat-img.fallback,
.course-card .course-img.fallback {
  background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-red) 110%);
}

/* Dashboard role tiles (visual tiles row below hero) */
.tile-row {
  display: grid; grid-template-columns: 1fr; gap: .85rem; margin-bottom: 1.5rem;
}
@media (min-width: 600px) { .tile-row { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .tile-row { grid-template-columns: repeat(4, 1fr); } }
.tile {
  background: var(--pp-surface);
  border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius);
  padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: .35rem;
  color: var(--pp-text);
  transition: transform .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--pp-shadow); text-decoration: none; }
.tile .tile-label {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--pp-muted); font-weight: 600;
}
.tile .tile-value { font-size: 1.45rem; font-weight: 600; color: var(--pp-navy); line-height: 1.1; }
.tile .tile-sub { color: var(--pp-muted); font-size: .82rem; }
.tile.accent { border-left: 4px solid var(--pp-red); }

/* Footer strip */
.footer-strip {
  margin: 2rem -1rem -1.1rem;
  padding: 1.1rem 1.2rem;
  background: var(--pp-navy);
  color: #c7d2e8;
  border-radius: 0 0 12px 12px;
  display: flex; flex-direction: column; gap: .6rem;
  align-items: flex-start; font-size: .85rem;
}
@media (min-width: 760px) {
  .footer-strip { flex-direction: row; align-items: center; margin: 2.5rem -2.5rem -3rem; border-radius: 0; padding: 1.2rem 2.5rem; }
}
.footer-strip .foot-brand { display: flex; align-items: center; gap: .6rem; color: #fff; }
.footer-strip .foot-brand img { height: 30px; }
.footer-strip .foot-brand strong { color: #fff; font-weight: 600; }
.footer-strip .foot-tag { color: #c7d2e8; font-style: italic; flex: 1; }
.footer-strip .foot-links { display: flex; gap: 1rem; font-size: .82rem; }
.footer-strip .foot-links a { color: #c7d2e8; }
.footer-strip .foot-links a:hover { color: #fff; }

/* Resource and social cards with image thumbnails */
.thumb-card {
  background: var(--pp-surface);
  border: 1px solid var(--pp-line);
  border-radius: var(--pp-radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .12s, box-shadow .12s;
  color: var(--pp-text);
}
.thumb-card:hover { transform: translateY(-2px); box-shadow: var(--pp-shadow); text-decoration: none; }
.thumb-card .thumb-img {
  height: 120px; background-size: cover; background-position: center;
  background-color: var(--pp-line-2);
  position: relative;
}
.thumb-card .thumb-img.fallback {
  background: linear-gradient(135deg, var(--pp-navy) 0%, var(--pp-red) 130%);
}
.thumb-card .thumb-body { padding: .8rem 1rem .9rem; flex: 1; display: flex; flex-direction: column; }
.thumb-card h3 { color: var(--pp-navy); font-size: .95rem; margin: 0 0 .2rem; }
.thumb-card p { color: var(--pp-muted); font-size: .82rem; margin: 0 0 .55rem; flex: 1; }
.thumb-card .thumb-meta { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .75rem; color: var(--pp-muted); }
