/* analytics-v2.css
   Goal: mirror AI Workspace brand modules, reduce padding, create hero tier + wide/short tier,
   improve scroll + responsive behavior, and make charts look like product features.
*/

:root {
  --vs-bg: #f6f8fb;
  --vs-surface: #ffffff;
  --vs-surface-2: #fbfcff;
  --vs-border: rgba(16, 24, 40, 0.10);
  --vs-border-strong: rgba(16, 24, 40, 0.16);
  --vs-shadow: 0 14px 40px rgba(16, 24, 40, 0.08);
  --vs-shadow-soft: 0 10px 24px rgba(16, 24, 40, 0.06);

  --vs-radius-lg: 18px;
  --vs-radius-md: 14px;
  --vs-radius-sm: 12px;

  --vs-pad-lg: 20px;
  --vs-pad-md: 16px;
  --vs-pad-sm: 12px;

  --vs-gap-lg: 24px;
  --vs-gap-md: 16px;
  --vs-gap-sm: 12px;

  --vs-text: #0b1220;
  --vs-muted: rgba(11, 18, 32, 0.70);

  --vs-accent: #4fd1ff;
  --vs-accent-2: #7c5cff;
}

/* Page + container */
.vs-page.vs-analytics {
  background: var(--vs-bg);
}

.vs-analytics .vs-container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

/* Page header - Condensed and aligned with header */
.vs-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--vs-gap-lg);
  padding: 12px 0 8px;
  padding-left: var(--header-padding-x, var(--page-gutter, 18px));
  margin-left: calc(-1 * var(--header-padding-x, var(--page-gutter, 18px)));
  max-width: var(--vs-maxw, var(--page-max-width, 1200px));
  margin-right: auto;
  margin-top: 0;
}

.vs-pagehead h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.vs-pagehead p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--vs-muted);
}

.vs-pagehead__controls {
  display: flex;
  align-items: flex-end;
  gap: var(--vs-gap-md);
  flex-wrap: wrap;
  justify-content: flex-start; /* Left align to match content below */
}

.vs-control-group {
  display: flex;
  align-items: flex-end;
  gap: var(--vs-gap-md);
}

.vs-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 14px;
}

.vs-metric {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--vs-shadow-soft);
}

.vs-metric__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(79, 209, 255, 0.12);
  border: 1px solid rgba(79, 209, 255, 0.28);
  color: var(--vs-accent);
  flex: 0 0 auto;
}

.vs-metric__icon rect {
  fill: currentColor;
}

.vs-metric__label {
  font-size: 11px;
  color: rgba(11, 18, 32, 0.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vs-metric__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--vs-text);
}

.vs-control label {
  display: block;
  font-size: 12px;
  color: var(--vs-muted);
  margin-bottom: 6px;
}

/* Subnav */
.vs-subnav {
  position: sticky;
  top: 64px;
  z-index: 5;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px;
  margin: 6px 0 16px;
  border: 1px solid var(--vs-border);
  background: rgba(255, 255, 255, 0.80);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  box-shadow: var(--vs-shadow-soft);
  align-items: center;
}

.vs-subnav__item {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: rgba(11, 18, 32, 0.80);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vs-subnav__item .signal-mark-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.vs-subnav__item:hover .signal-mark-inline,
.vs-subnav__item[aria-current="true"] .signal-mark-inline,
.vs-subnav__item.is-active .signal-mark-inline {
  opacity: 1;
}

.vs-subnav__item:hover {
  border-color: var(--vs-border);
  background: rgba(79, 209, 255, 0.08);
}

.vs-subnav__action {
  margin-left: auto;
  flex-shrink: 0;
}

.vs-subnav__action + .vs-subnav__action {
  margin-left: 8px;
}

.vs-subnav__item--muted {
  color: rgba(11, 18, 32, 0.55);
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.vs-subnav__item[aria-current="true"],
.vs-subnav__item.is-active {
  background: rgba(79, 209, 255, 0.14);
  border-color: rgba(79, 209, 255, 0.32);
  color: var(--vs-text);
  font-weight: 600;
}

/* Sections */
.vs-section {
  margin-top: 18px;
  scroll-margin-top: 100px; /* Account for header + subnav for smooth scroll */
}

/* Tighter spacing between Activity Timeline and Heuristic Trends */
.vs-section--tight {
  margin-top: 8px !important;
  margin-bottom: 0 !important;
}

/* Ensure the last section before footer has proper spacing */
#sec-heuristics-trends {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Ensure Evidence section is visible and responsive */
#sec-evidence {
  margin-top: var(--vs-gap-lg);
  padding-bottom: var(--vs-gap-lg, 1.5rem);
  min-height: 0;
  margin-bottom: var(--vs-gap-md, 1rem);
}

#activityTimelineModule {
  margin-bottom: 0;
}

