:root {
    /* main color palette and reusable design tokens */
    --bg: #fbfaf8;
    --bg-page: #f3efe8;
    --bg-card: #ffffff;
    --bg-soft: #f7f3ee;
    --accent: #f56600;
    --accent-soft: #fde6d2;
    --accent-strong: #d95d00;
    --purple: #522d80;
    --purple-dark: #3b1f5f;
    --text-main: #1f1f1f;
    --text-muted: #5f6368;
    --border-subtle: #d9d1c7;
    --border-strong: #b9ab98;
    --radius-xl: 1rem;
    --radius-lg: 0.8rem;
    --shadow-soft: 0 12px 28px rgba(82, 45, 128, 0.08);
    --shadow-subtle: 0 8px 20px rgba(82, 45, 128, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    /* uses a clean font stack with fallbacks */
    background: linear-gradient(to bottom, var(--bg-page) 0%, #f8f5f0 35%, #fbfaf8 100%);
    color: var(--text-main);
    min-height: 100vh;
    padding: 1.5rem;
    display: flex;
    justify-content: center;
}

.app {
    /* main dashboard container */
    min-height: calc(100vh - 3rem);
    width: 100%;
    max-width: 1200px;
    background: var(--bg);
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 1.25rem 1.75rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* user email and logout button area */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userEmail {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* top header/nav */

.top-nav {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 3px solid var(--accent);
}

.top-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--purple);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 0 3px rgba(245, 102, 0, 0.16);
}

.brand-logo img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.brand-text h1 {
    font-size: 1.2rem;
    letter-spacing: 0.01em;
    color: var(--purple);
    font-weight: 800;
}

.brand-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.top-controls {
    /* right-side controls in the header */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* id-badge styling for improved tooltip */
.id-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(82, 45, 128, 0.12);
    border-color: var(--border-strong);
    transition: all 0.2s ease;
}

/* tooltip container */
.id-badge::after {
    content: attr(data-tooltip); /* Pulls text from the data-tooltip attribute */
    position: absolute;
    bottom: 125%; /* Positions it above the badge */
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    
    /* Styling to match your cards */
    background-color: var(--purple);
    color: #ffffff;
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-family: var(--font-main); /* Ensure it's not monospace like the ID */
    white-space: nowrap;
    
    /* Effects */
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 100;
}

/* The Tooltip Arrow */
.id-badge::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border-width: 6px;
    border-style: solid;
    border-color: var(--purple) transparent transparent transparent;
    opacity: 0;
    transition: all 0.2s ease;
}

/* Show Tooltip on Hover */
.id-badge:hover::after,
.id-badge:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pill {
    /* small pill-shaped info box */
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.42rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: none;
}

.pill-label {
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--purple);
    font-weight: 700;
}

/* Minimal Dropdown Text */
.pill-select {
    appearance: none; 
    -webkit-appearance: none;
    border: none !important;           /* Strips any browser border */
    background-color: transparent !important; /* Strips any background */
    outline: none !important;          /* Removes the blue focus ring */
    box-shadow: none !important;
    
    /* Typography styling to make it look like a title */
    color: var(--purple);
    font-weight: 700;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    
    /* Just enough padding for a tiny custom arrow */
    padding: 0 1rem 0 0; 
    margin: 0;
    
    /* A smaller, thinner arrow to keep it minimal */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23522d80%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    transition: color 0.15s ease;
}

/* Subtle color swap on hover/focus, without changing the box */
.pill-select:hover, 
.pill-select:focus {
    color: var(--accent-strong);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%2210%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23d95d00%22%20stroke-width%3D%222.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%209l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
}

/* Ensure dropdown options have normal styling so they are readable */
.pill-select option {
    color: var(--text-main);
    font-weight: 400;
    background-color: var(--bg-card);
}

.pill-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: var(--accent-soft);
    color: var(--purple);
    border: 1px solid #f3c9ab;
}

/* main navbar */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.1rem;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.8rem;
    padding: 0.38rem 0.85rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
}

.active {
    /* active page in nav */
    background: #ffffff;
    border-color: var(--border-subtle);
    color: var(--accent-strong);
    box-shadow: 0 4px 10px rgba(82, 45, 128, 0.08);
}

.logout-btn {
    border: 1px solid var(--accent);
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
}

.logout-btn:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: #ffffff;
    box-shadow: none;
    transform: translateY(-1px);
}

.nav-cta {
    /* orange CTA button styling */
    font-size: 0.85rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: none;
    font-weight: 700;
    isolation: isolate;
    white-space: nowrap;
}

.nav-cta span {
    font-size: 0.9em;
}

/* main page layout */

