  .btn-termchecker {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease;
  }

  .btn-termchecker:hover {
    background-color: var(--color-primary-dark);
  }

  /* 2. Panel deslizante */
  .termchecker-panel {
    position: fixed;
    top: var(--header-height, 60px);
    right: 0;
    bottom: 0;
    width: 30%;
    max-width: 400px;
    background-color: #fff;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, width 0.25s ease;
    padding: 1.5rem;
    overflow-y: auto;
    z-index: 1000;
  }
  .termchecker-panel.open {
    transform: translateX(0);
  }

  /* Estado colapsado: el panel queda completamente oculto fuera de la pantalla; solo la flecha (handle) queda visible.
     Usamos transform para esconderlo (igual que por defecto) y ocultamos interacciones y visibilidad. */
  .termchecker-panel.collapsed {
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    /* mantener ancho para transiciones limpias, pero no se ve */
  }
  /* Ocultar elementos internos cuando está colapsado (por si alguna implementación muestra parte) */
  .termchecker-panel.collapsed h3,
  .termchecker-panel.collapsed .tc-loading-bar,
  .termchecker-panel.collapsed .tc-content,
  .termchecker-panel.collapsed {
    display: none;
  }

  /*  Handle externo para expandir/colapsar (se posiciona a la izquierda del panel) */
  .tc-handle {
    /* Por defecto: botón fijo en el borde derecho (visible aunque el panel esté oculto) */
    display: none; /* oculto hasta que el usuario abra TermChecker por primera vez */
    position: fixed;
    right: 0;
    top: calc(var(--header-height, 60px) + 8px);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    color: --var(--color-secondary);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    font-size: 1rem;
    z-index: 1002;
    transform: translateX(6px); /* un ligero offset para que no quede pegado al borde */
  }
  .tc-handle:focus { outline: none; }

  /* Secondary variant for the handle (rounded, lighter secondary color) */
  .tc-handle.tc-handle-secondary {
    color: var(--color-secondary-dark, #1f2937);
    border-radius: 12px; /* más redondeado */
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  }
  .tc-handle.tc-handle-secondary i { color: inherit; }
  .tc-handle.tc-handle-secondary:hover {
    transform: translateX(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  }

  .termchecker-panel-content  {
    margin-top: 3rem;
  }

  .tc-resource { margin-bottom: 1rem; }
  .tc-resource h5 { margin-bottom: 0.5rem; font-size: 1rem; }
  .tc-link { text-decoration: none; color: #007bff; }

  .evaluation-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  }

  .btn-secondary {
    background-color: var(--color-secondary);
    color: white;
    padding: 0.4rem 0.9rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s ease;
  }

  .btn-secondary:hover {
    background-color: var(--color-secondary-light);
  }

  .modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  }

  .modal-content {
    background: #fff;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-md);
    position: relative;
  }

  .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
  }

  /* Collapsible summary styles */
  .term-info-collapsible {
    overflow: hidden;
  }
  .term-info-collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
  }
  .term-info-collapsible-header h4 { margin: 0; font-size: 1rem; }
  .collapse-toggle {
    /* rounded button with FontAwesome icon */
    border: none;
    font-size: .7rem;
    cursor: pointer;
    color: var(--color-secondary-dark, #1f2937);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: background 0.12s ease, transform 0.12s ease;
  }
  .collapse-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .collapse-label {
    font-size: 0.95rem;
    color: var(--text-color, #374151);
    white-space: nowrap;
    margin-right: 0.25rem;
  }
  .term-info-collapsible-body {
    max-height: 2000px; /* suficiente para mostrar contenido */
    overflow: hidden;
    transition: max-height 0.28s ease, padding 0.2s ease;
    padding: 0.6rem 0.5rem 0.9rem 0.5rem;
  }
  .term-info-collapsible-body.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
  }