@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900');

:root {
  /* Change these Hex codes to your brand colors */
  --bs-primary: #70cbff;       /* A nice custom Blue */
  --bs-primary-rgb: 112, 203, 255; /* Must match the hex for transparency effects */

  --bs-success: #9fc7aa;       /* Custom Green */
  --bs-success-rgb: 159, 199, 170;

  --bs-warning: #ffd699;       /* Custom Yellow */
  --bs-warning-rgb: 255, 214, 153;

  /* Same waypoint tokens used on the SURE evaluation tool, so the intro
     popover reads as one system across both pages. */
  --step-done: #3f6b52;
  --step-current: #eab53c;

  /* Parchment/ink pairing shared with the evaluation tool's results
     scorecard (sure.css), reused here for the modal surface. */
  --sure-cream: #faf6ec;
  --sure-cream-edge: #e9dfc3;
  --sure-ink: #1f3a2a;
  --sure-ink-soft: rgba(31, 58, 42, 0.62);
}

/* Intro bar — one slim white strip (trigger + logo) so the page content
   below starts almost immediately. The instructions live in a popover that
   floats over the page instead of pushing content down when opened. */
.intro-bar {
  padding: 0.85rem 0;
}

.intro-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.intro-bar-logo img {
  display: block;
  height: 40px;
  width: auto;
}

.intro-popover {
  position: relative;
}

.intro-popover-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(63, 107, 82, 0.28);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--step-done);
  background: #fff;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.intro-popover-trigger::-webkit-details-marker {
  display: none;
}

.intro-popover-trigger::marker {
  content: "";
}

.intro-popover-trigger:hover {
  background: rgba(63, 107, 82, 0.06);
  border-color: rgba(63, 107, 82, 0.45);
}

.intro-popover-trigger:focus-visible {
  outline: 2px solid var(--step-done);
  outline-offset: 2px;
}

.intro-popover-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--step-current);
  color: #3a2c05;
  font-family: "Barlow", sans-serif;
  font-weight: 800;
  font-style: italic;
  font-size: 0.72rem;
}

.intro-popover-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.intro-popover[open] .intro-popover-chevron {
  transform: rotate(-135deg);
}

.intro-popover-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  left: 0;
  width: min(440px, calc(100vw - 3rem));
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(63, 107, 82, 0.15);
  border-radius: 14px;
  background: #fff;
  color: #333;
  box-shadow: 0 16px 32px rgba(31, 51, 41, 0.18);
  animation: intro-panel-in 0.18s ease;
}

/* Cross-links between the Self-Evaluation Tool and the Crisis Resilience Guide - the
   default Bootstrap blue sits oddly against the panel's brand palette. */
.intro-popover-panel a {
  color: #2d5f74;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.intro-popover-panel a:hover {
  color: #1f3a2a;
}

.intro-popover-panel::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid rgba(63, 107, 82, 0.15);
  border-top: 1px solid rgba(63, 107, 82, 0.15);
  transform: rotate(45deg);
}

.intro-popover-panel p {
  margin-top: 0.85rem;
  margin-bottom: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

.intro-popover-panel p:first-child {
  margin-top: 0;
}

@keyframes intro-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-popover-panel {
    animation: none;
  }
}


/* Force everything to use your Barlow font by default */
/* Field backdrop — matches sure.css's .main-container so both pages share
   one atmosphere instead of two different stock photos. See sure.css for
   the full rationale. */