.layout {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
    margin-top: 0.25rem;
}

.primary-column,
.secondary-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.section-title {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.section-title h2 {
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--purple);
}

.section-title p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.chip {
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-muted);
    cursor: pointer;
}

.chip--active {
    background: var(--accent-soft);
    color: var(--purple);
    border-color: #f3c9ab;
}

.chip span {
    opacity: 0.7;
    margin-right: 0.15rem;
}

/* shared card styling */

.card {
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-subtle);
    transition:
    box-shadow 0.18s ease-out,
    transform 0.18s ease-out,
    border-color 0.18s ease-out;
}

.card:hover {
    box-shadow: 0 14px 28px rgba(82, 45, 128, 0.12);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border-subtle);
}

.card-header h3 {
    font-size: 0.98rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--purple);
}

.card-header small {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.pill-mini {
    font-size: 0.7rem;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #fcfbf9;
    color: var(--text-muted);
}

/* reusable primary action button */
.btn-primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #ffffff;
    padding: 0.48rem 0.95rem;
    border-radius: 999px;
    font-size: 0.8rem;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    font-weight: 700;
}
/* subtle hover effect that lifts the button and intensifies the color */
.btn-primary:hover {
    transform: translateY(-1px);
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.btn-secondary {
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-muted);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-secondary:hover {
    background: var(--accent-soft);
    color: var(--purple);
}

/* conflict bar chart */

.chart-card {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

.chart-wrapper {
    margin-top: 0.3rem;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.4fr);
    gap: 1rem;
    align-items: center;
}

.chart-area {
    padding: 0.8rem 0.9rem 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
/*styling for the bar chart*/
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 1.2rem;
    height: 220px;
    padding-inline: 0.2rem;
}

.bar-group {
    /* each bar, label, and tooltip wrapper */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.bar-track {
    position: relative;
    width: 100%;
    max-width: 70px;
    height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.goal-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    border-top: 2px dashed rgba(82, 45, 128, 0.35);
    z-index: 1;
    pointer-events: none;
}

.bar {
    width: 100% !important;
    max-width: 50px;
    border-radius: 0.7rem 0.7rem 0.25rem 0.25rem;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(148, 163, 184, 0.4);
    z-index: 2;
    transition:
    height 0.25s ease,
    /*background 0.2s ease,*/
    box-shadow 0.15s ease-out,
    transform 0.15s ease-out;
}

.bar--relationship {
    background: linear-gradient(180deg, #ef4444, #fecaca);
}

.bar--process {
    background: linear-gradient(180deg, #f97316, #fed7aa);
}

.bar--task {
    background: linear-gradient(180deg, #22c55e, #bbf7d0);
}

/* gradient for bar values to represent status
/*.bar--good {
    background-image: 
    inherit,
    linear-gradient(180deg, #22c55e, #bbf7d0) !important;
    background-blend-mode: normal;
}

.bar--bad {
    background-image: 
    inherit,
    linear-gradient(180deg, #ef4444, #fecaca) !important;
    background-blend-mode: normal;
}
    */


/*changes colors of bars depending on good or bad scores
.bar-value--good {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.bar-value--bad {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}*/

.bar-value {
    /* small value label shown above each bar */
    position: absolute;
    top: -1.4rem;
    font-size: 0.7rem;
    color: var(--text-main);
    background: #ffffff;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 5px rgba(82, 45, 128, 0.12);
    white-space: nowrap;
    transition:
    background-color 0.15s ease-out,
    color 0.15s ease-out,
    border-color 0.15s ease-out;
}

.bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 110px;
}

.chart-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    font-size: 0.8rem;
}

.legend-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.legend-pill {
    /*display: inline-flex;*/
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Inline "Learn More" link */
.learn-more-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    margin-left: 6px;
    transition: color 0.2s ease;
}

.learn-more-link:hover {
    color: var(--accent-deep);
    text-decoration: underline;
}

/* Metadata shape icons */

.legend-shape {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    flex-shrink: 0;
}
/*different shapes to represent the different types of conflict
is helpful for a possibly color blind audience but more of a nice visual touch than anything
removing confusing in as many ways as possible is our goal
*/
.shape-triangle { 
    background-color: #522d80;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%); 

}

.shape-rectangle { 
    background-color: #f97316;
    border-radius: 2px; 
}

.shape-circle { 
    background-color: #22c55e;
    border-radius: 50%; 
}

.guidance-text {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--purple) !important;
    display: block;
    margin-top: 0.2rem;
}

.stat-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
/* small stat boxes used in the pulse score card and chatbot card */
.stat-pill {
    flex: 1 1 130px;
    border-radius: 0.9rem;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    position: relative;
}

.stat-pill span {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.stat-pill strong {
    font-size: 0.86rem;
    color: var(--purple);
}

.trend-up {
    color: #16a34a;
}

.trend-down {
    color: #b91c1c;
}

/* signals/tags section */

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.25rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.26rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #f9f7f4;
    color: var(--text-muted);
}

.tag--rel {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #b91c1c;
}

.tag--proc {
    border-color: #fca5a5;
    background: #fee2e2;
    color: #b91c1c;
}

.tag--task {
    border-color: #86efac;
    background: #dcfce7;
    color: #166534;
}

.mini-list {
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.mini-list-item {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
}

.mini-list-item span:first-child {
    color: var(--text-muted);
}

.mini-list-item span:last-child {
    font-weight: 500;
    white-space: nowrap;
}

/* chatbot section */
/* overall chatbot card container */
.chatbot-card {
    height: 500px;
    display: flex;
    flex-direction: column;
}

.chatbot-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.chatbot-header-row h3 {
    font-size: 0.95rem;
    color: var(--purple);
}

.chatbot-mode {
    display: flex;
    gap: 0.3rem;
    font-size: 0.75rem;
    align-items: center;
}

.chatbot-mode span {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #f9f7f4;
    color: var(--text-muted);
    cursor: pointer;
}

.chatbot-mode span.active {
    border-color: #f3c9ab;
    background: var(--accent-soft);
    color: var(--purple);
}

.chat-reset {
    margin-left: 0.35rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
}
/* main chat area with messages and input */
.chat-window {
    flex: 1;
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    background: #f9f7f4;
    padding: 0.7rem 0.75rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: hidden;
}

.chatbot-description {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 0.6rem;
}

.chat-log {
    /* scrollable message area */
    flex: 1;
    overflow-y: auto;
    padding-right: 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.8rem;
}

.msg {
    max-width: 95%;
    padding: 0.5rem 0.65rem;
    border-radius: 0.8rem;
    line-height: 1.35;
}

.msg.system {
    background: #efefef;
    border: 1px dashed #f3c9ab;
    color: #4b5563;
    font-size: 0.78rem;
}

.msg.ai {
    align-self: flex-start;
    background: #ffffff;
    border-radius: 0.8rem 0.8rem 0.8rem 0.25rem;
    border: 1px solid #d9d1c7;
    color: var(--purple-dark);
}

.msg.user {
    align-self: flex-end;
    background: #ffffff;
    border-radius: 0.8rem 0.8rem 0.25rem 0.8rem;
    border: 1px solid #d9d1c7;
    color: #9a3412;
}

/* links inside AI messages */
.msg.ai a {
    color: #522d80;
    font-weight: 700;
    text-decoration: underline;
    word-break: break-word;
}

.msg.ai a:hover {
    opacity: 0.85;
}

.chat-input-row {
    margin-top: 0.45rem;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.chat-input-row textarea {
    flex: 1;
    resize: none;
    border-radius: 999px;
    min-height: 36px;
    max-height: 56px;
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-subtle);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.8rem;
    outline: none;
    font-family: inherit;
}

.chat-input-row textarea::placeholder {
    color: var(--text-muted);
}
/* send button next to the textarea */
.chat-input-row button {
    border: 1px solid var(--accent);
    border-radius: 999px;
    padding: 0.48rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--accent);
    color: #ffffff;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: none;
    font-family: inherit;
}

.chat-input-row button:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* team pulse section */

.pulse-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
    gap: 0.9rem;
    align-items: center;
}
/* main pulse score and meter on the left */
.pulse-main {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.pulse-score {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--purple);
}

.pulse-score small {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pulse-meter {
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #e7dfd4;
    overflow: hidden;
    margin-top: 0.2rem;/* container for the colored fill that indicates the score */
}

.pulse-fill {
    /* gradient meter fill from red to green */
    width: 68%;
    height: 100%;
    background: linear-gradient(90deg, #b5f0bb, #049b3b);
}

.pulse-side {
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-radius: 0.9rem;
    border: 1px dashed var(--border-strong);
    background: #fcfbf9;
    padding: 0.5rem 0.7rem;
}

.pulse-side strong {
    font-size: 0.8rem;
    color: var(--purple);
}

.pulse-side ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pulse-side li::before {
    content: "• ";
    color: var(--accent);
}

/* shared hover/transition effects */

.nav-link,
.nav-cta,
.pill,
.chip,
.tag,
.chat-input-row button,
.chat-reset,
.bar {
    transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    background-color 0.15s ease-out,
    border-color 0.15s ease-out,
    color 0.15s ease-out,
    opacity 0.15s ease-out;
}

.nav-link:hover {
    background: #ffffff;
    border-color: var(--border-subtle);
    color: var(--accent-strong);
    box-shadow: 0 4px 10px rgba(82, 45, 128, 0.08);
    transform: translateY(-1px);
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: none;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    filter: none;
}

.nav-cta:active {
    transform: translateY(0);
    box-shadow: none;
}
/* mainly to have lots of subtle hover effects on items*/
.pill:hover,
.chip:hover,
.chat-reset:hover {
    background: #ffffff;
    border-color: var(--border-strong);
    box-shadow: 0 4px 10px rgba(82, 45, 128, 0.08);
    transform: translateY(-1px);
}

.tag:hover {
    box-shadow: 0 4px 10px rgba(82, 45, 128, 0.08);
    transform: translateY(-1px);
}

.chat-input-row button:hover {
    transform: translateY(-1px);
    box-shadow: none;
    background: var(--accent-strong);
    border-color: var(--accent-strong);
}

.chat-input-row button:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* bar chart hover tooltips */

.bar-group:hover .bar {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(148, 163, 184, 0.35);
}

.bar-group:hover .bar-value {
    background: var(--purple);
    color: #ffffff;
    border-color: var(--purple);
}
/*hover boxes above the bars removed to reduce clutter but can be re-enabled if desired
.bar-group::before 
{
    
    content: attr(data-label);
    position: absolute;
    top: -3.1rem;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--purple);
    color: #ffffff;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 6px 14px rgba(59, 31, 95, 0.28);
    transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}
*/
/*
.bar-group::after {
    content: attr(data-detail);
    position: absolute;
    top: -1.4rem;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 0.35rem 0.55rem;
    max-width: 220px;
    border-radius: 0.55rem;
    background: var(--purple);
    color: #f8f5f0;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(59, 31, 95, 0.3);
    transition:
    opacity 0.15s ease-out,
    transform 0.15s ease-out;
}

.bar-group:hover::before,
.bar-group:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
    */
/* risk indicators and innovation potential hover*/
.stat-pill::after {
    content: attr(data-detail);
    position: absolute;
    top: 50%;
    left: 105%;
    transform: translateX(10px) translateY(-50%);
    padding: 0.45rem 0.75rem;
    min-width: 220px;
    max-width: 280px;
    border-radius: 0.55rem;
    background: var(--purple);
    color: #f8f5f0;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 10px 24px rgba(59, 31, 95, 0.3);
    transition: opacity 0.15s ease-out, transform 0.15s ease-out;
    z-index: 20;
}

.stat-pill:hover::after {
opacity: 1;
transform: translateX(0) translateY(-50%);
}

/* 1. Force the button to stay on top of the Driver.js overlay */
.nav-cta.driver-active-element {
    position: relative !important;
    z-index: 9999999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    /* Prevent the button from being compressed */
    flex-shrink: 0 !important; 
    min-width: max-content !important;
    /* Ensure the highlight isn't clipped by an inline-block parent */
    max-width: none !important;
}

/* 2. Prevent any parent from clipping the button while it's being highlighted */
:not(body):has(> .driver-active-element) {
    overflow: visible !important;
    contain: none !important; /* Some modern layouts use 'contain' which clips */
    filter: none !important;  /* Filters can create new stacking contexts */
}

/* 3. If your button contains an SVG, ensure the SVG isn't being squashed */
.nav-cta svg {
    overflow: visible !important;
    min-width: 1em; 
}

/* Target all parents of the active element and force horizontal visibility */
:not(body):has(> .nav-cta.driver-active-element) {
    overflow-x: visible !important;
    overflow-y: visible !important;
    width: auto !important; /* Prevent the container from squashing the highlight */
}

/* responsive layout */
/* allows for responsive adjustments for analytics */
@media (max-width: 960px) {
    body {
    padding: 1rem;
    }

    .app {
    padding: 1.1rem 1.2rem 1.2rem;
    border-radius: 1rem;
    }

    .layout {
    grid-template-columns: minmax(0, 1fr);
    }

    .pulse-card {
    grid-template-columns: minmax(0, 1fr);
    }

    .chart-wrapper {
    grid-template-columns: minmax(0, 1fr);
    }

    .chatbot-card {
    height: auto;
    min-height: 260px;
    }
}

@media (max-width: 640px) {
    .top-nav-row {
    flex-direction: column;
    align-items: flex-start;
    }

    .top-controls {
    justify-content: flex-start;
    }

    .main-nav {
    flex-direction: column;
    align-items: flex-start;
    }

    /* hide custom bar tooltips on smaller screens */
    .bar-group::before,
    .bar-group::after {
    display: none;
    }
}