/* LC Learn theme. Sits on top of Bootstrap 5.
   Brand values are defined once here; swap the interim values for the final ones in :root. */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* brand (interim, from lateralconnections.com.au) */
  --lc-purple: #68388d;
  --lc-blue: #87d2e7;
  --lc-amber: #fcb116;

  /* derived */
  --lc-purple-dark: #4a2568;
  --lc-purple-deep: #2b1340;
  --lc-purple-tint: #f3eef8;
  --lc-purple-line: #e5deed;
  --lc-blue-tint: #eaf7fb;
  --lc-blue-ink: #14576b;
  --lc-amber-tint: #fff5e0;
  --lc-amber-ink: #7a5200;
  --lc-green-tint: #e6f5ec;
  --lc-green-ink: #1c6b3f;
  --lc-ink: #2a2433;
  --lc-text: #464646;
  --lc-muted: #6c6775;
  --lc-line: #e8e4ee;
  --lc-bg: #ffffff;
  --lc-bg-soft: #faf8fc;

  --lc-radius: 20px;
  --lc-radius-sm: 12px;
  --lc-shadow: 0 1px 2px rgba(43, 19, 64, 0.05), 0 8px 24px rgba(43, 19, 64, 0.07);
  --lc-shadow-lift: 0 2px 4px rgba(43, 19, 64, 0.06), 0 18px 40px rgba(43, 19, 64, 0.13);

  /* Bootstrap hooks */
  --bs-body-font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--lc-text);
  --bs-link-color-rgb: 104, 56, 141;
  --bs-link-hover-color-rgb: 74, 37, 104;
  --bs-border-color: var(--lc-line);
}

