/* ===== FONTS ===== */
@font-face {
  font-family: 'DT Getai Grotesk Display';
  src: url('/taxonomy/assets/DTGetaiGroteskDisplay-Black-WnMDOzuF.ttf') format('truetype'),
       url('/taxonomy/assets/DTGetaiGroteskDisplay-Black-DwXJjRPG.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Work Sans', sans-serif;
  min-height: 100vh;
  background: white;
  line-height: 1.6;
}

.font-display {
  font-family: 'DT Getai Grotesk Display', 'Archivo Black', sans-serif;
}

.font-body {
  font-family: 'Work Sans', sans-serif;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 3rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #d1d5db;
}

.header:not(:has(.site-title)) {
  justify-content: flex-end;
}

.header .header-buttons:only-child {
  margin-left: auto;
}

.site-title {
  font-size: 2.5rem;
  color: #f97316;
  cursor: pointer;
  text-decoration: none;
  font-weight: normal;
  letter-spacing: -0.025em;
}

.site-title.gradient-text {
  color: transparent !important;
}

.gradient-text {
  font-weight: bold;
  font-size: 2.5rem;
  background: linear-gradient(90deg, #FFCE7B, #E98708, #CD3735);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.site-title:hover {
  color: #ea580c;
}

.header-buttons {
  display: flex;
  gap: 0.75rem;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.btn-outline {
  color: #FFCE7B;
  border: 1px solid #FFCE7B;
  background: rgba(255, 255, 255, 0.8);
}

.btn-outline:hover {
  background: linear-gradient(135deg, #FFCE7B 80%);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary {
  background: linear-gradient(135deg, #FFCE7B 80%);
  color: white;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-filter {
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  color: #6b7280;
  background: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-filter:hover {
  background-color: #f9fafb;
}

/* ===== BACK NAV ===== */
.back-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.5rem 3rem;
}

.back-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 1.25rem;
  font-weight: 500;
}

.back-link:hover {
  color: #374151;
}

/* ===== SUB NAVIGATION ===== */
.sub-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem 3rem;
  border-bottom: 1px solid #e5e7eb;
}

.sub-nav-links {
  display: flex;
  justify-content: flex-start;
  gap: 2rem;
}

.sub-nav-link {
  color: #dc2626;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 1rem;
}

.sub-nav-link:hover,
.sub-nav-link.router-link-active {
  color: #b91c1c;
  transform: translateX(4px);
}

/* ===== GRADIENT UTILITIES ===== */
.gradient-blue-green    { background: linear-gradient(135deg, #60a5fa, #10b981); }
.gradient-purple-blue   { background: linear-gradient(135deg, #a78bfa, #3b82f6); }
.gradient-green-teal    { background: linear-gradient(135deg, #4ade80, #14b8a6); }
.gradient-orange-red    { background: linear-gradient(135deg, #fb923c, #ef4444); }
.gradient-pink-purple   { background: linear-gradient(135deg, #f472b6, #a855f7); }
.gradient-indigo-blue   { background: linear-gradient(135deg, #818cf8, #3b82f6); }
.gradient-red-orange    { background: linear-gradient(135deg, #f87171, #fb923c); }
.gradient-amber-yellow  { background: linear-gradient(135deg, #fbbf24, #eab308); }
.gradient-blue-purple   { background: linear-gradient(135deg, #2563eb, #7c3aed); }
.gradient-gray          { background: linear-gradient(135deg, #6b7280, #374151); }
.gradient-teal-cyan     { background: linear-gradient(135deg, #14b8a6, #06b6d4); }
.gradient-green-emerald { background: linear-gradient(135deg, #22c55e, #10b981); }
.gradient-yellow-orange { background: linear-gradient(135deg, #ca8a04, #ea580c); }
.gradient-amber-red     { background: linear-gradient(135deg, #d97706, #dc2626); }
.gradient-placeholder   { background: linear-gradient(135deg, #FFCE7B, #E98708, #CD3735); }

/* ===== TYPOGRAPHY ===== */
.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #CD3735;
  margin-bottom: 2rem;
  font-family: 'DT Getai Grotesk Display', 'Archivo Black', sans-serif;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.tag {
  padding: 0.25rem 0.75rem;
  background-color: #fecaca;
  color: #dc2626;
  border-radius: 9999px;
  font-size: 0.875rem;
}

.hidden {
  display: none;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  max-width: 640px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
  animation: fadeIn 0.2s ease-out;
}

.modal-content h2 {
  margin-top: 0;
  color: #2c1810;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.modal-content h3 {
  color: #2c1810;
  font-size: 1.1rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.modal-content p {
  color: #4a4a4a;
  margin: 0.5rem 0;
}

.modal-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.modal-content li {
  padding: 0.5rem 0;
  color: #4a4a4a;
  border-bottom: 1px solid #e5e5e5;
}

.modal-content li:last-child {
  border-bottom: none;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  line-height: 1;
  background: none;
  border: none;
}

.modal-close:hover {
  color: #ce3735;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ===== MAIN CONTENT ===== */
.main-content {
  padding: 2rem 3rem;
  width: 100%;
  box-sizing: border-box;
}

/* Analyses page gets a max-width constraint */
.main-content.analyses-content {
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== PAGE HEADER ===== */
.page-header {
  margin-bottom: 2.5rem;
}

.page-description {
  color: #6b7280;
  font-size: 1rem;
  max-width: 820px;
  line-height: 1.75;
  margin-top: 0.75rem;
}

/* ===== TECHNIQUE GALLERY (HomeView) ===== */
.technique-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.technique-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.technique-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.technique-card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.technique-card-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
}

.technique-card-name {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  text-align: center;
}

/* ===== TECHNIQUE MODAL ===== */
.technique-modal-obs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

/* ===== OBSERVATION CARD ===== */
.obs-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
}

.obs-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.obs-card.small {
  cursor: default;
}

.obs-card.small:hover {
  transform: none;
  box-shadow: none;
}

.obs-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #e5e7eb;
}

.obs-card-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: #e5e7eb;
}

.obs-card-info {
  padding: 0.5rem 0.75rem;
}

.obs-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.obs-card-app {
  font-size: 0.75rem;
  color: #6b7280;
}

/* ===== OBSERVATION GALLERY (ObservationsView) ===== */
.obs-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: center;
}

.filter-bar label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.filter-bar select {
  padding: 0.4rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-family: 'Work Sans', sans-serif;
  background: white;
  color: #374151;
  cursor: pointer;
}

.filter-bar select:focus {
  outline: none;
  border-color: #FFCE7B;
}

/* ===== APPLICATIONS VIEW ===== */
.apps-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  min-height: 60vh;
}

.apps-sidebar {
  border-right: 1px solid #e5e7eb;
  padding-right: 1.5rem;
}

.apps-sidebar-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.app-list-item {
  padding: 0.6rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.app-list-item:hover {
  background: #fef3c7;
  color: #92400e;
}

.app-list-item.active {
  background: linear-gradient(135deg, #FFCE7B, #E98708);
  color: white;
  font-weight: 600;
}

.app-detail {
  padding-left: 0.5rem;
}

.app-detail-name {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.app-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1rem;
}

.app-meta-item {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.app-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.app-meta-value {
  font-size: 0.875rem;
  color: #1f2937;
}

.app-detail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 300px;
  color: #9ca3af;
  font-size: 1rem;
  text-align: center;
}

/* ===== VIZ / ANALYSES ===== */
.viz-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.viz-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1.25rem;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 480px;
}

.canvas-wrapper-tall {
  position: relative;
  width: 100%;
  height: 600px;
}

.toggle-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.toggle-btn {
  padding: 0.5rem 1.25rem;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  background: white;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: 'Work Sans', sans-serif;
  transition: all 0.2s ease;
}

.toggle-btn.active {
  background: linear-gradient(135deg, #FFCE7B, #E98708);
  color: white;
  border-color: #E98708;
}

.toggle-btn:hover:not(.active) {
  background: #f9fafb;
}

.matrix-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  font-family: 'Work Sans', sans-serif;
}

.matrix-table th {
  background: #f9fafb;
  padding: 0.5rem 0.6rem;
  text-align: center;
  font-weight: 600;
  color: #374151;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
  font-size: 0.75rem;
}

.matrix-table th.row-header {
  text-align: left;
  min-width: 160px;
}

.matrix-table td {
  padding: 0.35rem 0.5rem;
  text-align: center;
  border: 1px solid #e5e7eb;
  font-weight: 500;
  transition: opacity 0.2s;
}

.matrix-table td:hover {
  opacity: 0.8;
  outline: 2px solid #CD3735;
}

.matrix-table td.row-label {
  text-align: left;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  padding: 0.4rem 0.75rem;
  background: #f9fafb;
}

.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 1.25rem;
}

.viz-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.825rem;
  color: #4b5563;
}

.viz-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chart-loading {
  text-align: center;
  padding: 4rem 2rem;
  color: #9ca3af;
  font-size: 1rem;
}

.chart-error {
  color: #dc2626;
  padding: 2rem;
  text-align: center;
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #9ca3af;
  font-style: italic;
}

.color-scale-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.color-scale-gradient {
  width: 120px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, #fff 0%, rgba(205, 55, 53, 0.8) 100%);
  border: 1px solid #e5e7eb;
}

/* ===== LOADING STATE ===== */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: #9ca3af;
  font-size: 1rem;
}

/* ===== OBSERVATION MODAL DETAILS ===== */
.obs-modal-image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
  max-height: 300px;
  object-fit: cover;
}

.obs-modal-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
  margin-top: 1rem;
}

.obs-modal-field {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.obs-modal-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.obs-modal-value {
  font-size: 0.875rem;
  color: #1f2937;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main-content { padding: 1.5rem 2rem; }
  .apps-layout { grid-template-columns: 220px 1fr; }
  .canvas-wrapper { height: 320px; }
  .canvas-wrapper-tall { height: 420px; }
}

@media (max-width: 768px) {
  .header { padding: 1.5rem; }
  .sub-nav { padding: 1rem 1.5rem; }
  .sub-nav-links { gap: 1.25rem; flex-wrap: wrap; }
  .main-content { padding: 1rem 1.5rem; }
  .apps-layout { grid-template-columns: 1fr; }
  .apps-sidebar { border-right: none; border-bottom: 1px solid #e5e7eb; padding-right: 0; padding-bottom: 1rem; }
  .technique-gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .obs-modal-meta { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .header { padding: 1rem; }
  .gradient-text { font-size: 1.75rem; }
  .site-title { font-size: 1.75rem; }
  .technique-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* === styles.css === */
.gradient-placeholder {
    background: linear-gradient(135deg, #FFCE7B, #E98708, #CD3735);
}

.modal.hidden {
    display: none;
}

@media (min-width: 768px) {
    .site-title { font-size: 2.5rem; }
}

@media (min-width: 1024px) {
    .header { padding: 2rem 3rem; }
    .back-nav { padding: 0.5rem 3rem; }
    .nav-bar { padding: 1.5rem 3rem; }
}

/* === home.css === */
.home-main {
  padding: 4rem 3rem;
  min-height: calc(100vh - 250px);
}

.dashboard-section {
  max-width: 1200px;
  margin: 0 auto;
}

.metrics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.metric-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 3px solid #dc2626;
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.metric-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(220, 38, 38, 0.2);
  border-color: #b91c1c;
}

.metric-number {
  font-family: "Archivo Black", sans-serif;
  font-size: 4.5rem;
  font-weight: 900;
  color: #dc2626;
  line-height: 1;
  margin-bottom: 1rem;
}

.metric-label {
  font-family: "Work Sans", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.75rem;
}

.metric-description {
  font-family: "Work Sans", sans-serif;
  font-size: 0.95rem;
  color: #6b7280;
  line-height: 1.6;
}

.home-content {
  max-width: 1400px;
  margin: 0 auto;
}

.home-placeholder {
  background: #e2e8f0;
  border-radius: 0.5rem;
  padding: 4rem;
  text-align: center;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.interaction-chart-section {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 2px solid #e5e7eb;
}

.sunburst-section {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding-top: 3rem;
  border-top: 2px solid #e5e7eb;
}

.sunburst-description {
  color: #4b5563;
  margin-bottom: 1.25rem;
}

.sunburst-wrapper {
  position: relative;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1rem;
}

.sunburst-loading {
  min-height: 1.5rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.sunburst-chart {
  width: 100%;
  max-width: 760px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.sunburst-tooltip {
  position: absolute;
  pointer-events: none;
  z-index: 20;
  display: none;
  max-width: 420px;
  background: rgba(17, 24, 39, 0.95);
  color: #f9fafb;
  font-size: 0.875rem;
  line-height: 1.4;
  border-radius: 0.5rem;
  padding: 0.5rem 0.625rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  white-space: normal;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-dropdown-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: white;
  border: 2px solid #d1d5db;
  color: #374151;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-btn:hover { border-color: #ffce7b; background: rgba(255, 206, 123, 0.05); }
.dropdown-btn[aria-expanded="true"] { border-color: #ffce7b; background: #ffce7b; color: #1f2937; }
.dropdown-btn::after { content: "▼"; font-size: 0.7rem; transition: transform 0.2s ease; }
.dropdown-btn[aria-expanded="true"]::after { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 250px;
  margin-top: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
}

.dropdown-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  gap: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.dropdown-option:last-child { border-bottom: none; }
.dropdown-option:hover { background-color: #f9fafb; }
.dropdown-option input[type="checkbox"] { cursor: pointer; width: 18px; height: 18px; accent-color: #ffce7b; }
.dropdown-option span { flex: 1; color: #374151; font-size: 0.95rem; }

.chart-container {
  background: white;
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
  min-height: 460px;
}

#techniquesChart {
  display: block;
  width: 100% !important;
  height: 420px !important;
  max-height: 500px;
}

@media (max-width: 1024px) {
  .metrics-container { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; }
  .metric-number { font-size: 3.5rem; }
}

@media (max-width: 768px) {
  .home-main { padding: 2rem 1.5rem; }
  .metrics-container { grid-template-columns: 1fr; gap: 1.5rem; }
  .metric-card { padding: 2rem 1.5rem; }
  .metric-number { font-size: 2.5rem; }
  .metric-label { font-size: 1.125rem; }
  .metric-description { font-size: 0.875rem; }
  .home-placeholder { padding: 2rem; }
  .interaction-chart-section { margin: 3rem auto 0; padding-top: 2rem; }
  .chart-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .chart-container { padding: 1.5rem; min-height: 380px; }
  .dropdown-menu { min-width: 200px; }
}

@media (max-width: 480px) {
  .home-main { padding: 1rem 1rem; }
  .metric-card { padding: 1.5rem 1rem; border-radius: 1rem; }
  .metric-number { font-size: 2rem; }
  .metric-label { font-size: 1rem; }
  .metric-description { font-size: 0.75rem; }
  .sub-nav-links { flex-direction: column; gap: 0.5rem; }
  .sub-nav-link { font-size: 0.875rem; }
}

/* === explore.css === */
.back-button {
    margin-bottom: 1rem;
}

.page-title-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tag-container {
    display: flex;
    gap: 0.5rem;
}

.section {
    margin-bottom: 4rem;
}

.gallery-header .section-title {
    margin-bottom: 0;
    padding: 0 0.25rem;
    line-height: 1;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.carousel-nav {
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.carousel-nav:hover { background: #f9fafb; border-color: #9ca3af; color: #374151; }

.carousel-container {
    display: flex;
    gap: 1rem;
    overflow: hidden;
    flex: 1;
    transition: transform 0.3s ease;
}

.carousel-item {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 0.5rem;
    overflow: hidden;
}

.carousel-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    background-color: #f0f0f0;
}

.gallery-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.gallery-buttons .btn,
.gallery-buttons .btn-filter {
    height: 36px;
    padding: 0 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
}

.filter-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-top: 0.25rem;
}

.filter-menu.show { display: block; }

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    cursor: pointer;
}

.filter-option:hover { background: #f9fafb; border-radius: 0.25rem; padding: 0.5rem; }
.filter-checkbox { width: 1rem; height: 1rem; cursor: pointer; accent-color: #FFCE7B; }
.filter-option label { font-size: 0.875rem; color: #374151; cursor: pointer; user-select: none; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.gallery-placeholder { width: 100%; height: 100%; background: #d1d5db; border-radius: 0.75rem; }

#modal-gif { width: 100%; border-radius: 8px; margin-bottom: 15px; }

@media (max-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .carousel-item { width: 160px; height: 120px; }
}

@media (max-width: 768px) {
    .page-title-section { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .gallery-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .carousel-wrapper { padding: 1rem; }
    .carousel-item { width: 140px; height: 100px; }
    .carousel-nav { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .carousel-container { gap: 0.5rem; }
    .carousel-item { width: 120px; height: 90px; }
}

/* === applications.css === */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.app-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.app-card:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }

.application-wrapper { overflow-x: auto; padding: 10px 0; }
.application-container { display: flex; gap: 20px; padding: 10px; }
.application-item { flex: 0 0 auto; text-align: center; }
.application-item img { width: 150px; height: 150px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 8px; }
.carousel-caption { font-size: 0.9rem; text-align: center; }

.app-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    border-radius: 0.75rem 0.75rem 0 0;
}

.app-info { padding: 1.5rem; }
.app-title { font-size: 1rem; font-weight: 600; color: #1f2937; margin: 0 0 1rem 0; line-height: 1.3; }
.app-buttons { display: flex; gap: 0.5rem; }

.btn-gifs,
.btn-more {
    padding: 0.4rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.btn-gifs { background: transparent; border-color: #FFCE7B; color: #FFCE7B; }
.btn-gifs:hover { background: #FFCE7B; color: white; }
.btn-more { background: #FFCE7B; border-color: #FFCE7B; color: white; }
.btn-more:hover { background: #f59e0b; border-color: #f59e0b; }

@media (max-width: 1024px) {
    .apps-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

@media (max-width: 768px) {
    .apps-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .app-image { height: 140px; }
    .app-info { padding: 1rem; }
}

@media (max-width: 480px) {
    .apps-grid { grid-template-columns: 1fr; }
}

/* === viz-charts.css === */
/* (already included in main.css above — classes like .viz-card, .canvas-wrapper, .matrix-table, etc.) */

/* === interaction-techniques.css === */
.tag-list {
    max-width: 800px;
    margin: 0 auto;
}

.tag-list ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-list li {
    background: #f0f0f0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.interaction-element {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.interaction-element:hover {
    background: #fecaca;
    color: #dc2626;
}

/* === tasks.css === */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.task-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.task-card:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transform: translateY(-2px); }
.task-icon { font-size: 1.5rem; margin-bottom: 1rem; }
.task-title { font-size: 1.25rem; font-weight: 600; color: #1f2937; margin: 0 0 0.5rem 0; }
.task-description { color: #6b7280; font-size: 0.875rem; line-height: 1.5; margin: 0 0 1.5rem 0; flex-grow: 1; }

.filters-section {
    margin: 2rem 0 3rem 0;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.filters-title { font-size: 1.25rem; font-weight: 600; color: #1f2937; margin: 0 0 1.5rem 0; }

.filter-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.filter-section { display: flex; flex-direction: column; gap: 0.75rem; }
.filter-title { font-size: 0.95rem; font-weight: 600; color: #374151; margin: 0; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filter-btn {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-btn:hover { border-color: #FFCE7B; background: rgba(255, 206, 123, 0.1); }
.filter-btn.active { background: #FFCE7B; border-color: #FFCE7B; color: #1f2937; font-weight: 600; }

@media (max-width: 1024px) {
    .tasks-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 768px) {
    .tasks-grid { grid-template-columns: 1fr; gap: 1rem; }
    .task-card { padding: 1.5rem; }
    .filter-container { grid-template-columns: 1fr; }
    .filters-section { padding: 1.5rem; }
}

/* === inputs.css === */
/* (shares structure with tasks.css above) */

/* === interface-elements.css === */
.elements-list { display: flex; flex-direction: column; gap: 1rem; }

.element-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.element-item:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transform: translateY(-1px); }
.element-icon { font-size: 1.5rem; flex-shrink: 0; }
.element-content { flex-grow: 1; }
.element-title { font-size: 1.125rem; font-weight: 600; color: #1f2937; margin: 0 0 0.25rem 0; }
.element-description { color: #6b7280; font-size: 0.875rem; line-height: 1.5; margin: 0; }

@media (max-width: 768px) {
    .element-item { padding: 1rem; flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* === feedback.css === */
.feedback-list { display: flex; flex-direction: column; gap: 1rem; }

.feedback-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.feedback-item:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transform: translateY(-1px); }
.feedback-icon { font-size: 1.5rem; flex-shrink: 0; }
.feedback-content { flex-grow: 1; }
.feedback-title { font-size: 1.125rem; font-weight: 600; color: #1f2937; margin: 0 0 0.25rem 0; }
.feedback-description { color: #6b7280; font-size: 0.875rem; line-height: 1.5; margin: 0; }

@media (max-width: 768px) {
    .feedback-item { padding: 1rem; flex-direction: column; align-items: flex-start; gap: 1rem; }
}

/* === Activity filter chips === */
.activity-filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.activity-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}

.activity-chip {
  padding: 0.4rem 1rem;
  border-radius: 0;
  border: 1px solid #d1d5db;
  border-right: none;
  background: white;
  color: #374151;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activity-chip:last-of-type {
  border-right: 1px solid #d1d5db;
}

.activity-chip:hover {
  background: #fef3f2;
  border-color: #CD3735;
  color: #CD3735;
  z-index: 1;
  position: relative;
}

.activity-chip.active {
  background: linear-gradient(135deg, #FFCE7B, #E98708, #CD3735);
  border-color: transparent;
  color: white;
  font-weight: 600;
  z-index: 1;
  position: relative;
}

.activity-chip-clear {
  padding: 0.4rem 1rem;
  border-radius: 0;
  border: 1px solid #9ca3af;
  background: white;
  color: #6b7280;
  font-family: 'Work Sans', sans-serif;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 0.75rem;
}

.activity-chip-clear:hover {
  background: #f3f4f6;
  color: #374151;
}

/* === Home layout: gallery + filter sidebar === */
.home-layout {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 0 3rem 3rem;
  max-width: 100%;
  box-sizing: border-box;
}

.technique-gallery-wrapper {
  flex: 1;
  min-width: 0;
  width: 0; /* forces flex child to shrink/grow properly */
}

/* === Filter panel === */
.filter-panel {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: 1rem;
  border-left: 1px solid #e5e7eb;
  padding-left: 1.5rem;
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.filter-panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
}

.activity-filter-section {
  padding: 0 0 1rem;
}

/* === SubNav dropdown === */
.sub-nav-dropdown {
  position: relative;
}

.sub-nav-dropdown-trigger {
  cursor: pointer;
}

.sub-nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 240px;
  padding: 0.5rem 0;
}

.sub-nav-dropdown-item {
  display: block;
  padding: 0.5rem 1.25rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.sub-nav-dropdown-item:hover {
  background: #fef3f2;
  color: #CD3735;
}