.vs-sectionhead {
  margin: 6px 0 10px;
}

.vs-sectionhead h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.vs-sectionhead p {
  margin: 6px 0 0;
  color: var(--vs-muted);
  font-size: 13px;
}

/* Grids */
.vs-grid {
  display: grid;
  gap: var(--vs-gap-lg);
}

.vs-grid--hero {
  grid-template-columns: 1.35fr 1fr;
  align-items: stretch;
}

.vs-grid--wide {
  grid-template-columns: 1fr;
}

.vs-grid--stack {
  grid-template-columns: 1fr;
}

/* Modules */
.vs-module {
  border: 1px solid var(--vs-border);
  background: var(--vs-surface);
  border-radius: var(--vs-radius-lg);
  box-shadow: var(--vs-shadow-soft);
  overflow: hidden;
}

.vs-module--hero {
  box-shadow: var(--vs-shadow);
}

.vs-module__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--vs-gap-md);
  padding: 12px var(--vs-pad-lg);
  border-bottom: 1px solid rgba(16, 24, 40, 0.06);
  background: linear-gradient(180deg, rgba(79, 209, 255, 0.035), rgba(124, 92, 255, 0.015));
}

.vs-module__head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.vs-badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(79, 209, 255, 0.25);
  background: rgba(79, 209, 255, 0.10);
  color: rgba(11, 18, 32, 0.7);
}

.vs-module__title {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.vs-module__sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--vs-muted);
  line-height: 1.25;
}

.vs-module__head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vs-module__head-right .vs-btn {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.heuristic-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.heuristic-card {
  border: 1px solid var(--ts-card-border);
  border-radius: 18px;
  background: #fff;
  padding: 1rem 1.1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.heuristic-card__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.heuristic-card__title {
  font-weight: 600;
  color: var(--ts-text);
}

.heuristic-card__category {
  font-size: 0.85rem;
  color: var(--ts-muted);
}

.heuristic-card__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.heuristic-card__count {
  font-weight: 700;
  color: var(--ts-primary);
}

.heuristic-card__label {
  font-size: 0.75rem;
  color: var(--ts-muted);
}

.heuristic-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.heuristic-pill {
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  background: rgba(76, 201, 240, 0.12);
  color: var(--ts-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.heuristic-card__evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.heuristic-card__evidence.is-muted {
  color: var(--ts-muted);
  font-size: 0.8rem;
}

/* Authority Summary Card Styles */
.authority-summary-card {
  transition: all 0.2s ease;
}

.authority-summary-toggle {
  transition: opacity 0.2s ease;
}

.authority-summary-toggle:hover {
  opacity: 0.8;
}

.authority-summary-details {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.authority-toggle-icon {
  user-select: none;
}

.authority-domains-toggle {
  width: 100%;
  text-align: left;
  background: rgba(79, 209, 255, 0.08);
  border: 1px solid rgba(79, 209, 255, 0.22);
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ts-text);
  border-radius: 10px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.authority-domains-toggle:hover {
  background: rgba(79, 209, 255, 0.14);
  border-color: rgba(79, 209, 255, 0.35);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.authority-toggle-label {
  flex: 1 1 auto;
}

.authority-toggle-action {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ts-muted);
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 999px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.65);
}

.authority-domains-toggle[aria-expanded="false"] .authority-toggle-action {
  color: rgba(99, 102, 241, 0.9);
  border-color: rgba(99, 102, 241, 0.3);
}

.authority-toggle-icon {
  font-size: 0.8rem;
  color: var(--ts-muted);
  transition: transform 0.2s ease;
}

.heuristic-chip {
  border-radius: 8px;
  padding: 0.2rem 0.5rem;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.75rem;
}

.heuristic-trends__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 8px 0 12px;
}

.heuristic-trends__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Mobile: Convert chips to dropdown */
@media (max-width: 768px) {
  .heuristic-trends__chips {
    display: none !important; /* Hide chips on mobile */
  }
  
  .heuristic-trends__controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 4px 0 8px; /* Reduce margin on mobile to save space */
  }
  
  /* Show dropdown on mobile - proper dropdown styling */
  .heuristic-trends__dropdown {
    display: block !important;
    visibility: visible !important;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d6e4f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23020617' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
    padding-right: 36px;
  }
  
  .heuristic-trends__dropdown:focus {
    outline: 2px solid rgba(14, 165, 233, 0.5);
    outline-offset: 2px;
    border-color: #0ea5e9;
  }
  
  .heuristic-trends__hint {
    font-size: 0.75rem;
    margin-top: 4px;
  }
}

.heuristic-trends__chip {
  border: 1px solid #d6e4f0;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  background: #f8fbff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.heuristic-trends__chip.is-active {
  border-color: rgba(14, 165, 233, 0.6);
  background: rgba(14, 165, 233, 0.12);
  color: var(--ts-primary);
}

.heuristic-trends__chip.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.heuristic-trends__hint {
  font-size: 0.8rem;
  color: var(--ts-muted);
}

.heuristic-trends__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.is-hidden {
  display: none !important;
}

.vs-btn__icon {
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
}

.vs-module__body {
  padding: var(--vs-pad-md) var(--vs-pad-lg);
}

/* Chart height controls */
.vs-chart {
  padding: var(--vs-pad-md) var(--vs-pad-lg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vs-chart--tall {
  height: 420px;
}

.vs-chart--medium {
  height: 360px;
}

.vs-chart--short {
  height: 230px;
}

.vs-chart__mount {
  flex: 1;
  min-height: 0;
}

.vs-chart > canvas,
.vs-chart > .vs-chart__mount {
  width: 100%;
  height: 100%;
}

.vs-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Legend */
.vs-legend--inline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center; /* Vertically center all items */
  justify-content: flex-start; /* Align items to start */
  margin-top: 0; /* Remove top margin - spacing handled by #graphLegend */
  color: rgba(11, 18, 32, 0.75);
  font-size: 12px;
  padding: 0 var(--vs-pad-lg) var(--vs-pad-md);
  min-height: 48px; /* Increased for better vertical centering */
}

.vs-legend__label {
  display: inline-flex;
  align-items: center; /* Vertically center label content */
  justify-content: center; /* Horizontally center label text */
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(79, 209, 255, 0.12);
  border: 1px solid rgba(79, 209, 255, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 10px;
  font-weight: 600;
  color: rgba(11, 18, 32, 0.55);
  height: fit-content; /* Allow label to size naturally */
  line-height: 1.2; /* Ensure consistent line height for vertical centering */
}

/* Ensure legend content items are vertically centered */
#graphLegendContent {
  display: flex;
  align-items: center; /* Vertically center all cluster items */
  gap: 8px;
  flex-wrap: wrap;
}

#graphLegend {
  border-top: 1px solid rgba(16, 24, 40, 0.06);
  background: transparent;
  margin: 0;
  margin-top: var(--vs-pad-md, 16px); /* Add spacing above legend */
  padding-top: var(--vs-pad-md, 16px); /* Add padding for vertical centering */
  display: flex;
  align-items: center; /* Vertically center the entire legend container */
  min-height: 48px; /* Ensure consistent height for vertical centering */
}

#graphLegendContent {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center; /* Vertically center items within content */
}

.vs-chart__mount {
  width: 100%;
  height: 100%;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 8px;
}

.dot--blue {
  background: rgba(64, 131, 255, 0.90);
}

.dot--purple {
  background: rgba(124, 92, 255, 0.90);
}

/* Inline controls */
.vs-inline-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  background: rgba(255, 255, 255, 0.65);
  height: 32px;
}