body {
  font-weight: 350;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  color: var(--lc-ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(2.1rem, 1.3rem + 3vw, 3.5rem); }
h2, .h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem); }
h3, .h3 { font-size: 1.3rem; }
p { text-wrap: pretty; }
.lead { font-size: 1.2rem; font-weight: 350; color: var(--lc-text); }
.text-muted-lc { color: var(--lc-muted); }
.eyebrow {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--lc-purple);
}
:focus-visible { outline: 3px solid var(--lc-amber); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; z-index: 2000; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* ---------- buttons ---------- */
.btn {
  --bs-btn-font-weight: 500;
  --bs-btn-padding-x: 1.35rem;
  --bs-btn-padding-y: 0.7rem;
  --bs-btn-border-radius: 999px;
  --bs-btn-font-size: 1rem;
}
.btn-sm { --bs-btn-padding-x: 1rem; --bs-btn-padding-y: 0.45rem; --bs-btn-font-size: 0.92rem; }
.btn-lg { --bs-btn-padding-x: 1.7rem; --bs-btn-padding-y: 0.85rem; --bs-btn-font-size: 1.08rem; }
.btn-primary {
  --bs-btn-bg: var(--lc-purple); --bs-btn-border-color: var(--lc-purple);
  --bs-btn-hover-bg: var(--lc-purple-dark); --bs-btn-hover-border-color: var(--lc-purple-dark);
  --bs-btn-active-bg: var(--lc-purple-dark); --bs-btn-active-border-color: var(--lc-purple-dark);
  --bs-btn-disabled-bg: #b7a6c6; --bs-btn-disabled-border-color: #b7a6c6;
}
.btn-outline-primary {
  --bs-btn-color: var(--lc-purple); --bs-btn-border-color: #cdbddb;
  --bs-btn-hover-bg: var(--lc-purple-tint); --bs-btn-hover-color: var(--lc-purple-dark); --bs-btn-hover-border-color: var(--lc-purple);
  --bs-btn-active-bg: var(--lc-purple-tint); --bs-btn-active-color: var(--lc-purple-dark); --bs-btn-active-border-color: var(--lc-purple);
}
.btn-light-lc {
  --bs-btn-bg: #fff; --bs-btn-color: var(--lc-purple-dark); --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: var(--lc-purple-tint); --bs-btn-hover-color: var(--lc-purple-dark); --bs-btn-hover-border-color: var(--lc-purple-tint);
}
.btn svg { width: 1.1em; height: 1.1em; margin-right: 0.45em; vertical-align: -0.16em; }
.link-arrow { font-weight: 500; text-decoration: none; }
.link-arrow::after { content: " \2192"; transition: margin 0.15s; }
.link-arrow:hover::after { margin-left: 4px; }

/* ---------- header ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--lc-line);
  position: sticky; top: 0; z-index: 1000;
}
.site-header .navbar { padding: 0.85rem calc(var(--bs-gutter-x) * 0.5); }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.brand-tag {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lc-purple); border-left: 1px solid var(--lc-purple-line); padding-left: 0.75rem;
}
.site-header .nav-link {
  color: var(--lc-ink); font-weight: 450; padding: 0.5rem 0.9rem !important; border-radius: 999px;
}
.site-header .nav-link:hover { background: var(--lc-purple-tint); color: var(--lc-purple-dark); }
.site-header .nav-link.active { color: var(--lc-purple); font-weight: 600; }
.navbar-toggler { border: 0; padding: 0.4rem; }
.navbar-toggler:focus { box-shadow: none; }
.user-chip {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.9rem 0.3rem 0.3rem;
  border: 1px solid var(--lc-line); border-radius: 999px; color: var(--lc-ink); text-decoration: none; font-weight: 450; background: #fff;
}
.user-chip:hover { border-color: var(--lc-purple); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--lc-purple); color: #fff;
  display: inline-grid; place-items: center; font-size: 0.85rem; font-weight: 600;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(135, 210, 231, 0.35), transparent 60%),
    linear-gradient(180deg, var(--lc-purple-tint), #fff 92%);
  padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4.5rem);
  overflow: hidden;
}
.hero h1 em { font-style: normal; color: var(--lc-purple); }
.hero-copy { position: relative; z-index: 1; }

/* The photo (recoloured in the brand purples), fading into the page towards the text, with the
   two cards coming out of the laptop's screen. Card positions are percentages of the photo, so
   they stay on the screen at any size. */
.hero-media { display: none; }  /* phones and tablets: the text alone */
@media (min-width: 992px) {
  .hero-media {
    display: block; aspect-ratio: 1800 / 1005; position: absolute; z-index: 0; right: 0; top: 50%; width: min(64vw, 1000px); margin: 0; transform: translateY(-50%);
  }
  .hero-media picture { display: block; width: 100%; height: 100%; }
  .hero-media img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    -webkit-mask-image: linear-gradient(90deg, transparent 8%, rgba(0, 0, 0, 0.25) 30%, #000 58%),
                        linear-gradient(180deg, transparent, #000 16%, #000 80%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 8%, rgba(0, 0, 0, 0.25) 30%, #000 58%),
                linear-gradient(180deg, transparent, #000 16%, #000 80%, transparent);
    mask-composite: intersect;
  }
}

.float-card {
  position: absolute; background: rgba(255, 255, 255, 0.94); border-radius: 16px;
  box-shadow: 0 0 0 1px rgba(135, 210, 231, 0.7), 0 0 26px rgba(135, 210, 231, 0.55), var(--lc-shadow-lift);
  padding: 0.8rem 1rem; display: flex; align-items: center; gap: 0.7rem; font-size: 0.92rem; line-height: 1.25; color: var(--lc-ink);
  white-space: nowrap; transform-origin: right center; transform: perspective(900px) rotateY(-16deg);
  animation: card-emerge 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both, card-float 6s ease-in-out 1.6s infinite;
}
/* A beam of light from the screen to the card. */
.float-card::after {
  content: ""; position: absolute; left: 100%; top: 0; bottom: 0; width: 70px; pointer-events: none;
  background: linear-gradient(90deg, rgba(135, 210, 231, 0.45), rgba(135, 210, 231, 0));
  clip-path: polygon(0 0, 100% 38%, 100% 62%, 0 100%);
}
.float-card.two { right: 11%; top: 9%; animation-delay: 0.35s, 1.8s; }
.float-card.one { right: 17%; top: 44%; animation-delay: 0.7s, 2.6s; }
@keyframes card-emerge {
  from { opacity: 0; transform: perspective(900px) translateX(70px) rotateY(-55deg) scale(0.55); }
  to { opacity: 1; transform: perspective(900px) rotateY(-16deg); }
}
@keyframes card-float { 50% { translate: 0 -7px; } }
@media (prefers-reduced-motion: reduce) { .float-card { animation: none; } }
.float-card strong { display: block; font-weight: 600; }
.float-card span { color: var(--lc-muted); font-size: 0.82rem; }
.icon-dot {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--lc-purple-tint); color: var(--lc-purple);
}
.icon-dot.amber { background: var(--lc-amber-tint); color: var(--lc-amber-ink); }
.icon-dot.blue { background: var(--lc-blue-tint); color: var(--lc-blue-ink); }
.icon-dot.green { background: var(--lc-green-tint); color: var(--lc-green-ink); }
.icon-dot svg { width: 20px; height: 20px; }
.accred-line {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 2rem;
  font-size: 0.92rem; color: var(--lc-muted);
}
.accred-pill {
  border: 1px solid var(--lc-purple-line); background: #fff; border-radius: 999px; padding: 0.25rem 0.8rem;
  font-weight: 600; color: var(--lc-purple-dark); font-size: 0.82rem; letter-spacing: 0.04em;
}

/* ---------- sections ---------- */
.section { padding-block: clamp(3rem, 2.2rem + 3vw, 5rem); }
.section-soft { background: var(--lc-bg-soft); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head p { max-width: 60ch; margin: 0.6rem 0 0; }

.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.step { background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); padding: 1.4rem; }
.step-num {
  width: 36px; height: 36px; border-radius: 11px; background: var(--lc-purple); color: #fff; font-weight: 600;
  display: grid; place-items: center; margin-bottom: 0.9rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 0.35rem; }
.step p { margin: 0; font-size: 0.98rem; color: var(--lc-muted); }

/* ---------- activity cards ---------- */
.activity-card {
  display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--lc-line);
  border-radius: var(--lc-radius); overflow: hidden; text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.activity-card:hover { transform: translateY(-4px); box-shadow: var(--lc-shadow-lift); border-color: #d6c9e3; color: inherit; }
.activity-card .cover { aspect-ratio: 16 / 10; position: relative; background: var(--lc-purple-tint); }
.activity-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.activity-card .body { padding: 1.3rem 1.4rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.activity-card h3 { font-size: 1.3rem; margin-bottom: 0.3rem; }
.activity-card .sub { color: var(--lc-purple); font-weight: 500; font-size: 0.98rem; margin-bottom: 0.6rem; }
.activity-card p { font-size: 0.98rem; color: var(--lc-muted); margin-bottom: 1rem; }
.activity-card .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--lc-line); }
.activity-card .go { color: var(--lc-purple); font-weight: 600; white-space: nowrap; }
.activity-card .go::after { content: " \2192"; }

.tag {
  display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; padding: 0.22rem 0.7rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap;
}
.tag-type { background: #fff; color: var(--lc-purple-dark); box-shadow: 0 2px 8px rgba(43, 19, 64, 0.14); position: absolute; left: 14px; top: 14px; }
.tag-plain { background: var(--lc-purple-tint); color: var(--lc-purple-dark); }
.tag-hours { background: var(--lc-blue-tint); color: var(--lc-blue-ink); }
.tag-amber { background: var(--lc-amber-tint); color: var(--lc-amber-ink); }
.tag-green { background: var(--lc-green-tint); color: var(--lc-green-ink); }
.tag-grey { background: #f0eef3; color: #55505e; }
.tag svg { width: 13px; height: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ---------- call to action band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--lc-purple-deep), var(--lc-purple) 70%);
  border-radius: calc(var(--lc-radius) + 8px); color: #fff; padding: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
  position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.86); max-width: 52ch; }
.cta-band::after {
  content: ""; position: absolute; right: -60px; bottom: -90px; width: 320px; height: 320px;
  background: url("../img/hero-mark.svg") center / contain no-repeat; opacity: 0.16; transform: rotate(-8deg);
}
.cta-band > * { position: relative; z-index: 1; }

/* ---------- footer ---------- */
.site-footer { background: var(--lc-purple-deep); color: rgba(255, 255, 255, 0.78); padding-block: 3rem 2rem; font-size: 0.95rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; font-weight: 600; font-size: 1.15rem; margin-bottom: 0.9rem; }
.footer-brand img { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 4px; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.14); margin-top: 2.2rem; padding-top: 1.3rem; font-size: 0.86rem; }