.main-container {
  font-family: 'Barlow', sans-serif;
  -webkit-font-smoothing: antialiased;

  background-color: #96c0a3;
  background-image:
    radial-gradient(circle at 85% 6%, rgba(234, 181, 60, 0.16), transparent 40%),
    radial-gradient(circle at 10% 98%, rgba(31, 58, 42, 0.3), transparent 46%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 34px),
    linear-gradient(180deg, #7fac8e 0%, #96c0a3 45%, #b7d4bd 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

.square {
    position: relative;   
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible; /* Allows balls to pulse outside if needed */
    
}

.main_pill {
    background: linear-gradient(180deg, #91a0a8 0%, #4facfe 100%);
    color: white;
    font-size: large;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    z-index: 2;
    border: white 3px solid;
    box-shadow: 0 10px 15px rgba(112, 203, 255, 0.3); /* Optional glow */

}

.bubble-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem 1.5rem;
    padding: 2rem 1rem;
}

/* Every bubble shares one neutral, glassy fill — color no longer encodes
   category (that clashed with the tan/blue/lavender filter buttons above).
   Category identity now lives only in the small tag pill beneath the ball. */
.bubble-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    user-select: none;
}

.ball {
    width: 210px;
    height: 210px;
    background: linear-gradient(155deg, #ffffff 0%, #f2efe4 100%);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 22px;
    color: #2d3436;
    border: white 3px solid;
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 600;
    transition: box-shadow 0.3s ease, filter 0.3s ease;
}

.bubble-item:hover .ball {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    filter: brightness(1.04) saturate(1.05);
}

.bubble-tag {
    display: inline-block;
    max-width: 190px;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    color: #fff;
    font-family: "Barlow Condensed", "Barlow", sans-serif;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Filter pill buttons — shared base */
.filter-pill {
    background-color: rgba(255, 255, 255, 0.22);
    border: 1.5px solid rgba(255, 255, 255, 0.5) !important;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1.05rem;
    padding: 0.5rem 1.3rem;
    transition: all 0.25s ease;
}

.filter-pill:hover {
    background-color: rgba(255, 255, 255, 0.38);
    border-color: rgba(255, 255, 255, 0.7) !important;
    color: white;
}

/* Checked states pull from the page's own palette instead of a generic
   pastel triad — Forest (brand green, --step-done) for Development Area,
   Sun (brand gold, --step-current) for Crisis Type, and Dusk, a new
   complementary indigo, for Target Group. Same chip shape as before; the
   colors now actually belong to this page. */
/* Crisis Stage sits outside that triad, so it takes Clay — a warm terracotta
   that reads as a separate axis from Forest/Sun/Dusk. */
.btn-check:checked + .filter-pill.filter-stage {
    background: linear-gradient(135deg, #b4614a, #98493a);
    border-color: #7d382b !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-check:checked + .filter-pill.filter-dev {
    background: linear-gradient(135deg, #4c7a61, #3f6b52);
    border-color: #2c4d3a !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-check:checked + .filter-pill.filter-crisis {
    background: linear-gradient(135deg, #eab53c, #cf9526);
    border-color: #a97a1a !important;
    color: #4a3610;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-check:checked + .filter-pill.filter-target {
    background: linear-gradient(135deg, #5a63ab, #3f4a86);
    border-color: #2f386b !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ── Modal ──
   Colour identity lives in one custom property, --hero-color, set once on
   the modal_data wrapper (good.html) from the action's category. Every
   accent below — the hero ribbon, section-label dashes, case-card border —
   reads from it, so the whole modal stays visually tied to its category
   without repeating inline colour lookups per element. */

.modal-styled {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    font-family: 'Barlow', sans-serif;
}

/* The backdrop is tinted toward the site's own deep pine-ink rather than
   Bootstrap's neutral black, so the dim behind the modal still reads as
   part of the same green-toned page instead of a generic dark scrim. */
.modal-backdrop {
    background-color: #14241b;
}

.modal-backdrop.show {
    opacity: 0.78;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 34px;
    height: 34px;
    padding: 0;
    background-color: rgba(20, 32, 25, 0.55);
    border-radius: 50%;
    opacity: 1;
    /* Bootstrap's btn-close X is a dark background-image; invert it to
       white so it reads on a photo or the colour placeholder alike. */
    filter: invert(1) grayscale(100%) brightness(200%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.modal-close-btn:hover {
    background-color: rgba(20, 32, 25, 0.8);
    transform: scale(1.06);
}

/* Hero image band — always reserves the space, whether or not the action
   has a photo yet, so the layout never shifts once real images land. */
.modal-hero {
    position: relative;
    height: clamp(180px, 26vw, 280px);
    overflow: hidden;
    background: var(--sure-cream-edge);
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-hero-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    background-color: var(--hero-color, #9fc7aa);
    background-image:
        linear-gradient(155deg, rgba(255, 255, 255, 0.18), transparent 45%),
        linear-gradient(340deg, rgba(0, 0, 0, 0.32), transparent 55%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 28px);
}

.modal-hero-icon {
    color: rgba(255, 255, 255, 0.8);
}

.modal-hero-caption {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}

.modal-hero-category {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(20, 32, 25, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    color: #fff;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.modal-hero-category::before {
    content: "";
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--hero-color, #9fc7aa);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

/* Same dark-glass treatment as .modal-close-btn (never the category colour
   itself), so this stays visible whether it's sitting on a photo or on the
   placeholder, which is filled with that same category colour. */
.modal-hero-download {
    position: absolute;
    top: 16px;
    right: 58px;
    z-index: 10;
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background-color: rgba(20, 32, 25, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.modal-hero-download:hover,
.modal-hero-download:focus-visible {
    background-color: rgba(20, 32, 25, 0.85);
    color: #fff;
    transform: scale(1.06);
}

.modal-title {
    font-family: "Barlow", sans-serif;
    font-weight: 800;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
    line-height: 1.15;
    color: var(--sure-ink);
}

.modal-context-tag {
    display: inline-flex;
    align-items: center;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sure-ink-soft);
    border: 1px solid var(--sure-cream-edge);
    border-radius: 999px;
    padding: 0.22rem 0.7rem;
    margin: 0 0.4rem 0.4rem 0;
}

.modal-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    color: #fff;
    letter-spacing: 0.03em;
    text-transform: capitalize;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section-label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--sure-ink-soft);
    margin-bottom: 0.75rem;
}

.modal-section-label::before {
    content: "";
    width: 18px;
    height: 2px;
    flex-shrink: 0;
    border-radius: 2px;
    background: var(--hero-color, var(--step-done));
}

.modal-list-group + .modal-list-group {
    margin-top: 1.1rem;
}

.modal-list-heading {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--sure-ink, #2b2b2b);
    margin-bottom: 0.15rem;
}

.modal-list {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.modal-list li {
    padding: 0.4rem 0;
    line-height: 1.65;
    color: #444;
    font-size: 0.95rem;
}

.modal-list li::marker {
    color: #aaa;
}

.modal-case-card {
    background-color: var(--sure-cream);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--hero-color, #9fc7aa);
}

/* Placeholder shown while an action is still waiting for a real case example,
   so the section keeps its place in the layout instead of vanishing. */
.modal-case-card.is-pending {
    background-color: transparent;
    border: 1px dashed var(--sure-cream-edge);
    border-left: 4px solid var(--sure-cream-edge);
}

.modal-case-pending-lead {
    font-family: "Barlow Condensed", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #7a8f80;
    margin-bottom: 0.25rem;
}

.modal-case-pending-text {
    color: #8a8a8a;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 46rem;
}

.modal-quote {
    border-left: 3px solid #c8c8c8;
    padding: 0.75rem 1.1rem;
    margin: 1rem 0;
    color: #5a5a5a;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.65;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0 8px 8px 0;
}

.modal-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Each linked source is a self-contained row so a long list of resources
   still scans as a set of distinct, obviously clickable items. */
.modal-source-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--sure-cream-edge, #e4ddd0);
    border-radius: 8px;
    background-color: var(--sure-cream, #faf7f1);
    color: #2d5f74;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.45;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.modal-source-link:hover,
.modal-source-link:focus-visible {
    border-color: var(--hero-color, #9fc7aa);
    background-color: #fff;
    color: #1f3a2a;
}

.modal-source-title {
    text-decoration: underline;
    text-decoration-color: rgba(45, 95, 116, 0.3);
    text-underline-offset: 3px;
}

.modal-source-icon {
    flex-shrink: 0;
    opacity: 0.55;
}

.modal-source-link:hover .modal-source-icon {
    opacity: 1;
}

/* Sources that are citations rather than links (no URL in actions.json):
   no box, no link affordance - they are references, not destinations. */
.modal-source-plain {
    display: block;
    padding: 0.35rem 0.85rem;
    color: #6a6a6a;
    font-size: 0.9rem;
    line-height: 1.55;
}

.modal-close-footer {
    background-color: var(--sure-cream);
    color: var(--sure-ink);
    border: 1px solid var(--sure-cream-edge);
    border-radius: 10px;
    padding: 0.65rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.modal-close-footer:hover {
    background-color: var(--sure-cream-edge);
    color: var(--sure-ink);
}

.modal-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--hero-color, var(--step-done));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem;
    font-weight: 700;
    font-size: 0.95rem;
    transition: filter 0.2s ease, transform 0.1s ease;
}

.modal-download-btn:hover,
.modal-download-btn:focus-visible {
    /* Bootstrap's own .btn:hover rule sets background-color at the same
       specificity as our base rule's `background` shorthand, and it loses
       to nothing here unless we redeclare it - otherwise hover falls back
       to Bootstrap's transparent default and the button vanishes into the
       cream footer. Darken rather than brighten: brightening a saturated
       category colour risks washing it out toward that cream background,
       which would make the button read as "disappearing" instead of
       active. Darkening always keeps contrast with the white label. */
    background-color: var(--hero-color, var(--step-done));
    filter: brightness(0.88);
    color: #fff;
}

.modal-download-btn:active {
    transform: scale(0.98);
}

/* target the specific ID to avoid affecting other offcanvases */
#offcanvasScrolling {
    width: 50vw; /* Set your desired width */
}

/* OR use a percentage for responsiveness */
.offcanvas-start {
    width: 40% !important; 
}

/* On small screens (mobile), you might want it to be full width */
@media (max-width: 576px) {
    .offcanvas-start {
        width: 100% !important;
    }
}