.vs-inline-controls input[type="range"] {
  appearance: none;
  height: 3px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  outline: none;
  width: 90px;
}

@media (min-width: 1200px) {
  #skillGraphModule .vs-module__head-right {
    flex-wrap: nowrap;
    gap: 8px;
  }

  #skillGraphModule .vs-inline-controls input[type="range"] {
    width: 70px;
  }
}

.insights-shell[data-logbook-state="expanded"] #skillGraphModule .vs-module__head {
  flex-wrap: wrap;
  align-items: flex-start;
}

.insights-shell[data-logbook-state="expanded"] #skillGraphModule .vs-module__head-left {
  flex: 1 1 100%;
}

.insights-shell[data-logbook-state="expanded"] #skillGraphModule .vs-module__head-right {
  width: 100%;
  justify-content: flex-start;
}

.vs-inline-controls input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vs-accent-2);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
  border: 2px solid #fff;
}

.vs-inline-controls input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--vs-accent-2);
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}

.vs-inline-label {
  font-size: 12px;
  color: rgba(11, 18, 32, 0.70);
  white-space: nowrap;
}

.vs-inline-value {
  font-size: 12px;
  color: rgba(11, 18, 32, 0.8);
  min-width: 40px;
  text-align: right;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(79, 209, 255, 0.12);
  border: 1px solid rgba(79, 209, 255, 0.25);
}

/* Tables + horizontal scroll */
.vs-scroll-x {
  position: relative;
  overflow-x: auto;
  overflow-y: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  max-height: 260px;
}