/* ---------- activity page ---------- */
.page-top { background: linear-gradient(180deg, var(--lc-purple-tint), #fff); padding-block: 1.5rem 0; }
.crumbs { font-size: 0.9rem; color: var(--lc-muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--lc-muted); text-decoration: none; }
.crumbs a:hover { color: var(--lc-purple); }
.activity-hero-img { border-radius: var(--lc-radius); overflow: hidden; aspect-ratio: 16 / 5; margin-top: 2rem; }
.activity-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prose h2 { font-size: 1.5rem; margin: 2.4rem 0 0.8rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

.action-card {
  background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); box-shadow: var(--lc-shadow);
  padding: 1.5rem; position: sticky; top: 96px;
}
.action-card h2 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.action-card .btn { width: 100%; }
.hours { list-style: none; padding: 0; margin: 1.2rem 0 0; border-top: 1px solid var(--lc-line); }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--lc-line); font-size: 0.96rem; }
.hours strong { color: var(--lc-ink); font-weight: 600; white-space: nowrap; }
.state-note { border-radius: var(--lc-radius-sm); padding: 0.85rem 1rem; font-size: 0.94rem; margin-bottom: 1rem; display: flex; gap: 0.65rem; }
.state-note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.state-note.info { background: var(--lc-blue-tint); color: var(--lc-blue-ink); }
.state-note.warn { background: var(--lc-amber-tint); color: var(--lc-amber-ink); }
.state-note.ok { background: var(--lc-green-tint); color: var(--lc-green-ink); }
.small-print { font-size: 0.85rem; color: var(--lc-muted); margin: 0.9rem 0 0; }

.how { counter-reset: how; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.how li { counter-increment: how; position: relative; padding: 0 0 1.4rem 3.2rem; }
.how li::before {
  content: counter(how); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 11px;
  background: var(--lc-purple-tint); color: var(--lc-purple); font-weight: 600; display: grid; place-items: center;
}
.how li::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 6px; width: 2px; background: var(--lc-purple-line); }
.how li:last-child { padding-bottom: 0; }
.how li:last-child::after { display: none; }
.how strong { color: var(--lc-ink); font-weight: 600; display: block; }

/* "How it works" on an activity page: a box that opens and closes. */
.how-box { border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); margin: 2.4rem 0 0; background: #fff; }
.prose .how-box:first-child { margin-top: 0; }
.how-box summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem;
  cursor: pointer; list-style: none; border-radius: var(--lc-radius-sm);
}
.how-box summary::-webkit-details-marker { display: none; }
.how-box summary:hover { background: var(--lc-bg-soft); }
.how-box summary:focus-visible { outline: 2px solid var(--lc-purple); outline-offset: 2px; }
.how-box summary h2 { margin: 0; font-size: 1.25rem; }
.how-box-icon {
  flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--lc-purple-tint); position: relative;
}
.how-box-icon::before {
  content: ""; position: absolute; left: 50%; top: 45%; width: 9px; height: 9px;
  border-right: 2px solid var(--lc-purple); border-bottom: 2px solid var(--lc-purple);
  transform: translate(-50%, -50%) rotate(45deg); transition: transform 0.2s ease;
}
.how-box[open] .how-box-icon::before { top: 55%; transform: translate(-50%, -50%) rotate(-135deg); }
.how-box[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.how-box-body { padding: 0.25rem 1.25rem 1.25rem; }
.how-box-body > :last-child { margin-bottom: 0; }
@media (prefers-reduced-motion: reduce) { .how-box-icon::before { transition: none; } }

.accred { display: grid; gap: 0.9rem; }
.accred-item { display: flex; gap: 1rem; align-items: flex-start; border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); padding: 1rem 1.1rem; background: #fff; }
.accred-badge {
  flex: none; width: 64px; height: 64px; border-radius: 14px; background: var(--lc-purple-tint); color: var(--lc-purple-dark);
  display: grid; place-items: center; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.05em; text-align: center; line-height: 1.1;
}
.accred-item p { margin: 0; font-size: 0.96rem; }
.accred-item strong { color: var(--lc-ink); font-weight: 600; }
.sponsor { background: var(--lc-bg-soft); border-left: 4px solid var(--lc-blue); border-radius: 0 var(--lc-radius-sm) var(--lc-radius-sm) 0; padding: 1rem 1.2rem; font-size: 0.96rem; }

.dropzone {
  border: 2px dashed #cdbddb; border-radius: var(--lc-radius-sm); padding: 1.1rem; text-align: center; background: var(--lc-bg-soft);
  font-size: 0.93rem; color: var(--lc-muted); margin-bottom: 0.9rem;
}
.dropzone strong { color: var(--lc-purple); font-weight: 600; }
.form-check-input:checked { background-color: var(--lc-purple); border-color: var(--lc-purple); }
.form-check-label { font-size: 0.9rem; }

/* ---------- dashboard ---------- */
.dash-top { background: linear-gradient(180deg, var(--lc-purple-tint), #fff); padding-block: 2.5rem 1.5rem; }
.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 1.8rem; }
.stat { background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); padding: 1rem 1.1rem; display: flex; gap: 0.8rem; align-items: center; }
.stat b { display: block; font-size: 1.5rem; font-weight: 600; color: var(--lc-ink); line-height: 1.1; }
.stat span { font-size: 0.88rem; color: var(--lc-muted); }

.my-activity {
  display: grid; grid-template-columns: 150px 1fr auto; gap: 1.3rem; align-items: center;
  background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); padding: 1rem; margin-bottom: 1rem;
}
.my-activity .thumb { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; }
.my-activity .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.my-activity h3 { font-size: 1.2rem; margin: 0.45rem 0 0.25rem; }
.my-activity h3 a { color: inherit; text-decoration: none; }
.my-activity h3 a:hover { color: var(--lc-purple); }
.my-activity .meta { font-size: 0.92rem; color: var(--lc-muted); margin: 0; }
.my-activity .actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; min-width: 210px; padding-right: 0.4rem; }
.my-activity .feedback { grid-column: 2 / -1; background: var(--lc-amber-tint); color: var(--lc-amber-ink); border-radius: var(--lc-radius-sm); padding: 0.75rem 1rem; font-size: 0.93rem; }
.progress-lc { height: 8px; border-radius: 999px; background: var(--lc-purple-line); overflow: hidden; margin-top: 0.7rem; max-width: 340px; }
.progress-lc i { display: block; height: 100%; background: var(--lc-purple); border-radius: 999px; }
.group-title { font-size: 1.25rem; margin: 2.2rem 0 1rem; display: flex; align-items: center; gap: 0.6rem; }
.count { background: var(--lc-purple-tint); color: var(--lc-purple-dark); border-radius: 999px; font-size: 0.8rem; padding: 0.1rem 0.6rem; font-weight: 600; }