.vs-scroll-fade {
  position: absolute;
  right: 0;
  top: 58px;
  bottom: 18px;
  width: 42px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.vs-scroll-hint {
  font-size: 11px;
  color: rgba(11, 18, 32, 0.55);
  margin-top: 6px;
  text-align: right;
}

.vs-analytics .correlation-matrix-table {
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

.vs-module--wide .vs-scroll-x {
  max-height: 260px;
}

.vs-module--wide .vs-chart--short {
  height: 230px;
}

.vs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  font-size: 12.5px;
}

.vs-table--compact th,
.vs-table--compact td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(16, 24, 40, 0.08);
  white-space: nowrap;
}

.vs-table--compact th {
  position: sticky;
  top: 0;
  background: var(--vs-surface-2);
  z-index: 1;
  text-align: left;
  color: rgba(11, 18, 32, 0.78);
}

.vs-table--compact tr:hover td {
  background: rgba(79, 209, 255, 0.06);
}

.vs-table--compact th:first-child,
.vs-table--compact td:first-child {
  position: sticky;
  left: 0;
  background: var(--vs-surface);
  z-index: 2;
  border-right: 1px solid rgba(16, 24, 40, 0.06);
}

/* Collapsible section */
[data-collapsible].is-collapsed {
  display: none;
}

/* Responsive - MacBook Pro 13-inch with extension side panel (typically 1280-1440px viewport) */
/* When extension side panel is open (~400px), available width is ~880-1040px */
@media (max-width: 1440px) {
  /* Account for extension side panel when open */
  .vs-analytics .vs-container {
    max-width: 100%;
    padding-left: var(--header-padding-x, var(--page-gutter, 18px));
    padding-right: var(--header-padding-x, var(--page-gutter, 18px));
  }
  
  .vs-pagehead {
    flex-wrap: wrap;
    gap: var(--vs-gap-md);
  }
  
  .vs-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  
  .vs-grid--hero {
    grid-template-columns: 1fr;
    gap: var(--vs-gap-md);
  }
  
  .vs-module--hero {
    min-height: auto;
  }
  
  .vs-module__head {
    flex-wrap: wrap;
    gap: var(--vs-gap-sm);
  }
  
  .vs-module__head-right {
    flex-wrap: wrap;
    gap: var(--vs-gap-sm);
  }
  
  .vs-inline-controls {
    flex: 1 1 auto;
    min-width: 120px;
  }
}

/* Tablet and smaller */
@media (max-width: 980px) {
  .vs-grid--hero {
    grid-template-columns: 1fr;
  }

  .vs-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vs-subnav {
    top: 56px;
  }

  .vs-chart--tall {
    height: 360px;
  }

  .vs-chart--medium {
    height: 360px;
  }
}

/* Mobile breakpoint - covers most mobile devices */
@media (max-width: 768px) {
  .vs-pagehead {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px var(--header-padding-x, var(--page-gutter, 18px)) 8px !important;
    margin-left: 0 !important;
    max-width: 100% !important;
  }

  .vs-subnav {
    overflow-x: auto;
  }

  .vs-metrics {
    grid-template-columns: 1fr;
  }

  .vs-module__head {
    padding: 14px 14px;
  }

  .vs-module__body {
    padding: 14px 14px;
  }

  .vs-chart--tall,
  .vs-chart--medium {
    height: 320px !important;
    min-height: 320px !important;
  }

  .vs-chart--short {
    height: 220px !important;
  }
  
  /* Ensure Activity Timeline has same height as Heuristic Trends on mobile */
  /* Activity Timeline has nested structure: .vs-module__body > .vs-chart */
  #activityTimelineModule .vs-module__body .vs-chart.vs-chart--medium {
    height: 320px !important;
    min-height: 320px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* Heuristic Trends has direct structure: .vs-module__body.vs-chart */
  #heuristicTrendsModule .vs-module__body.vs-chart.vs-chart--medium {
    height: 320px !important;
    min-height: 320px !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* Ensure chart mount containers fill the height */
  #activityTimelineModule .vs-chart__mount,
  #heuristicTrendsModule .vs-chart__mount {
    height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 auto !important;
  }
  
  /* Ensure canvas elements fill their containers */
  #activityTimelineModule canvas,
  #heuristicTrendsModule canvas {
    height: 100% !important;
    max-height: 100% !important;
  }
  
  /* Evidence section mobile adjustments */
  #sec-evidence {
    padding-bottom: var(--ts-spacing-md, 1rem);
    margin-bottom: var(--ts-spacing-lg, 1.5rem);
  }
  
  #sec-evidence .vs-module {
    margin-bottom: var(--ts-spacing-md, 1rem);
  }

  #skillGraphModule .vs-chart--tall {
    height: 360px !important;
    min-height: 360px !important;
  }
}

#skillGraphModule .vs-chart--tall {
  height: 480px;
}