@media (max-width: 767.98px) {
  /* "How it works" steps: one compact list instead of four tall cards. */
  .steps { display: block; background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); padding: 0.35rem 1rem; }
  .step { display: grid; grid-template-columns: 28px 1fr; column-gap: 0.8rem; align-items: start; border: 0; border-radius: 0; padding: 0.75rem 0; background: none; }
  .step + .step { border-top: 1px solid var(--lc-line); }
  .step-num { grid-row: span 2; width: 28px; height: 28px; border-radius: 9px; font-size: 0.9rem; margin: 0.05rem 0 0; }
  .step h3 { font-size: 1rem; margin-bottom: 0.1rem; }
  .step p { font-size: 0.88rem; line-height: 1.4; }

  /* Activity cards: a band with a small picture, instead of a tall card. */
  .activity-grid { --bs-gutter-y: 0.75rem; }
  .activity-card { flex-direction: row; border-radius: var(--lc-radius-sm); }
  .activity-card:hover { transform: none; }
  .activity-card .cover { aspect-ratio: auto; width: 96px; flex: none; }
  .activity-card .tag-type, .activity-card p { display: none; }
  .activity-card .body { padding: 0.75rem 0.9rem; min-width: 0; }
  .activity-card h3 { font-size: 1.02rem; line-height: 1.25; margin-bottom: 0.15rem; }
  .activity-card .sub { font-size: 0.85rem; line-height: 1.3; margin-bottom: 0.45rem; }
  .activity-card .foot { padding-top: 0; border-top: 0; flex-wrap: wrap; gap: 0.4rem 0.6rem; }
  .activity-card .tag { font-size: 0.72rem; }
  .activity-card .go { font-size: 0.88rem; }

  .my-activity { grid-template-columns: 84px 1fr; align-items: start; }
  .my-activity .actions { grid-column: 1 / -1; min-width: 0; padding-right: 0; }
  .my-activity .feedback { grid-column: 1 / -1; }
  .action-card { position: static; }
  .brand img { height: 34px; }
  .brand-tag { display: none; }
}
@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding-block: 0.75rem; }
  .site-header .nav-actions { margin-top: 0.5rem; }
}

/* ---------- utilities used by templates (no inline styles: the CSP forbids them) ---------- */
.measure { max-width: 54ch; }
.measure-narrow { max-width: 44ch; }
.h-page { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); }
.inline-form { display: inline; }

/* ---------- flash messages ---------- */
.flash-wrap { padding-top: 1rem; }
.alert { border: 0; border-radius: var(--lc-radius-sm); font-size: 0.98rem; margin-bottom: 0.6rem; }
.alert-success { background: var(--lc-green-tint); color: var(--lc-green-ink); }
.alert-info { background: var(--lc-blue-tint); color: var(--lc-blue-ink); }
.alert-danger { background: #fdecec; color: #8c1d1d; }
.alert-warning { background: var(--lc-amber-tint); color: var(--lc-amber-ink); }

/* ---------- forms ---------- */
.form-label { font-weight: 500; color: var(--lc-ink); margin-bottom: 0.3rem; font-size: 0.98rem; }
.form-label .optional { font-weight: 350; color: var(--lc-muted); font-size: 0.88rem; }
.form-control, .form-select {
  border-radius: 12px; border-color: #d9d3e2; padding: 0.65rem 0.9rem; font-size: 1rem; color: var(--lc-ink);
}
.form-control:focus, .form-select:focus { border-color: var(--lc-purple); box-shadow: 0 0 0 0.2rem rgba(104, 56, 141, 0.18); }
.form-text { color: var(--lc-muted); font-size: 0.86rem; }
.field-error { color: #a12626; font-size: 0.9rem; margin-top: 0.3rem; }
.form-control.is-invalid, .form-select.is-invalid { border-color: #c0392b; background-image: none; }
.form-check-input { border-color: #b9b1c6; }
.form-section { font-size: 1.05rem; margin: 2rem 0 1rem; padding-top: 1.5rem; border-top: 1px solid var(--lc-line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
/* A question answered by choosing one option (the feedback form). */
.choice-group { border: 0; padding: 0; margin-inline: 0; }
.choice-group legend { float: none; font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; line-height: 1.4; }
.choice-row { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.choice-row .form-check { margin-bottom: 0; }
.feedback-ask { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--lc-line); }

/* ---------- auth pages ---------- */
.auth-wrap { background: linear-gradient(180deg, var(--lc-purple-tint), #fff 60%); padding-block: clamp(2rem, 1.5rem + 3vw, 4rem); min-height: 60vh; }
.auth-card {
  background: #fff; border: 1px solid var(--lc-line); border-radius: calc(var(--lc-radius) + 4px); box-shadow: var(--lc-shadow);
  padding: clamp(1.4rem, 1rem + 2vw, 2.5rem); max-width: 520px; margin-inline: auto;
}
.auth-card.wide { max-width: 760px; }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 0.5rem; }
.auth-card .intro { color: var(--lc-muted); margin-bottom: 1.5rem; }
.auth-alt { text-align: center; margin-top: 1.3rem; font-size: 0.96rem; color: var(--lc-muted); }
.divider { display: flex; align-items: center; gap: 0.9rem; color: var(--lc-muted); font-size: 0.86rem; margin: 1.4rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--lc-line); }
.btn-block { width: 100%; }

/* ---------- content pages ---------- */
.page-head { background: linear-gradient(180deg, var(--lc-purple-tint), #fff); padding-block: 2.5rem 1rem; }
.prose { max-width: 72ch; }
.prose img { max-width: 100%; height: auto; border-radius: var(--lc-radius-sm); margin-block: 0.8rem; }
.prose h3 { margin: 1.8rem 0 0.6rem; }
.prose blockquote { border-left: 4px solid var(--lc-blue); background: var(--lc-bg-soft); padding: 0.8rem 1.1rem; border-radius: 0 var(--lc-radius-sm) var(--lc-radius-sm) 0; }
.preview-bar { background: var(--lc-amber); color: #1d1a22; text-align: center; padding: 0.5rem 1rem; font-size: 0.92rem; font-weight: 500; }
.env-bar { background: #1d1a22; color: var(--lc-amber); text-align: center; padding: 0.3rem 1rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }

/* ---------- dashboard empty state ---------- */
.empty-state {
  border: 2px dashed var(--lc-purple-line); border-radius: var(--lc-radius); padding: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  text-align: center; background: var(--lc-bg-soft);
}
.empty-state img { width: 96px; height: 96px; margin-bottom: 1.2rem; }
.empty-state p { max-width: 46ch; margin-inline: auto; color: var(--lc-muted); }
.notice { border-radius: var(--lc-radius-sm); padding: 1rem 1.2rem; background: var(--lc-amber-tint); color: var(--lc-amber-ink); margin-bottom: 1.5rem; }
.notice a { color: inherit; font-weight: 600; }

/* ---------- error pages ---------- */
.error-page { text-align: center; padding-block: clamp(3rem, 2rem + 6vw, 7rem); }
.error-code { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.14em; color: var(--lc-purple); }

/* ---------- header extras ---------- */
.nav-logout { background: none; border: 0; padding: 0; }

/* ---------- activity pages (Stage 2) ---------- */
.accred-badge-img { flex: none; width: 64px; height: 64px; object-fit: contain; border-radius: 10px; }
.action-card form .btn { width: 100%; }
.action-card .state-note:last-of-type { margin-bottom: 1rem; }

/* ---------- header: keep every item on one line ---------- */
.site-header .nav-link, .site-header .user-chip, .site-header .nav-actions .btn { white-space: nowrap; }
.site-header .nav-link { padding: 0.5rem 0.75rem !important; }
@media (max-width: 1199.98px) {
  .site-header .navbar-collapse { padding-block: 0.75rem; }
  .site-header .nav-actions { margin-top: 0.5rem; }
}

/* Two-step login set-up (staff) */
.two-step-steps { padding-left: 1.2rem; margin-bottom: 1.5rem; }
.two-step-steps li { margin-bottom: 0.9rem; }
.two-step-qr { display: block; margin: 0.8rem 0 0.5rem; border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); background: #fff; }
.two-step-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; overflow-wrap: anywhere; }

/* Supplementary materials */
.materials { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.7rem; }
.material { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.9rem 1.1rem; border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); background: #fff; color: var(--lc-text); text-decoration: none; }
.material:hover, .material:focus-visible { border-color: var(--lc-purple); box-shadow: var(--lc-shadow); color: var(--lc-text); }
.material-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--lc-purple-tint); color: var(--lc-purple); display: grid; place-items: center; }
.material-icon svg { width: 22px; height: 22px; }
.material-text { display: grid; gap: 0.15rem; min-width: 0; }
.material-text strong { color: var(--lc-ink); font-weight: 600; overflow-wrap: anywhere; }
.material-about { font-size: 0.95rem; }
.material-meta { font-size: 0.84rem; color: var(--lc-muted); }
.container.narrow { max-width: 760px; }

/* Clinical audits that can be done online or on paper: the two ways, on the audit's page. */
.route { border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); padding: 1rem; margin-bottom: 0.9rem; }
.route.lead { border-color: var(--lc-purple-line); background: var(--lc-bg-soft); }
.route h3 { font-size: 1rem; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.5rem; }
.route h3 svg, .way h3 svg { width: 20px; height: 20px; color: var(--lc-purple); flex: none; }
.route p { font-size: 0.93rem; color: var(--lc-muted); margin-bottom: 0.75rem; }
.route-or { display: flex; align-items: center; gap: 0.75rem; color: var(--lc-muted); font-size: 0.85rem; margin: 0.2rem 0 1rem; }
.route-or::before, .route-or::after { content: ""; flex: 1; border-top: 1px solid var(--lc-line); }
.switch { border-top: 1px solid var(--lc-line); margin-top: 1rem; padding-top: 0.9rem; }
.switch summary { color: var(--lc-purple); font-weight: 600; font-size: 0.94rem; cursor: pointer; }
.switch[open] summary { margin-bottom: 0.8rem; }
.switch p { font-size: 0.93rem; color: var(--lc-muted); }
.ways { display: grid; gap: 1rem; margin-bottom: 1.2rem; }
@media (min-width: 768px) { .ways { grid-template-columns: 1fr 1fr; } }
.way { border: 1px solid var(--lc-line); border-radius: var(--lc-radius-sm); padding: 1.1rem 1.2rem; }
.way h3 { font-size: 1.05rem; display: flex; gap: 0.5rem; align-items: center; margin-top: 0; }
.way ol { padding-left: 1.2rem; margin: 0; font-size: 0.95rem; }
.way li { margin-bottom: 0.3rem; }

/* A learner's answers to an online audit. */
.answer-list { max-width: 52rem; padding-left: 1.6rem; }
.answer-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--lc-line); }
.answer-list li::marker { color: var(--lc-muted); }
.answer-q { display: block; color: var(--lc-muted); }
.answer-a { display: block; color: var(--lc-ink); font-weight: 600; white-space: pre-line; margin-top: 0.15rem; }

.input-narrow { max-width: 16rem; }
